lkml.org 
[lkml]   [2005]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [ANNOUNCE] hotplug-ng 002 release
    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    [W:0.023 / U:60.916 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site