From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tokarev Date: Fri, 13 May 2005 08:19:28 +0000 Subject: Re: [ANNOUNCE] hotplug-ng 002 release Message-Id: <42846310.1000807@tls.msk.ru> List-Id: References: <20050506212227.GA24066@kroah.com> <20050509211323.GB5297@tsiryulnik> <20050512214229.GA30233@kroah.com> In-Reply-To: <20050512214229.GA30233@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Greg KH Cc: linux-hotplug-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org 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 ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_ids93&alloc_id281&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel