![]() | |||||||||||||
Messages in this thread |
Greg KH wrote: [] > Subject: PCI: add MODALIAS to hotplug event for pci devices > --- gregkh-2.6.orig/drivers/pci/hotplug.c 2005-05-12 14:28:39.000000000 -0700 > +++ gregkh-2.6/drivers/pci/hotplug.c 2005-05-12 14:28:47.000000000 -0700 > @@ -52,6 +52,16 @@ > if ((buffer_size - length <= 0) || (i >= num_envp)) > return -ENOMEM; > > + envp[i++] = scratch; > + length += scnprintf (scratch, buffer_size - length, > + "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x\n", [] > Subject: PCI: add modalias sysfs file for pci devices > --- gregkh-2.6.orig/drivers/pci/pci-sysfs.c 2005-05-12 14:28:25.000000000 -0700 > +++ gregkh-2.6/drivers/pci/pci-sysfs.c 2005-05-12 14:28:40.000000000 -0700 > + return sprintf(buf, "pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x\n", > + pci_dev->vendor, pci_dev->device, > + pci_dev->subsystem_vendor, pci_dev->subsystem_device, > + (u8)(pci_dev->class >> 16), (u8)(pci_dev->class >> 8), Just a small note/suggestion... Looks like it's worth to create a common routine for the two cases. Just to be sure the value in $MODALIAS and in devices/xx/modalias are the same. I think. /mjt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2005-05-13 10:26 [from the cache] ©2003-2008 | |||||||||||||