hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/usb/class/usblp.c
....@@ -1116,6 +1116,12 @@
11161116
11171117 static DEVICE_ATTR_RO(ieee1284_id);
11181118
1119
+static struct attribute *usblp_attrs[] = {
1120
+ &dev_attr_ieee1284_id.attr,
1121
+ NULL,
1122
+};
1123
+ATTRIBUTE_GROUPS(usblp);
1124
+
11191125 static int usblp_probe(struct usb_interface *intf,
11201126 const struct usb_device_id *id)
11211127 {
....@@ -1190,9 +1196,6 @@
11901196
11911197 /* Retrieve and store the device ID string. */
11921198 usblp_cache_device_id_string(usblp);
1193
- retval = device_create_file(&intf->dev, &dev_attr_ieee1284_id);
1194
- if (retval)
1195
- goto abort_intfdata;
11961199
11971200 #ifdef DEBUG
11981201 usblp_check_status(usblp, 0);
....@@ -1223,7 +1226,6 @@
12231226
12241227 abort_intfdata:
12251228 usb_set_intfdata(intf, NULL);
1226
- device_remove_file(&intf->dev, &dev_attr_ieee1284_id);
12271229 abort:
12281230 kfree(usblp->readbuf);
12291231 kfree(usblp->statusbuf);
....@@ -1398,8 +1400,6 @@
13981400 BUG();
13991401 }
14001402
1401
- device_remove_file(&intf->dev, &dev_attr_ieee1284_id);
1402
-
14031403 mutex_lock(&usblp_mutex);
14041404 mutex_lock(&usblp->mut);
14051405 usblp->present = 0;
....@@ -1461,6 +1461,7 @@
14611461 .suspend = usblp_suspend,
14621462 .resume = usblp_resume,
14631463 .id_table = usblp_ids,
1464
+ .dev_groups = usblp_groups,
14641465 .supports_autosuspend = 1,
14651466 };
14661467