From ca35910a1ba21e45368640ac4d884536649966d9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 23 Jan 2018 11:24:07 +0100 Subject: USB: move many drivers to use DEVICE_ATTR_WO Instead of "open coding" a DEVICE_ATTR() define, use the DEVICE_ATTR_WO() macro instead, which does everything properly instead. This does require a few static functions to be renamed to work properly, but thanks to a script from Joe Perches, this was easily done. Reported-by: Joe Perches Cc: Peter Chen Cc: Valentina Manea Acked-by: Felipe Balbi Acked-by: Johan Hovold Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- drivers/usb/chipidea/otg_fsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/chipidea/otg_fsm.c') diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index d076cfa22fdf..6ed4b00dba96 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c @@ -162,7 +162,7 @@ b_bus_req_store(struct device *dev, struct device_attribute *attr, static DEVICE_ATTR_RW(b_bus_req); static ssize_t -set_a_clr_err(struct device *dev, struct device_attribute *attr, +a_clr_err_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct ci_hdrc *ci = dev_get_drvdata(dev); @@ -179,7 +179,7 @@ set_a_clr_err(struct device *dev, struct device_attribute *attr, return count; } -static DEVICE_ATTR(a_clr_err, S_IWUSR, NULL, set_a_clr_err); +static DEVICE_ATTR_WO(a_clr_err); static struct attribute *inputs_attrs[] = { &dev_attr_a_bus_req.attr, -- cgit v1.2.3