From 154547c4fe0fbe92185e69a6cdc2b0502b361995 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 23 Aug 2013 16:18:34 -0700 Subject: USB: serial: clean up attribute permissions Clean up the DEVICE_ATTR usage in the USB serial drivers, making them more obvious as to the permissions that the sysfs files should be. Note: ftdi_sio.c still has a DEVICE_ATTR() used, that will have to wait until after 3.12-rc1 comes out when DEVICE_ATTR_WO() shows up in Linus's tree. Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/bus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/usb/serial/bus.c') diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index f053b302a00d..0ce51f21ed2a 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c @@ -38,15 +38,14 @@ static int usb_serial_device_match(struct device *dev, return 0; } -static ssize_t show_port_number(struct device *dev, +static ssize_t port_number_show(struct device *dev, struct device_attribute *attr, char *buf) { struct usb_serial_port *port = to_usb_serial_port(dev); return sprintf(buf, "%d\n", port->port_number); } - -static DEVICE_ATTR(port_number, S_IRUGO, show_port_number, NULL); +static DEVICE_ATTR_RO(port_number); static int usb_serial_device_probe(struct device *dev) { -- cgit v1.2.3