diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 16:18:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-25 15:12:03 -0700 |
commit | 154547c4fe0fbe92185e69a6cdc2b0502b361995 (patch) | |
tree | 30cc47fcecbba3e23c8489138e4ca4b14659b7b0 /drivers/usb/serial/io_ti.c | |
parent | 2a6eb8ac9bdee5b09077ae2d6efc4babffd9d93e (diff) | |
download | blackbird-op-linux-154547c4fe0fbe92185e69a6cdc2b0502b361995.tar.gz blackbird-op-linux-154547c4fe0fbe92185e69a6cdc2b0502b361995.zip |
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 <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/io_ti.c')
-rw-r--r-- | drivers/usb/serial/io_ti.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 9c18f5985c8d..b7187bf32469 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c @@ -2484,7 +2484,7 @@ static int edge_port_remove(struct usb_serial_port *port) /* Sysfs Attributes */ -static ssize_t show_uart_mode(struct device *dev, +static ssize_t uart_mode_show(struct device *dev, struct device_attribute *attr, char *buf) { struct usb_serial_port *port = to_usb_serial_port(dev); @@ -2493,7 +2493,7 @@ static ssize_t show_uart_mode(struct device *dev, return sprintf(buf, "%d\n", edge_port->bUartMode); } -static ssize_t store_uart_mode(struct device *dev, +static ssize_t uart_mode_store(struct device *dev, struct device_attribute *attr, const char *valbuf, size_t count) { struct usb_serial_port *port = to_usb_serial_port(dev); @@ -2509,9 +2509,7 @@ static ssize_t store_uart_mode(struct device *dev, return count; } - -static DEVICE_ATTR(uart_mode, S_IWUSR | S_IRUGO, show_uart_mode, - store_uart_mode); +static DEVICE_ATTR_RW(uart_mode); static int edge_create_sysfs_attrs(struct usb_serial_port *port) { |