From f70575805708cabdedea7498aaa3f710fde4d920 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 31 Jan 2024 03:29:01 +0000 Subject: [PATCH] add lvds1024*800 --- kernel/drivers/usb/class/usblp.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/kernel/drivers/usb/class/usblp.c b/kernel/drivers/usb/class/usblp.c index 5edf52a..f27b4ae 100644 --- a/kernel/drivers/usb/class/usblp.c +++ b/kernel/drivers/usb/class/usblp.c @@ -1116,6 +1116,12 @@ static DEVICE_ATTR_RO(ieee1284_id); +static struct attribute *usblp_attrs[] = { + &dev_attr_ieee1284_id.attr, + NULL, +}; +ATTRIBUTE_GROUPS(usblp); + static int usblp_probe(struct usb_interface *intf, const struct usb_device_id *id) { @@ -1190,9 +1196,6 @@ /* Retrieve and store the device ID string. */ usblp_cache_device_id_string(usblp); - retval = device_create_file(&intf->dev, &dev_attr_ieee1284_id); - if (retval) - goto abort_intfdata; #ifdef DEBUG usblp_check_status(usblp, 0); @@ -1223,7 +1226,6 @@ abort_intfdata: usb_set_intfdata(intf, NULL); - device_remove_file(&intf->dev, &dev_attr_ieee1284_id); abort: kfree(usblp->readbuf); kfree(usblp->statusbuf); @@ -1398,8 +1400,6 @@ BUG(); } - device_remove_file(&intf->dev, &dev_attr_ieee1284_id); - mutex_lock(&usblp_mutex); mutex_lock(&usblp->mut); usblp->present = 0; @@ -1461,6 +1461,7 @@ .suspend = usblp_suspend, .resume = usblp_resume, .id_table = usblp_ids, + .dev_groups = usblp_groups, .supports_autosuspend = 1, }; -- Gitblit v1.6.2