mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
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>
This commit is contained in:
parent
35a1743f45
commit
601fbf65b2
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user