[PATCH v2 4/9] staging: comedi: ni_usb6501: rename ni6501_send_command()
Hartley Sweeten
HartleyS at visionengravers.com
Wed Sep 17 16:35:20 UTC 2014
On Tuesday, September 16, 2014 4:40 AM, Luca Ellero wrote:
> Rename ni6501_send_command to ni6501_port_command
>
> Signed-off-by: Luca Ellero <luca.ellero at brickedbrain.com>
> ---
> drivers/staging/comedi/drivers/ni_usb6501.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_usb6501.c b/drivers/staging/comedi/drivers/ni_usb6501.c
> index 91c0e22..f55b9f8 100644
> --- a/drivers/staging/comedi/drivers/ni_usb6501.c
> +++ b/drivers/staging/comedi/drivers/ni_usb6501.c
> @@ -172,7 +172,7 @@ struct ni6501_private {
> u8 *usb_tx_buf;
> };
>
> -static int ni6501_send_command(struct comedi_device *dev, int command,
> +static int ni6501_port_command(struct comedi_device *dev, int command,
> const u8 *port, u8 *bitmap)
> {
No comments on this patch but a side note (nit-picks) about
ni6501_port_command().
This function is only called in the driver and the 'port' parameter
is always valid. The 'devpriv->usb_tx_buf' is also always valid or
the driver fails the (*auto_attach). Thus this test is not needed:
if (!tx || !port)
return -EINVAL;
This could be removed in a separate patch.
There is also some unnecessary white space after the case statements
and before the break statements.
Again, these could be removed in a separate patch.
Regards,
Hartley
More information about the devel
mailing list