]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
deprecate PHYSDEV* keys
authorKay Sievers <kay.sievers@suse.de>
Sun, 13 Aug 2006 04:17:09 +0000 (06:17 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Sep 2006 04:08:36 +0000 (21:08 -0700)
deprecate PHYSDEV* values in the uevent environment

These values are no longer needed and inconsistent with the
stacking of class devices. The event environment should not
carry properties of a parent device. The key PHYSDEVDRIVER is
available as DRIVER, PHYDEVBUS is indentical SUBSYSTEM. Class
devices should not carry any of these values.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/feature-removal-schedule.txt
drivers/base/class.c
drivers/base/core.c

index 552507fe9a7ead2498dd4d696b53498da4be40e9..a89a1b7f7cf7f0bf943fa68446416567a75a1b59 100644 (file)
@@ -294,3 +294,15 @@ Why:       The frame diverter is included in most distribution kernels, but is
        It is not clear if anyone is still using it.
 Who:   Stephen Hemminger <shemminger@osdl.org>
 
+---------------------------
+
+
+What:  PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment
+When:  Oktober 2008
+Why:   The stacking of class devices makes these values misleading and
+       inconsistent.
+       Class devices should not carry any of these properties, and bus
+       devices have SUBSYTEM and DRIVER as a replacement.
+Who:   Kay Sievers <kay.sievers@suse.de>
+
+---------------------------
index de8908320f235f0d92b9a21b7cea4b9ea96375c7..46336f1b93b61f8dcd76f6e6af7359a3e5775225 100644 (file)
@@ -361,7 +361,7 @@ static int class_uevent(struct kset *kset, struct kobject *kobj, char **envp,
        pr_debug("%s - name = %s\n", __FUNCTION__, class_dev->class_id);
 
        if (class_dev->dev) {
-               /* add physical device, backing this device  */
+               /* add device, backing this class device (deprecated) */
                struct device *dev = class_dev->dev;
                char *path = kobject_get_path(&dev->kobj, GFP_KERNEL);
 
index be6b5bc0677d545c0f79efd659f98d268fffb200..04d089fd4f761fcd38ed814d6088d35e30ddf002 100644 (file)
@@ -149,17 +149,21 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, char **envp,
                               "MINOR=%u", MINOR(dev->devt));
        }
 
-       /* add bus name of physical device */
+       /* add bus name (same as SUBSYSTEM, deprecated) */
        if (dev->bus)
                add_uevent_var(envp, num_envp, &i,
                               buffer, buffer_size, &length,
                               "PHYSDEVBUS=%s", dev->bus->name);
 
-       /* add driver name of physical device */
-       if (dev->driver)
+       /* add driver name (PHYSDEV* values are deprecated)*/
+       if (dev->driver) {
+               add_uevent_var(envp, num_envp, &i,
+                              buffer, buffer_size, &length,
+                              "DRIVER=%s", dev->driver->name);
                add_uevent_var(envp, num_envp, &i,
                               buffer, buffer_size, &length,
                               "PHYSDEVDRIVER=%s", dev->driver->name);
+       }
 
        /* terminate, set to next free slot, shrink available space */
        envp[i] = NULL;