aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/feature-removal-schedule.txt12
-rw-r--r--drivers/base/class.c2
-rw-r--r--drivers/base/core.c10
3 files changed, 20 insertions, 4 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 552507fe9a7e..a89a1b7f7cf7 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -294,3 +294,15 @@ Why: The frame diverter is included in most distribution kernels, but is
294 It is not clear if anyone is still using it. 294 It is not clear if anyone is still using it.
295Who: Stephen Hemminger <shemminger@osdl.org> 295Who: Stephen Hemminger <shemminger@osdl.org>
296 296
297---------------------------
298
299
300What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment
301When: Oktober 2008
302Why: The stacking of class devices makes these values misleading and
303 inconsistent.
304 Class devices should not carry any of these properties, and bus
305 devices have SUBSYTEM and DRIVER as a replacement.
306Who: Kay Sievers <kay.sievers@suse.de>
307
308---------------------------
diff --git a/drivers/base/class.c b/drivers/base/class.c
index de8908320f23..46336f1b93b6 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -361,7 +361,7 @@ static int class_uevent(struct kset *kset, struct kobject *kobj, char **envp,
361 pr_debug("%s - name = %s\n", __FUNCTION__, class_dev->class_id); 361 pr_debug("%s - name = %s\n", __FUNCTION__, class_dev->class_id);
362 362
363 if (class_dev->dev) { 363 if (class_dev->dev) {
364 /* add physical device, backing this device */ 364 /* add device, backing this class device (deprecated) */
365 struct device *dev = class_dev->dev; 365 struct device *dev = class_dev->dev;
366 char *path = kobject_get_path(&dev->kobj, GFP_KERNEL); 366 char *path = kobject_get_path(&dev->kobj, GFP_KERNEL);
367 367
diff --git a/drivers/base/core.c b/drivers/base/core.c
index be6b5bc0677d..04d089fd4f76 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -149,17 +149,21 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, char **envp,
149 "MINOR=%u", MINOR(dev->devt)); 149 "MINOR=%u", MINOR(dev->devt));
150 } 150 }
151 151
152 /* add bus name of physical device */ 152 /* add bus name (same as SUBSYSTEM, deprecated) */
153 if (dev->bus) 153 if (dev->bus)
154 add_uevent_var(envp, num_envp, &i, 154 add_uevent_var(envp, num_envp, &i,
155 buffer, buffer_size, &length, 155 buffer, buffer_size, &length,
156 "PHYSDEVBUS=%s", dev->bus->name); 156 "PHYSDEVBUS=%s", dev->bus->name);
157 157
158 /* add driver name of physical device */ 158 /* add driver name (PHYSDEV* values are deprecated)*/
159 if (dev->driver) 159 if (dev->driver) {
160 add_uevent_var(envp, num_envp, &i,
161 buffer, buffer_size, &length,
162 "DRIVER=%s", dev->driver->name);
160 add_uevent_var(envp, num_envp, &i, 163 add_uevent_var(envp, num_envp, &i,
161 buffer, buffer_size, &length, 164 buffer, buffer_size, &length,
162 "PHYSDEVDRIVER=%s", dev->driver->name); 165 "PHYSDEVDRIVER=%s", dev->driver->name);
166 }
163 167
164 /* terminate, set to next free slot, shrink available space */ 168 /* terminate, set to next free slot, shrink available space */
165 envp[i] = NULL; 169 envp[i] = NULL;