lkml.org 
[lkml]   [2020]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/15] usb: serial: belkin_sa: use usb_control_msg_send()
On Wed, Nov 04, 2020 at 12:16:50PM +0530, Himadri Pandya wrote:
> The new usb_control_msg_send() nicely wraps usb_control_msg() with
> proper error check. Hence use the wrapper instead of calling
> usb_control_msg() directly.
>
> Signed-off-by: Himadri Pandya <himadrispandya@gmail.com>
> ---
> drivers/usb/serial/belkin_sa.c | 35 +++++++++++++++++-----------------
> 1 file changed, 17 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
> index 9bb123ab9bc9..a5ff55f48303 100644
> --- a/drivers/usb/serial/belkin_sa.c
> +++ b/drivers/usb/serial/belkin_sa.c
> @@ -105,9 +105,10 @@ struct belkin_sa_private {
> #define WDR_TIMEOUT 5000 /* default urb timeout */
>
> /* assumes that struct usb_serial *serial is available */
> -#define BSA_USB_CMD(c, v) usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), \
> - (c), BELKIN_SA_SET_REQUEST_TYPE, \
> - (v), 0, NULL, 0, WDR_TIMEOUT)
> +#define BSA_USB_CMD(c, v) usb_control_msg_send(serial->dev, 0, (c), \
> + BELKIN_SA_SET_REQUEST_TYPE, \
> + (v), 0, NULL, 0, WDR_TIMEOUT, \
> + GFP_KERNEL)

Also here there's no data stage so there no point in using the new
helpers.

Please drop this one as well.

Johan

\
 
 \ /
  Last update: 2020-12-04 10:19    [W:0.638 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site