Commit 601fbf65 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20231201150647.1307406-3-mathias.nyman@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 35a1743f
...@@ -957,9 +957,9 @@ static ssize_t dbc_store(struct device *dev, ...@@ -957,9 +957,9 @@ static ssize_t dbc_store(struct device *dev,
xhci = hcd_to_xhci(dev_get_drvdata(dev)); xhci = hcd_to_xhci(dev_get_drvdata(dev));
dbc = xhci->dbc; dbc = xhci->dbc;
if (!strncmp(buf, "enable", 6)) if (sysfs_streq(buf, "enable"))
xhci_dbc_start(dbc); xhci_dbc_start(dbc);
else if (!strncmp(buf, "disable", 7)) else if (sysfs_streq(buf, "disable"))
xhci_dbc_stop(dbc); xhci_dbc_stop(dbc);
else else
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment