Re: [PATCH 3/3] usb/gadgets: push iSerialNumber into gadgets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> writes:
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>

Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx>

> diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
> index 367bbb6..35e8c87 100644
> --- a/include/linux/usb/composite.h
> +++ b/include/linux/usb/composite.h
> @@ -398,6 +398,7 @@ struct usb_composite_overwrite {
>  	u16	idVendor;
>  	u16	idProduct;
>  	u16	bcdDevice;
> +	char	*iSerialNumber;

There was this comment a while back that the name does not really match
USB specification as “i” should be an index and not a string, so even
though we're stuck with iSerialNumber as module parameter, maybe it
would make sense to rename it here?

>  };
>  #define USB_GADGET_COMPOSITE_OPTIONS()					\
>  	static struct usb_composite_overwrite coverwrite;		\
> @@ -409,7 +410,11 @@ struct usb_composite_overwrite {
>  	MODULE_PARM_DESC(idProduct, "USB Product ID");			\
>  									\
>  	module_param_named(bcdDevice, coverwrite.bcdDevice, ushort, S_IRUGO); \
> -	MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)")
> +	MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)");	\
> +									\
> +	module_param_named(iSerialNumber, coverwrite.iSerialNumber, charp, \
> +			S_IRUGO); \
> +	MODULE_PARM_DESC(iSerialNumber, "SerialNumber string")
>  
>  void usb_composite_overwrite_options(struct usb_composite_dev *cdev,
>  		struct usb_composite_overwrite *covr);

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@xxxxxxxxxx>--------------ooO--(_)--Ooo--

Attachment: pgpzY1o6UV2_e.pgp
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux