Re: [ANNOUNCE] hotplug-ng 002 release

From: Greg KH
Date: Fri May 13 2005 - 11:08:17 EST


On Fri, May 13, 2005 at 12:19:28PM +0400, Michael Tokarev wrote:
> 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.

Sure, if you want to do so go ahead :)

But be careful of the CONFIG_HOTPLUG issue...

It's easier just to leave it as is for now.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/