aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index b565b7e9d40b..f544adc5a5e2 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -154,20 +154,24 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, char **envp,
154 "MINOR=%u", MINOR(dev->devt)); 154 "MINOR=%u", MINOR(dev->devt));
155 } 155 }
156 156
157#ifdef CONFIG_SYSFS_DEPRECATED
157 /* add bus name (same as SUBSYSTEM, deprecated) */ 158 /* add bus name (same as SUBSYSTEM, deprecated) */
158 if (dev->bus) 159 if (dev->bus)
159 add_uevent_var(envp, num_envp, &i, 160 add_uevent_var(envp, num_envp, &i,
160 buffer, buffer_size, &length, 161 buffer, buffer_size, &length,
161 "PHYSDEVBUS=%s", dev->bus->name); 162 "PHYSDEVBUS=%s", dev->bus->name);
163#endif
162 164
163 /* add driver name (PHYSDEV* values are deprecated)*/ 165 /* add driver name (PHYSDEV* values are deprecated)*/
164 if (dev->driver) { 166 if (dev->driver) {
165 add_uevent_var(envp, num_envp, &i, 167 add_uevent_var(envp, num_envp, &i,
166 buffer, buffer_size, &length, 168 buffer, buffer_size, &length,
167 "DRIVER=%s", dev->driver->name); 169 "DRIVER=%s", dev->driver->name);
170#ifdef CONFIG_SYSFS_DEPRECATED
168 add_uevent_var(envp, num_envp, &i, 171 add_uevent_var(envp, num_envp, &i,
169 buffer, buffer_size, &length, 172 buffer, buffer_size, &length,
170 "PHYSDEVDRIVER=%s", dev->driver->name); 173 "PHYSDEVDRIVER=%s", dev->driver->name);
174#endif
171 } 175 }
172 176
173 /* terminate, set to next free slot, shrink available space */ 177 /* terminate, set to next free slot, shrink available space */