]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/usb/gadget/udc/renesas_usb3.c
Merge 5.3-rc5 into usb-next
[linux.git] / drivers / usb / gadget / udc / renesas_usb3.c
index 027a25694a681e3dd6f76e239be0faaa7183d5f2..e098f16c01cb5dedef6e4084c33a7ec39f43acdc 100644 (file)
@@ -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;