diff options
author | Stefan Agner <stefan@agner.ch> | 2017-04-14 18:35:09 -0700 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-12-21 11:14:32 +0100 |
commit | a126a5e5dc2fcc5cb36af14c89b440cc8e3bab30 (patch) | |
tree | 2235c117b6d1142f7b2a5fd1970d6448e0af2bff /drivers | |
parent | 46a09b1b606a8176eda033ff48750ad15a8c2a14 (diff) |
usb: gadget: configfs: use hexadecimal values and new lineColibri-VF_LXDE-Image_2.8b1.64-20171229
Other unsigned properties return hexadecimal values, follow this
convention when printing b_vendor_code too. Also add newlines to
the OS Descriptor support related properties, like other sysfs
files use.
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
(cherry picked from commit e800e8cbdf42c73602b90258f82a2cfe86ec53a7)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/configfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 12cf9969abcc..41f6f312add0 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -739,7 +739,7 @@ static inline struct gadget_info *os_desc_item_to_gadget_info( static ssize_t os_desc_use_show(struct config_item *item, char *page) { - return sprintf(page, "%d", + return sprintf(page, "%d\n", os_desc_item_to_gadget_info(item)->use_os_desc); } @@ -763,7 +763,7 @@ static ssize_t os_desc_use_store(struct config_item *item, const char *page, static ssize_t os_desc_b_vendor_code_show(struct config_item *item, char *page) { - return sprintf(page, "%d", + return sprintf(page, "0x%02x\n", os_desc_item_to_gadget_info(item)->b_vendor_code); } @@ -906,7 +906,7 @@ static inline struct usb_os_desc_ext_prop static ssize_t ext_prop_type_show(struct config_item *item, char *page) { - return sprintf(page, "%d", to_usb_os_desc_ext_prop(item)->type); + return sprintf(page, "%d\n", to_usb_os_desc_ext_prop(item)->type); } static ssize_t ext_prop_type_store(struct config_item *item, |