diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-12-01 17:06:30 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-04 07:50:39 +0100 |
commit | 601fbf65b2a0af126268da22500c24e8616ade5a (patch) | |
tree | 02a74e025d9b91d1bbaa013176d235873867bc1d /drivers/usb/host/xhci-dbgcap.c | |
parent | 35a1743f4598e09524ae39651bc42733ec9749de (diff) | |
download | lwn-601fbf65b2a0af126268da22500c24e8616ade5a.tar.gz lwn-601fbf65b2a0af126268da22500c24e8616ade5a.zip |
xhci: dbc: Convert to use sysfs_streq()
It's standard approach to parse values from user space by using
sysfs_streq(). Make driver use it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20231201150647.1307406-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-dbgcap.c')
-rw-r--r-- | drivers/usb/host/xhci-dbgcap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c index 9e9ce3711813..f505b79afe53 100644 --- a/drivers/usb/host/xhci-dbgcap.c +++ b/drivers/usb/host/xhci-dbgcap.c @@ -957,9 +957,9 @@ static ssize_t dbc_store(struct device *dev, xhci = hcd_to_xhci(dev_get_drvdata(dev)); dbc = xhci->dbc; - if (!strncmp(buf, "enable", 6)) + if (sysfs_streq(buf, "enable")) xhci_dbc_start(dbc); - else if (!strncmp(buf, "disable", 7)) + else if (sysfs_streq(buf, "disable")) xhci_dbc_stop(dbc); else return -EINVAL; |