.. | .. |
---|
1116 | 1116 | |
---|
1117 | 1117 | static DEVICE_ATTR_RO(ieee1284_id); |
---|
1118 | 1118 | |
---|
| 1119 | +static struct attribute *usblp_attrs[] = { |
---|
| 1120 | + &dev_attr_ieee1284_id.attr, |
---|
| 1121 | + NULL, |
---|
| 1122 | +}; |
---|
| 1123 | +ATTRIBUTE_GROUPS(usblp); |
---|
| 1124 | + |
---|
1119 | 1125 | static int usblp_probe(struct usb_interface *intf, |
---|
1120 | 1126 | const struct usb_device_id *id) |
---|
1121 | 1127 | { |
---|
.. | .. |
---|
1190 | 1196 | |
---|
1191 | 1197 | /* Retrieve and store the device ID string. */ |
---|
1192 | 1198 | usblp_cache_device_id_string(usblp); |
---|
1193 | | - retval = device_create_file(&intf->dev, &dev_attr_ieee1284_id); |
---|
1194 | | - if (retval) |
---|
1195 | | - goto abort_intfdata; |
---|
1196 | 1199 | |
---|
1197 | 1200 | #ifdef DEBUG |
---|
1198 | 1201 | usblp_check_status(usblp, 0); |
---|
.. | .. |
---|
1223 | 1226 | |
---|
1224 | 1227 | abort_intfdata: |
---|
1225 | 1228 | usb_set_intfdata(intf, NULL); |
---|
1226 | | - device_remove_file(&intf->dev, &dev_attr_ieee1284_id); |
---|
1227 | 1229 | abort: |
---|
1228 | 1230 | kfree(usblp->readbuf); |
---|
1229 | 1231 | kfree(usblp->statusbuf); |
---|
.. | .. |
---|
1398 | 1400 | BUG(); |
---|
1399 | 1401 | } |
---|
1400 | 1402 | |
---|
1401 | | - device_remove_file(&intf->dev, &dev_attr_ieee1284_id); |
---|
1402 | | - |
---|
1403 | 1403 | mutex_lock(&usblp_mutex); |
---|
1404 | 1404 | mutex_lock(&usblp->mut); |
---|
1405 | 1405 | usblp->present = 0; |
---|
.. | .. |
---|
1461 | 1461 | .suspend = usblp_suspend, |
---|
1462 | 1462 | .resume = usblp_resume, |
---|
1463 | 1463 | .id_table = usblp_ids, |
---|
| 1464 | + .dev_groups = usblp_groups, |
---|
1464 | 1465 | .supports_autosuspend = 1, |
---|
1465 | 1466 | }; |
---|
1466 | 1467 | |
---|