diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 17:24:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 17:38:11 -0400 |
commit | d13a280faec9c2c7d530fd3c6787a4d09f3f1c0f (patch) | |
tree | c2fe3b5aac9179237950ee4336a3c81822fcddec /drivers/usb | |
parent | bf2206957c7228d047fd50d07da8f1d92d0bc686 (diff) |
USB: serial: convert bus code to use drv_groups
The drv_attrs field of struct bus_type is going away soon, drv_groups
should be used instead. This converts the USB serial bus code to use
the correct field.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/bus.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index f053b302a00d..24624339ef89 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c | |||
@@ -122,7 +122,7 @@ static int usb_serial_device_remove(struct device *dev) | |||
122 | return retval; | 122 | return retval; |
123 | } | 123 | } |
124 | 124 | ||
125 | static ssize_t store_new_id(struct device_driver *driver, | 125 | static ssize_t new_id_store(struct device_driver *driver, |
126 | const char *buf, size_t count) | 126 | const char *buf, size_t count) |
127 | { | 127 | { |
128 | struct usb_serial_driver *usb_drv = to_usb_serial_driver(driver); | 128 | struct usb_serial_driver *usb_drv = to_usb_serial_driver(driver); |
@@ -135,17 +135,19 @@ static ssize_t store_new_id(struct device_driver *driver, | |||
135 | return retval; | 135 | return retval; |
136 | } | 136 | } |
137 | 137 | ||
138 | static ssize_t show_dynids(struct device_driver *driver, char *buf) | 138 | static ssize_t new_id_show(struct device_driver *driver, char *buf) |
139 | { | 139 | { |
140 | struct usb_serial_driver *usb_drv = to_usb_serial_driver(driver); | 140 | struct usb_serial_driver *usb_drv = to_usb_serial_driver(driver); |
141 | 141 | ||
142 | return usb_show_dynids(&usb_drv->dynids, buf); | 142 | return usb_show_dynids(&usb_drv->dynids, buf); |
143 | } | 143 | } |
144 | static DRIVER_ATTR_RW(new_id); | ||
144 | 145 | ||
145 | static struct driver_attribute drv_attrs[] = { | 146 | static struct attribute *usb_serial_drv_attrs[] = { |
146 | __ATTR(new_id, S_IRUGO | S_IWUSR, show_dynids, store_new_id), | 147 | &driver_attr_new_id.attr, |
147 | __ATTR_NULL, | 148 | NULL, |
148 | }; | 149 | }; |
150 | ATTRIBUTE_GROUPS(usb_serial_drv); | ||
149 | 151 | ||
150 | static void free_dynids(struct usb_serial_driver *drv) | 152 | static void free_dynids(struct usb_serial_driver *drv) |
151 | { | 153 | { |
@@ -164,7 +166,7 @@ struct bus_type usb_serial_bus_type = { | |||
164 | .match = usb_serial_device_match, | 166 | .match = usb_serial_device_match, |
165 | .probe = usb_serial_device_probe, | 167 | .probe = usb_serial_device_probe, |
166 | .remove = usb_serial_device_remove, | 168 | .remove = usb_serial_device_remove, |
167 | .drv_attrs = drv_attrs, | 169 | .drv_groups = usb_serial_drv_groups, |
168 | }; | 170 | }; |
169 | 171 | ||
170 | int usb_serial_bus_register(struct usb_serial_driver *driver) | 172 | int usb_serial_bus_register(struct usb_serial_driver *driver) |