aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-23 17:24:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-23 17:38:11 -0400
commitd13a280faec9c2c7d530fd3c6787a4d09f3f1c0f (patch)
treec2fe3b5aac9179237950ee4336a3c81822fcddec /drivers/usb
parentbf2206957c7228d047fd50d07da8f1d92d0bc686 (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.c14
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
125static ssize_t store_new_id(struct device_driver *driver, 125static 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
138static ssize_t show_dynids(struct device_driver *driver, char *buf) 138static 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}
144static DRIVER_ATTR_RW(new_id);
144 145
145static struct driver_attribute drv_attrs[] = { 146static 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};
150ATTRIBUTE_GROUPS(usb_serial_drv);
149 151
150static void free_dynids(struct usb_serial_driver *drv) 152static 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
170int usb_serial_bus_register(struct usb_serial_driver *driver) 172int usb_serial_bus_register(struct usb_serial_driver *driver)