summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/renesas_usb3.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-19 07:15:42 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-19 07:15:42 +0200
commit7ffc95e90e305c6803991ec2a2f4e442236efc77 (patch)
tree5018f8310d14bb4d8dd25813ae69827c557060a9 /drivers/usb/gadget/udc/renesas_usb3.c
parent1e296b5be40d309a1585c14bc55da6ff6a29ecf0 (diff)
parentd1abaeb3be7b5fa6d7a1fbbd2e14e3310005c4c1 (diff)
Merge 5.3-rc5 into usb-next
We need the usb fixes in here as well for other patches to build on. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/udc/renesas_usb3.c')
-rw-r--r--drivers/usb/gadget/udc/renesas_usb3.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c
index 027a25694a68..e098f16c01cb 100644
--- a/drivers/usb/gadget/udc/renesas_usb3.c
+++ b/drivers/usb/gadget/udc/renesas_usb3.c
@@ -19,6 +19,7 @@
#include <linux/pm_runtime.h>
#include <linux/sizes.h>
#include <linux/slab.h>
+#include <linux/string.h>
#include <linux/sys_soc.h>
#include <linux/uaccess.h>
#include <linux/usb/ch9.h>
@@ -2450,9 +2451,9 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr,
if (usb3->forced_b_device)
return -EBUSY;
- if (!strncmp(buf, "host", strlen("host")))
+ if (sysfs_streq(buf, "host"))
new_mode_is_host = true;
- else if (!strncmp(buf, "peripheral", strlen("peripheral")))
+ else if (sysfs_streq(buf, "peripheral"))
new_mode_is_host = false;
else
return -EINVAL;