aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/container.c8
-rw-r--r--drivers/acpi/processor_core.c8
-rw-r--r--drivers/acpi/scan.c14
-rw-r--r--drivers/base/Kconfig4
-rw-r--r--drivers/base/class.c66
-rw-r--r--drivers/base/core.c42
-rw-r--r--drivers/base/cpu.c4
-rw-r--r--drivers/base/firmware_class.c45
-rw-r--r--drivers/base/memory.c12
-rw-r--r--drivers/ieee1394/nodemgr.c20
-rw-r--r--drivers/infiniband/core/sysfs.c16
-rw-r--r--drivers/input/input.c14
-rw-r--r--drivers/input/serio/serio.c22
-rw-r--r--drivers/macintosh/macio_asic.c4
-rw-r--r--drivers/mmc/mmc_sysfs.c4
-rw-r--r--drivers/pci/hotplug.c44
-rw-r--r--drivers/pci/pci-driver.c6
-rw-r--r--drivers/pci/pci.h4
-rw-r--r--drivers/pcmcia/cs.c10
-rw-r--r--drivers/pcmcia/ds.c50
-rw-r--r--drivers/scsi/ipr.c2
-rw-r--r--drivers/usb/core/usb.c86
-rw-r--r--drivers/usb/host/hc_crisv10.c2
-rw-r--r--drivers/w1/w1.c14
24 files changed, 248 insertions, 253 deletions
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index 27ec12c1fab0..b69a8cad82b7 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -172,21 +172,21 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context)
172 if (ACPI_FAILURE(status) || !device) { 172 if (ACPI_FAILURE(status) || !device) {
173 result = container_device_add(&device, handle); 173 result = container_device_add(&device, handle);
174 if (!result) 174 if (!result)
175 kobject_hotplug(&device->kobj, 175 kobject_uevent(&device->kobj,
176 KOBJ_ONLINE); 176 KOBJ_ONLINE);
177 else 177 else
178 printk("Failed to add container\n"); 178 printk("Failed to add container\n");
179 } 179 }
180 } else { 180 } else {
181 if (ACPI_SUCCESS(status)) { 181 if (ACPI_SUCCESS(status)) {
182 /* device exist and this is a remove request */ 182 /* device exist and this is a remove request */
183 kobject_hotplug(&device->kobj, KOBJ_OFFLINE); 183 kobject_uevent(&device->kobj, KOBJ_OFFLINE);
184 } 184 }
185 } 185 }
186 break; 186 break;
187 case ACPI_NOTIFY_EJECT_REQUEST: 187 case ACPI_NOTIFY_EJECT_REQUEST:
188 if (!acpi_bus_get_device(handle, &device) && device) { 188 if (!acpi_bus_get_device(handle, &device) && device) {
189 kobject_hotplug(&device->kobj, KOBJ_OFFLINE); 189 kobject_uevent(&device->kobj, KOBJ_OFFLINE);
190 } 190 }
191 break; 191 break;
192 default: 192 default:
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 0c561c571f29..1278aca96fe3 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -748,7 +748,7 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)
748 return_VALUE(-ENODEV); 748 return_VALUE(-ENODEV);
749 749
750 if ((pr->id >= 0) && (pr->id < NR_CPUS)) { 750 if ((pr->id >= 0) && (pr->id < NR_CPUS)) {
751 kobject_hotplug(&(*device)->kobj, KOBJ_ONLINE); 751 kobject_uevent(&(*device)->kobj, KOBJ_ONLINE);
752 } 752 }
753 return_VALUE(0); 753 return_VALUE(0);
754} 754}
@@ -788,13 +788,13 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
788 } 788 }
789 789
790 if (pr->id >= 0 && (pr->id < NR_CPUS)) { 790 if (pr->id >= 0 && (pr->id < NR_CPUS)) {
791 kobject_hotplug(&device->kobj, KOBJ_OFFLINE); 791 kobject_uevent(&device->kobj, KOBJ_OFFLINE);
792 break; 792 break;
793 } 793 }
794 794
795 result = acpi_processor_start(device); 795 result = acpi_processor_start(device);
796 if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { 796 if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) {
797 kobject_hotplug(&device->kobj, KOBJ_ONLINE); 797 kobject_uevent(&device->kobj, KOBJ_ONLINE);
798 } else { 798 } else {
799 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 799 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
800 "Device [%s] failed to start\n", 800 "Device [%s] failed to start\n",
@@ -818,7 +818,7 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
818 } 818 }
819 819
820 if ((pr->id < NR_CPUS) && (cpu_present(pr->id))) 820 if ((pr->id < NR_CPUS) && (cpu_present(pr->id)))
821 kobject_hotplug(&device->kobj, KOBJ_OFFLINE); 821 kobject_uevent(&device->kobj, KOBJ_OFFLINE);
822 break; 822 break;
823 default: 823 default:
824 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 824 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 31218e1d2a18..0745d20afb8c 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -78,7 +78,7 @@ static struct kobj_type ktype_acpi_ns = {
78 .release = acpi_device_release, 78 .release = acpi_device_release,
79}; 79};
80 80
81static int namespace_hotplug(struct kset *kset, struct kobject *kobj, 81static int namespace_uevent(struct kset *kset, struct kobject *kobj,
82 char **envp, int num_envp, char *buffer, 82 char **envp, int num_envp, char *buffer,
83 int buffer_size) 83 int buffer_size)
84{ 84{
@@ -89,8 +89,8 @@ static int namespace_hotplug(struct kset *kset, struct kobject *kobj,
89 if (!dev->driver) 89 if (!dev->driver)
90 return 0; 90 return 0;
91 91
92 if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len, 92 if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len,
93 "PHYSDEVDRIVER=%s", dev->driver->name)) 93 "PHYSDEVDRIVER=%s", dev->driver->name))
94 return -ENOMEM; 94 return -ENOMEM;
95 95
96 envp[i] = NULL; 96 envp[i] = NULL;
@@ -98,8 +98,8 @@ static int namespace_hotplug(struct kset *kset, struct kobject *kobj,
98 return 0; 98 return 0;
99} 99}
100 100
101static struct kset_hotplug_ops namespace_hotplug_ops = { 101static struct kset_uevent_ops namespace_uevent_ops = {
102 .hotplug = &namespace_hotplug, 102 .uevent = &namespace_uevent,
103}; 103};
104 104
105static struct kset acpi_namespace_kset = { 105static struct kset acpi_namespace_kset = {
@@ -108,7 +108,7 @@ static struct kset acpi_namespace_kset = {
108 }, 108 },
109 .subsys = &acpi_subsys, 109 .subsys = &acpi_subsys,
110 .ktype = &ktype_acpi_ns, 110 .ktype = &ktype_acpi_ns,
111 .hotplug_ops = &namespace_hotplug_ops, 111 .uevent_ops = &namespace_uevent_ops,
112}; 112};
113 113
114static void acpi_device_register(struct acpi_device *device, 114static void acpi_device_register(struct acpi_device *device,
@@ -347,7 +347,7 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
347} 347}
348 348
349/* -------------------------------------------------------------------------- 349/* --------------------------------------------------------------------------
350 ACPI hotplug sysfs device file support 350 ACPI sysfs device file support
351 -------------------------------------------------------------------------- */ 351 -------------------------------------------------------------------------- */
352static ssize_t acpi_eject_store(struct acpi_device *device, 352static ssize_t acpi_eject_store(struct acpi_device *device,
353 const char *buf, size_t count); 353 const char *buf, size_t count);
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index 934149c1512b..f0eff3dac58d 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -19,11 +19,11 @@ config PREVENT_FIRMWARE_BUILD
19 If unsure say Y here. 19 If unsure say Y here.
20 20
21config FW_LOADER 21config FW_LOADER
22 tristate "Hotplug firmware loading support" 22 tristate "Userspace firmware loading support"
23 select HOTPLUG 23 select HOTPLUG
24 ---help--- 24 ---help---
25 This option is provided for the case where no in-kernel-tree modules 25 This option is provided for the case where no in-kernel-tree modules
26 require hotplug firmware loading support, but a module built outside 26 require userspace firmware loading support, but a module built outside
27 the kernel tree does. 27 the kernel tree does.
28 28
29config DEBUG_DRIVER 29config DEBUG_DRIVER
diff --git a/drivers/base/class.c b/drivers/base/class.c
index db65fd0babe9..df7fdabd0730 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -178,7 +178,7 @@ static void class_device_create_release(struct class_device *class_dev)
178} 178}
179 179
180/* needed to allow these devices to have parent class devices */ 180/* needed to allow these devices to have parent class devices */
181static int class_device_create_hotplug(struct class_device *class_dev, 181static int class_device_create_uevent(struct class_device *class_dev,
182 char **envp, int num_envp, 182 char **envp, int num_envp,
183 char *buffer, int buffer_size) 183 char *buffer, int buffer_size)
184{ 184{
@@ -331,7 +331,7 @@ static struct kobj_type ktype_class_device = {
331 .release = class_dev_release, 331 .release = class_dev_release,
332}; 332};
333 333
334static int class_hotplug_filter(struct kset *kset, struct kobject *kobj) 334static int class_uevent_filter(struct kset *kset, struct kobject *kobj)
335{ 335{
336 struct kobj_type *ktype = get_ktype(kobj); 336 struct kobj_type *ktype = get_ktype(kobj);
337 337
@@ -343,14 +343,14 @@ static int class_hotplug_filter(struct kset *kset, struct kobject *kobj)
343 return 0; 343 return 0;
344} 344}
345 345
346static const char *class_hotplug_name(struct kset *kset, struct kobject *kobj) 346static const char *class_uevent_name(struct kset *kset, struct kobject *kobj)
347{ 347{
348 struct class_device *class_dev = to_class_dev(kobj); 348 struct class_device *class_dev = to_class_dev(kobj);
349 349
350 return class_dev->class->name; 350 return class_dev->class->name;
351} 351}
352 352
353static int class_hotplug(struct kset *kset, struct kobject *kobj, char **envp, 353static int class_uevent(struct kset *kset, struct kobject *kobj, char **envp,
354 int num_envp, char *buffer, int buffer_size) 354 int num_envp, char *buffer, int buffer_size)
355{ 355{
356 struct class_device *class_dev = to_class_dev(kobj); 356 struct class_device *class_dev = to_class_dev(kobj);
@@ -365,29 +365,29 @@ static int class_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
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
368 add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, 368 add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
369 &length, "PHYSDEVPATH=%s", path); 369 &length, "PHYSDEVPATH=%s", path);
370 kfree(path); 370 kfree(path);
371 371
372 if (dev->bus) 372 if (dev->bus)
373 add_hotplug_env_var(envp, num_envp, &i, 373 add_uevent_var(envp, num_envp, &i,
374 buffer, buffer_size, &length, 374 buffer, buffer_size, &length,
375 "PHYSDEVBUS=%s", dev->bus->name); 375 "PHYSDEVBUS=%s", dev->bus->name);
376 376
377 if (dev->driver) 377 if (dev->driver)
378 add_hotplug_env_var(envp, num_envp, &i, 378 add_uevent_var(envp, num_envp, &i,
379 buffer, buffer_size, &length, 379 buffer, buffer_size, &length,
380 "PHYSDEVDRIVER=%s", dev->driver->name); 380 "PHYSDEVDRIVER=%s", dev->driver->name);
381 } 381 }
382 382
383 if (MAJOR(class_dev->devt)) { 383 if (MAJOR(class_dev->devt)) {
384 add_hotplug_env_var(envp, num_envp, &i, 384 add_uevent_var(envp, num_envp, &i,
385 buffer, buffer_size, &length, 385 buffer, buffer_size, &length,
386 "MAJOR=%u", MAJOR(class_dev->devt)); 386 "MAJOR=%u", MAJOR(class_dev->devt));
387 387
388 add_hotplug_env_var(envp, num_envp, &i, 388 add_uevent_var(envp, num_envp, &i,
389 buffer, buffer_size, &length, 389 buffer, buffer_size, &length,
390 "MINOR=%u", MINOR(class_dev->devt)); 390 "MINOR=%u", MINOR(class_dev->devt));
391 } 391 }
392 392
393 /* terminate, set to next free slot, shrink available space */ 393 /* terminate, set to next free slot, shrink available space */
@@ -397,30 +397,30 @@ static int class_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
397 buffer = &buffer[length]; 397 buffer = &buffer[length];
398 buffer_size -= length; 398 buffer_size -= length;
399 399
400 if (class_dev->hotplug) { 400 if (class_dev->uevent) {
401 /* have the class device specific function add its stuff */ 401 /* have the class device specific function add its stuff */
402 retval = class_dev->hotplug(class_dev, envp, num_envp, 402 retval = class_dev->uevent(class_dev, envp, num_envp,
403 buffer, buffer_size); 403 buffer, buffer_size);
404 if (retval) 404 if (retval)
405 pr_debug("class_dev->hotplug() returned %d\n", retval); 405 pr_debug("class_dev->uevent() returned %d\n", retval);
406 } else if (class_dev->class->hotplug) { 406 } else if (class_dev->class->uevent) {
407 /* have the class specific function add its stuff */ 407 /* have the class specific function add its stuff */
408 retval = class_dev->class->hotplug(class_dev, envp, num_envp, 408 retval = class_dev->class->uevent(class_dev, envp, num_envp,
409 buffer, buffer_size); 409 buffer, buffer_size);
410 if (retval) 410 if (retval)
411 pr_debug("class->hotplug() returned %d\n", retval); 411 pr_debug("class->uevent() returned %d\n", retval);
412 } 412 }
413 413
414 return retval; 414 return retval;
415} 415}
416 416
417static struct kset_hotplug_ops class_hotplug_ops = { 417static struct kset_uevent_ops class_uevent_ops = {
418 .filter = class_hotplug_filter, 418 .filter = class_uevent_filter,
419 .name = class_hotplug_name, 419 .name = class_uevent_name,
420 .hotplug = class_hotplug, 420 .uevent = class_uevent,
421}; 421};
422 422
423static decl_subsys(class_obj, &ktype_class_device, &class_hotplug_ops); 423static decl_subsys(class_obj, &ktype_class_device, &class_uevent_ops);
424 424
425 425
426static int class_device_add_attrs(struct class_device * cd) 426static int class_device_add_attrs(struct class_device * cd)
@@ -464,7 +464,7 @@ static ssize_t show_dev(struct class_device *class_dev, char *buf)
464static ssize_t store_uevent(struct class_device *class_dev, 464static ssize_t store_uevent(struct class_device *class_dev,
465 const char *buf, size_t count) 465 const char *buf, size_t count)
466{ 466{
467 kobject_hotplug(&class_dev->kobj, KOBJ_ADD); 467 kobject_uevent(&class_dev->kobj, KOBJ_ADD);
468 return count; 468 return count;
469} 469}
470 470
@@ -559,7 +559,7 @@ int class_device_add(struct class_device *class_dev)
559 class_name); 559 class_name);
560 } 560 }
561 561
562 kobject_hotplug(&class_dev->kobj, KOBJ_ADD); 562 kobject_uevent(&class_dev->kobj, KOBJ_ADD);
563 563
564 /* notify any interfaces this device is now here */ 564 /* notify any interfaces this device is now here */
565 if (parent_class) { 565 if (parent_class) {
@@ -632,7 +632,7 @@ struct class_device *class_device_create(struct class *cls,
632 class_dev->class = cls; 632 class_dev->class = cls;
633 class_dev->parent = parent; 633 class_dev->parent = parent;
634 class_dev->release = class_device_create_release; 634 class_dev->release = class_device_create_release;
635 class_dev->hotplug = class_device_create_hotplug; 635 class_dev->uevent = class_device_create_uevent;
636 636
637 va_start(args, fmt); 637 va_start(args, fmt);
638 vsnprintf(class_dev->class_id, BUS_ID_SIZE, fmt, args); 638 vsnprintf(class_dev->class_id, BUS_ID_SIZE, fmt, args);
@@ -674,7 +674,7 @@ void class_device_del(struct class_device *class_dev)
674 class_device_remove_file(class_dev, class_dev->devt_attr); 674 class_device_remove_file(class_dev, class_dev->devt_attr);
675 class_device_remove_attrs(class_dev); 675 class_device_remove_attrs(class_dev);
676 676
677 kobject_hotplug(&class_dev->kobj, KOBJ_REMOVE); 677 kobject_uevent(&class_dev->kobj, KOBJ_REMOVE);
678 kobject_del(&class_dev->kobj); 678 kobject_del(&class_dev->kobj);
679 679
680 class_device_put(parent_device); 680 class_device_put(parent_device);
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 8615b42b517a..fd8059920dbf 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -90,7 +90,7 @@ static struct kobj_type ktype_device = {
90}; 90};
91 91
92 92
93static int dev_hotplug_filter(struct kset *kset, struct kobject *kobj) 93static int dev_uevent_filter(struct kset *kset, struct kobject *kobj)
94{ 94{
95 struct kobj_type *ktype = get_ktype(kobj); 95 struct kobj_type *ktype = get_ktype(kobj);
96 96
@@ -102,14 +102,14 @@ static int dev_hotplug_filter(struct kset *kset, struct kobject *kobj)
102 return 0; 102 return 0;
103} 103}
104 104
105static const char *dev_hotplug_name(struct kset *kset, struct kobject *kobj) 105static const char *dev_uevent_name(struct kset *kset, struct kobject *kobj)
106{ 106{
107 struct device *dev = to_dev(kobj); 107 struct device *dev = to_dev(kobj);
108 108
109 return dev->bus->name; 109 return dev->bus->name;
110} 110}
111 111
112static int dev_hotplug(struct kset *kset, struct kobject *kobj, char **envp, 112static int dev_uevent(struct kset *kset, struct kobject *kobj, char **envp,
113 int num_envp, char *buffer, int buffer_size) 113 int num_envp, char *buffer, int buffer_size)
114{ 114{
115 struct device *dev = to_dev(kobj); 115 struct device *dev = to_dev(kobj);
@@ -119,15 +119,15 @@ static int dev_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
119 119
120 /* add bus name of physical device */ 120 /* add bus name of physical device */
121 if (dev->bus) 121 if (dev->bus)
122 add_hotplug_env_var(envp, num_envp, &i, 122 add_uevent_var(envp, num_envp, &i,
123 buffer, buffer_size, &length, 123 buffer, buffer_size, &length,
124 "PHYSDEVBUS=%s", dev->bus->name); 124 "PHYSDEVBUS=%s", dev->bus->name);
125 125
126 /* add driver name of physical device */ 126 /* add driver name of physical device */
127 if (dev->driver) 127 if (dev->driver)
128 add_hotplug_env_var(envp, num_envp, &i, 128 add_uevent_var(envp, num_envp, &i,
129 buffer, buffer_size, &length, 129 buffer, buffer_size, &length,
130 "PHYSDEVDRIVER=%s", dev->driver->name); 130 "PHYSDEVDRIVER=%s", dev->driver->name);
131 131
132 /* terminate, set to next free slot, shrink available space */ 132 /* terminate, set to next free slot, shrink available space */
133 envp[i] = NULL; 133 envp[i] = NULL;
@@ -136,11 +136,11 @@ static int dev_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
136 buffer = &buffer[length]; 136 buffer = &buffer[length];
137 buffer_size -= length; 137 buffer_size -= length;
138 138
139 if (dev->bus && dev->bus->hotplug) { 139 if (dev->bus && dev->bus->uevent) {
140 /* have the bus specific function add its stuff */ 140 /* have the bus specific function add its stuff */
141 retval = dev->bus->hotplug (dev, envp, num_envp, buffer, buffer_size); 141 retval = dev->bus->uevent(dev, envp, num_envp, buffer, buffer_size);
142 if (retval) { 142 if (retval) {
143 pr_debug ("%s - hotplug() returned %d\n", 143 pr_debug ("%s - uevent() returned %d\n",
144 __FUNCTION__, retval); 144 __FUNCTION__, retval);
145 } 145 }
146 } 146 }
@@ -148,16 +148,16 @@ static int dev_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
148 return retval; 148 return retval;
149} 149}
150 150
151static struct kset_hotplug_ops device_hotplug_ops = { 151static struct kset_uevent_ops device_uevent_ops = {
152 .filter = dev_hotplug_filter, 152 .filter = dev_uevent_filter,
153 .name = dev_hotplug_name, 153 .name = dev_uevent_name,
154 .hotplug = dev_hotplug, 154 .uevent = dev_uevent,
155}; 155};
156 156
157static ssize_t store_uevent(struct device *dev, struct device_attribute *attr, 157static ssize_t store_uevent(struct device *dev, struct device_attribute *attr,
158 const char *buf, size_t count) 158 const char *buf, size_t count)
159{ 159{
160 kobject_hotplug(&dev->kobj, KOBJ_ADD); 160 kobject_uevent(&dev->kobj, KOBJ_ADD);
161 return count; 161 return count;
162} 162}
163 163
@@ -165,7 +165,7 @@ static ssize_t store_uevent(struct device *dev, struct device_attribute *attr,
165 * device_subsys - structure to be registered with kobject core. 165 * device_subsys - structure to be registered with kobject core.
166 */ 166 */
167 167
168decl_subsys(devices, &ktype_device, &device_hotplug_ops); 168decl_subsys(devices, &ktype_device, &device_uevent_ops);
169 169
170 170
171/** 171/**
@@ -274,7 +274,7 @@ int device_add(struct device *dev)
274 dev->uevent_attr.store = store_uevent; 274 dev->uevent_attr.store = store_uevent;
275 device_create_file(dev, &dev->uevent_attr); 275 device_create_file(dev, &dev->uevent_attr);
276 276
277 kobject_hotplug(&dev->kobj, KOBJ_ADD); 277 kobject_uevent(&dev->kobj, KOBJ_ADD);
278 if ((error = device_pm_add(dev))) 278 if ((error = device_pm_add(dev)))
279 goto PMError; 279 goto PMError;
280 if ((error = bus_add_device(dev))) 280 if ((error = bus_add_device(dev)))
@@ -291,7 +291,7 @@ int device_add(struct device *dev)
291 BusError: 291 BusError:
292 device_pm_remove(dev); 292 device_pm_remove(dev);
293 PMError: 293 PMError:
294 kobject_hotplug(&dev->kobj, KOBJ_REMOVE); 294 kobject_uevent(&dev->kobj, KOBJ_REMOVE);
295 kobject_del(&dev->kobj); 295 kobject_del(&dev->kobj);
296 Error: 296 Error:
297 if (parent) 297 if (parent)
@@ -374,7 +374,7 @@ void device_del(struct device * dev)
374 platform_notify_remove(dev); 374 platform_notify_remove(dev);
375 bus_remove_device(dev); 375 bus_remove_device(dev);
376 device_pm_remove(dev); 376 device_pm_remove(dev);
377 kobject_hotplug(&dev->kobj, KOBJ_REMOVE); 377 kobject_uevent(&dev->kobj, KOBJ_REMOVE);
378 kobject_del(&dev->kobj); 378 kobject_del(&dev->kobj);
379 if (parent) 379 if (parent)
380 put_device(parent); 380 put_device(parent);
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index a95844790f7b..281d26784d25 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -41,14 +41,14 @@ static ssize_t store_online(struct sys_device *dev, const char *buf,
41 case '0': 41 case '0':
42 ret = cpu_down(cpu->sysdev.id); 42 ret = cpu_down(cpu->sysdev.id);
43 if (!ret) 43 if (!ret)
44 kobject_hotplug(&dev->kobj, KOBJ_OFFLINE); 44 kobject_uevent(&dev->kobj, KOBJ_OFFLINE);
45 break; 45 break;
46 case '1': 46 case '1':
47 ret = smp_prepare_cpu(cpu->sysdev.id); 47 ret = smp_prepare_cpu(cpu->sysdev.id);
48 if (!ret) 48 if (!ret)
49 ret = cpu_up(cpu->sysdev.id); 49 ret = cpu_up(cpu->sysdev.id);
50 if (!ret) 50 if (!ret)
51 kobject_hotplug(&dev->kobj, KOBJ_ONLINE); 51 kobject_uevent(&dev->kobj, KOBJ_ONLINE);
52 break; 52 break;
53 default: 53 default:
54 ret = -EINVAL; 54 ret = -EINVAL;
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 59dacb6552c0..5b3d5e9ddcb6 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -85,17 +85,17 @@ firmware_timeout_store(struct class *class, const char *buf, size_t count)
85static CLASS_ATTR(timeout, 0644, firmware_timeout_show, firmware_timeout_store); 85static CLASS_ATTR(timeout, 0644, firmware_timeout_show, firmware_timeout_store);
86 86
87static void fw_class_dev_release(struct class_device *class_dev); 87static void fw_class_dev_release(struct class_device *class_dev);
88int firmware_class_hotplug(struct class_device *dev, char **envp, 88int firmware_class_uevent(struct class_device *dev, char **envp,
89 int num_envp, char *buffer, int buffer_size); 89 int num_envp, char *buffer, int buffer_size);
90 90
91static struct class firmware_class = { 91static struct class firmware_class = {
92 .name = "firmware", 92 .name = "firmware",
93 .hotplug = firmware_class_hotplug, 93 .uevent = firmware_class_uevent,
94 .release = fw_class_dev_release, 94 .release = fw_class_dev_release,
95}; 95};
96 96
97int 97int
98firmware_class_hotplug(struct class_device *class_dev, char **envp, 98firmware_class_uevent(struct class_device *class_dev, char **envp,
99 int num_envp, char *buffer, int buffer_size) 99 int num_envp, char *buffer, int buffer_size)
100{ 100{
101 struct firmware_priv *fw_priv = class_get_devdata(class_dev); 101 struct firmware_priv *fw_priv = class_get_devdata(class_dev);
@@ -104,13 +104,12 @@ firmware_class_hotplug(struct class_device *class_dev, char **envp,
104 if (!test_bit(FW_STATUS_READY, &fw_priv->status)) 104 if (!test_bit(FW_STATUS_READY, &fw_priv->status))
105 return -ENODEV; 105 return -ENODEV;
106 106
107 if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len, 107 if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len,
108 "FIRMWARE=%s", fw_priv->fw_id)) 108 "FIRMWARE=%s", fw_priv->fw_id))
109 return -ENOMEM; 109 return -ENOMEM;
110 if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len, 110 if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len,
111 "TIMEOUT=%i", loading_timeout)) 111 "TIMEOUT=%i", loading_timeout))
112 return -ENOMEM; 112 return -ENOMEM;
113
114 envp[i] = NULL; 113 envp[i] = NULL;
115 114
116 return 0; 115 return 0;
@@ -352,7 +351,7 @@ error_kfree:
352 351
353static int 352static int
354fw_setup_class_device(struct firmware *fw, struct class_device **class_dev_p, 353fw_setup_class_device(struct firmware *fw, struct class_device **class_dev_p,
355 const char *fw_name, struct device *device, int hotplug) 354 const char *fw_name, struct device *device, int uevent)
356{ 355{
357 struct class_device *class_dev; 356 struct class_device *class_dev;
358 struct firmware_priv *fw_priv; 357 struct firmware_priv *fw_priv;
@@ -384,7 +383,7 @@ fw_setup_class_device(struct firmware *fw, struct class_device **class_dev_p,
384 goto error_unreg; 383 goto error_unreg;
385 } 384 }
386 385
387 if (hotplug) 386 if (uevent)
388 set_bit(FW_STATUS_READY, &fw_priv->status); 387 set_bit(FW_STATUS_READY, &fw_priv->status);
389 else 388 else
390 set_bit(FW_STATUS_READY_NOHOTPLUG, &fw_priv->status); 389 set_bit(FW_STATUS_READY_NOHOTPLUG, &fw_priv->status);
@@ -399,7 +398,7 @@ out:
399 398
400static int 399static int
401_request_firmware(const struct firmware **firmware_p, const char *name, 400_request_firmware(const struct firmware **firmware_p, const char *name,
402 struct device *device, int hotplug) 401 struct device *device, int uevent)
403{ 402{
404 struct class_device *class_dev; 403 struct class_device *class_dev;
405 struct firmware_priv *fw_priv; 404 struct firmware_priv *fw_priv;
@@ -418,19 +417,19 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
418 } 417 }
419 418
420 retval = fw_setup_class_device(firmware, &class_dev, name, device, 419 retval = fw_setup_class_device(firmware, &class_dev, name, device,
421 hotplug); 420 uevent);
422 if (retval) 421 if (retval)
423 goto error_kfree_fw; 422 goto error_kfree_fw;
424 423
425 fw_priv = class_get_devdata(class_dev); 424 fw_priv = class_get_devdata(class_dev);
426 425
427 if (hotplug) { 426 if (uevent) {
428 if (loading_timeout > 0) { 427 if (loading_timeout > 0) {
429 fw_priv->timeout.expires = jiffies + loading_timeout * HZ; 428 fw_priv->timeout.expires = jiffies + loading_timeout * HZ;
430 add_timer(&fw_priv->timeout); 429 add_timer(&fw_priv->timeout);
431 } 430 }
432 431
433 kobject_hotplug(&class_dev->kobj, KOBJ_ADD); 432 kobject_uevent(&class_dev->kobj, KOBJ_ADD);
434 wait_for_completion(&fw_priv->completion); 433 wait_for_completion(&fw_priv->completion);
435 set_bit(FW_STATUS_DONE, &fw_priv->status); 434 set_bit(FW_STATUS_DONE, &fw_priv->status);
436 del_timer_sync(&fw_priv->timeout); 435 del_timer_sync(&fw_priv->timeout);
@@ -456,7 +455,7 @@ out:
456} 455}
457 456
458/** 457/**
459 * request_firmware: - request firmware to hotplug and wait for it 458 * request_firmware: - send firmware request and wait for it
460 * @firmware_p: pointer to firmware image 459 * @firmware_p: pointer to firmware image
461 * @name: name of firmware file 460 * @name: name of firmware file
462 * @device: device for which firmware is being loaded 461 * @device: device for which firmware is being loaded
@@ -466,7 +465,7 @@ out:
466 * 465 *
467 * Should be called from user context where sleeping is allowed. 466 * Should be called from user context where sleeping is allowed.
468 * 467 *
469 * @name will be used as $FIRMWARE in the hotplug environment and 468 * @name will be used as $FIRMWARE in the uevent environment and
470 * should be distinctive enough not to be confused with any other 469 * should be distinctive enough not to be confused with any other
471 * firmware image for this or any other device. 470 * firmware image for this or any other device.
472 **/ 471 **/
@@ -474,8 +473,8 @@ int
474request_firmware(const struct firmware **firmware_p, const char *name, 473request_firmware(const struct firmware **firmware_p, const char *name,
475 struct device *device) 474 struct device *device)
476{ 475{
477 int hotplug = 1; 476 int uevent = 1;
478 return _request_firmware(firmware_p, name, device, hotplug); 477 return _request_firmware(firmware_p, name, device, uevent);
479} 478}
480 479
481/** 480/**
@@ -518,7 +517,7 @@ struct firmware_work {
518 struct device *device; 517 struct device *device;
519 void *context; 518 void *context;
520 void (*cont)(const struct firmware *fw, void *context); 519 void (*cont)(const struct firmware *fw, void *context);
521 int hotplug; 520 int uevent;
522}; 521};
523 522
524static int 523static int
@@ -533,7 +532,7 @@ request_firmware_work_func(void *arg)
533 } 532 }
534 daemonize("%s/%s", "firmware", fw_work->name); 533 daemonize("%s/%s", "firmware", fw_work->name);
535 ret = _request_firmware(&fw, fw_work->name, fw_work->device, 534 ret = _request_firmware(&fw, fw_work->name, fw_work->device,
536 fw_work->hotplug); 535 fw_work->uevent);
537 if (ret < 0) 536 if (ret < 0)
538 fw_work->cont(NULL, fw_work->context); 537 fw_work->cont(NULL, fw_work->context);
539 else { 538 else {
@@ -548,7 +547,7 @@ request_firmware_work_func(void *arg)
548/** 547/**
549 * request_firmware_nowait: asynchronous version of request_firmware 548 * request_firmware_nowait: asynchronous version of request_firmware
550 * @module: module requesting the firmware 549 * @module: module requesting the firmware
551 * @hotplug: invokes hotplug event to copy the firmware image if this flag 550 * @uevent: sends uevent to copy the firmware image if this flag
552 * is non-zero else the firmware copy must be done manually. 551 * is non-zero else the firmware copy must be done manually.
553 * @name: name of firmware file 552 * @name: name of firmware file
554 * @device: device for which firmware is being loaded 553 * @device: device for which firmware is being loaded
@@ -562,7 +561,7 @@ request_firmware_work_func(void *arg)
562 **/ 561 **/
563int 562int
564request_firmware_nowait( 563request_firmware_nowait(
565 struct module *module, int hotplug, 564 struct module *module, int uevent,
566 const char *name, struct device *device, void *context, 565 const char *name, struct device *device, void *context,
567 void (*cont)(const struct firmware *fw, void *context)) 566 void (*cont)(const struct firmware *fw, void *context))
568{ 567{
@@ -583,7 +582,7 @@ request_firmware_nowait(
583 .device = device, 582 .device = device,
584 .context = context, 583 .context = context,
585 .cont = cont, 584 .cont = cont,
586 .hotplug = hotplug, 585 .uevent = uevent,
587 }; 586 };
588 587
589 ret = kernel_thread(request_firmware_work_func, fw_work, 588 ret = kernel_thread(request_firmware_work_func, fw_work,
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index bc3ca6a656b2..7e1d077874df 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -29,12 +29,12 @@ static struct sysdev_class memory_sysdev_class = {
29 set_kset_name(MEMORY_CLASS_NAME), 29 set_kset_name(MEMORY_CLASS_NAME),
30}; 30};
31 31
32static char *memory_hotplug_name(struct kset *kset, struct kobject *kobj) 32static const char *memory_uevent_name(struct kset *kset, struct kobject *kobj)
33{ 33{
34 return MEMORY_CLASS_NAME; 34 return MEMORY_CLASS_NAME;
35} 35}
36 36
37static int memory_hotplug(struct kset *kset, struct kobject *kobj, char **envp, 37static int memory_uevent(struct kset *kset, struct kobject *kobj, char **envp,
38 int num_envp, char *buffer, int buffer_size) 38 int num_envp, char *buffer, int buffer_size)
39{ 39{
40 int retval = 0; 40 int retval = 0;
@@ -42,9 +42,9 @@ static int memory_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
42 return retval; 42 return retval;
43} 43}
44 44
45static struct kset_hotplug_ops memory_hotplug_ops = { 45static struct kset_uevent_ops memory_uevent_ops = {
46 .name = memory_hotplug_name, 46 .name = memory_uevent_name,
47 .hotplug = memory_hotplug, 47 .uevent = memory_uevent,
48}; 48};
49 49
50static struct notifier_block *memory_chain; 50static struct notifier_block *memory_chain;
@@ -431,7 +431,7 @@ int __init memory_dev_init(void)
431 unsigned int i; 431 unsigned int i;
432 int ret; 432 int ret;
433 433
434 memory_sysdev_class.kset.hotplug_ops = &memory_hotplug_ops; 434 memory_sysdev_class.kset.uevent_ops = &memory_uevent_ops;
435 ret = sysdev_class_register(&memory_sysdev_class); 435 ret = sysdev_class_register(&memory_sysdev_class);
436 436
437 /* 437 /*
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 0ea37b1bccb2..f2453668acf5 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -121,8 +121,8 @@ struct host_info {
121}; 121};
122 122
123static int nodemgr_bus_match(struct device * dev, struct device_driver * drv); 123static int nodemgr_bus_match(struct device * dev, struct device_driver * drv);
124static int nodemgr_hotplug(struct class_device *cdev, char **envp, int num_envp, 124static int nodemgr_uevent(struct class_device *cdev, char **envp, int num_envp,
125 char *buffer, int buffer_size); 125 char *buffer, int buffer_size);
126static void nodemgr_resume_ne(struct node_entry *ne); 126static void nodemgr_resume_ne(struct node_entry *ne);
127static void nodemgr_remove_ne(struct node_entry *ne); 127static void nodemgr_remove_ne(struct node_entry *ne);
128static struct node_entry *find_entry_by_guid(u64 guid); 128static struct node_entry *find_entry_by_guid(u64 guid);
@@ -162,7 +162,7 @@ static void ud_cls_release(struct class_device *class_dev)
162static struct class nodemgr_ud_class = { 162static struct class nodemgr_ud_class = {
163 .name = "ieee1394", 163 .name = "ieee1394",
164 .release = ud_cls_release, 164 .release = ud_cls_release,
165 .hotplug = nodemgr_hotplug, 165 .uevent = nodemgr_uevent,
166}; 166};
167 167
168static struct hpsb_highlevel nodemgr_highlevel; 168static struct hpsb_highlevel nodemgr_highlevel;
@@ -966,7 +966,7 @@ static struct unit_directory *nodemgr_process_unit_directory
966 if (ud_child == NULL) 966 if (ud_child == NULL)
967 break; 967 break;
968 968
969 /* inherit unspecified values so hotplug picks it up */ 969 /* inherit unspecified values, the driver core picks it up */
970 if ((ud->flags & UNIT_DIRECTORY_MODEL_ID) && 970 if ((ud->flags & UNIT_DIRECTORY_MODEL_ID) &&
971 !(ud_child->flags & UNIT_DIRECTORY_MODEL_ID)) 971 !(ud_child->flags & UNIT_DIRECTORY_MODEL_ID))
972 { 972 {
@@ -1062,8 +1062,8 @@ static void nodemgr_process_root_directory(struct host_info *hi, struct node_ent
1062 1062
1063#ifdef CONFIG_HOTPLUG 1063#ifdef CONFIG_HOTPLUG
1064 1064
1065static int nodemgr_hotplug(struct class_device *cdev, char **envp, int num_envp, 1065static int nodemgr_uevent(struct class_device *cdev, char **envp, int num_envp,
1066 char *buffer, int buffer_size) 1066 char *buffer, int buffer_size)
1067{ 1067{
1068 struct unit_directory *ud; 1068 struct unit_directory *ud;
1069 int i = 0; 1069 int i = 0;
@@ -1112,8 +1112,8 @@ do { \
1112 1112
1113#else 1113#else
1114 1114
1115static int nodemgr_hotplug(struct class_device *cdev, char **envp, int num_envp, 1115static int nodemgr_uevent(struct class_device *cdev, char **envp, int num_envp,
1116 char *buffer, int buffer_size) 1116 char *buffer, int buffer_size)
1117{ 1117{
1118 return -ENODEV; 1118 return -ENODEV;
1119} 1119}
@@ -1618,8 +1618,8 @@ static int nodemgr_host_thread(void *__hi)
1618 1618
1619 /* Scan our nodes to get the bus options and create node 1619 /* Scan our nodes to get the bus options and create node
1620 * entries. This does not do the sysfs stuff, since that 1620 * entries. This does not do the sysfs stuff, since that
1621 * would trigger hotplug callbacks and such, which is a 1621 * would trigger uevents and such, which is a bad idea at
1622 * bad idea at this point. */ 1622 * this point. */
1623 nodemgr_node_scan(hi, generation); 1623 nodemgr_node_scan(hi, generation);
1624 1624
1625 /* This actually does the full probe, with sysfs 1625 /* This actually does the full probe, with sysfs
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index 08648b1a387e..1f1743c5c9a3 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -434,24 +434,24 @@ static void ib_device_release(struct class_device *cdev)
434 kfree(dev); 434 kfree(dev);
435} 435}
436 436
437static int ib_device_hotplug(struct class_device *cdev, char **envp, 437static int ib_device_uevent(struct class_device *cdev, char **envp,
438 int num_envp, char *buf, int size) 438 int num_envp, char *buf, int size)
439{ 439{
440 struct ib_device *dev = container_of(cdev, struct ib_device, class_dev); 440 struct ib_device *dev = container_of(cdev, struct ib_device, class_dev);
441 int i = 0, len = 0; 441 int i = 0, len = 0;
442 442
443 if (add_hotplug_env_var(envp, num_envp, &i, buf, size, &len, 443 if (add_uevent_var(envp, num_envp, &i, buf, size, &len,
444 "NAME=%s", dev->name)) 444 "NAME=%s", dev->name))
445 return -ENOMEM; 445 return -ENOMEM;
446 446
447 /* 447 /*
448 * It might be nice to pass the node GUID to hotplug, but 448 * It might be nice to pass the node GUID with the event, but
449 * right now the only way to get it is to query the device 449 * right now the only way to get it is to query the device
450 * provider, and this can crash during device removal because 450 * provider, and this can crash during device removal because
451 * we are will be running after driver removal has started. 451 * we are will be running after driver removal has started.
452 * We could add a node_guid field to struct ib_device, or we 452 * We could add a node_guid field to struct ib_device, or we
453 * could just let the hotplug script read the node GUID from 453 * could just let userspace read the node GUID from sysfs when
454 * sysfs when devices are added. 454 * devices are added.
455 */ 455 */
456 456
457 envp[i] = NULL; 457 envp[i] = NULL;
@@ -653,7 +653,7 @@ static struct class_device_attribute *ib_class_attributes[] = {
653static struct class ib_class = { 653static struct class ib_class = {
654 .name = "infiniband", 654 .name = "infiniband",
655 .release = ib_device_release, 655 .release = ib_device_release,
656 .hotplug = ib_device_hotplug, 656 .uevent = ib_device_uevent,
657}; 657};
658 658
659int ib_device_register_sysfs(struct ib_device *device) 659int ib_device_register_sysfs(struct ib_device *device)
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 43b49ccd7dad..2d37b394e384 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -610,10 +610,10 @@ static void input_dev_release(struct class_device *class_dev)
610} 610}
611 611
612/* 612/*
613 * Input hotplugging interface - loading event handlers based on 613 * Input uevent interface - loading event handlers based on
614 * device bitfields. 614 * device bitfields.
615 */ 615 */
616static int input_add_hotplug_bm_var(char **envp, int num_envp, int *cur_index, 616static int input_add_uevent_bm_var(char **envp, int num_envp, int *cur_index,
617 char *buffer, int buffer_size, int *cur_len, 617 char *buffer, int buffer_size, int *cur_len,
618 const char *name, unsigned long *bitmap, int max) 618 const char *name, unsigned long *bitmap, int max)
619{ 619{
@@ -638,7 +638,7 @@ static int input_add_hotplug_bm_var(char **envp, int num_envp, int *cur_index,
638 638
639#define INPUT_ADD_HOTPLUG_VAR(fmt, val...) \ 639#define INPUT_ADD_HOTPLUG_VAR(fmt, val...) \
640 do { \ 640 do { \
641 int err = add_hotplug_env_var(envp, num_envp, &i, \ 641 int err = add_uevent_var(envp, num_envp, &i, \
642 buffer, buffer_size, &len, \ 642 buffer, buffer_size, &len, \
643 fmt, val); \ 643 fmt, val); \
644 if (err) \ 644 if (err) \
@@ -647,15 +647,15 @@ static int input_add_hotplug_bm_var(char **envp, int num_envp, int *cur_index,
647 647
648#define INPUT_ADD_HOTPLUG_BM_VAR(name, bm, max) \ 648#define INPUT_ADD_HOTPLUG_BM_VAR(name, bm, max) \
649 do { \ 649 do { \
650 int err = input_add_hotplug_bm_var(envp, num_envp, &i, \ 650 int err = input_add_uevent_bm_var(envp, num_envp, &i, \
651 buffer, buffer_size, &len, \ 651 buffer, buffer_size, &len, \
652 name, bm, max); \ 652 name, bm, max); \
653 if (err) \ 653 if (err) \
654 return err; \ 654 return err; \
655 } while (0) 655 } while (0)
656 656
657static int input_dev_hotplug(struct class_device *cdev, char **envp, 657static int input_dev_uevent(struct class_device *cdev, char **envp,
658 int num_envp, char *buffer, int buffer_size) 658 int num_envp, char *buffer, int buffer_size)
659{ 659{
660 struct input_dev *dev = to_input_dev(cdev); 660 struct input_dev *dev = to_input_dev(cdev);
661 int i = 0; 661 int i = 0;
@@ -697,7 +697,7 @@ static int input_dev_hotplug(struct class_device *cdev, char **envp,
697struct class input_class = { 697struct class input_class = {
698 .name = "input", 698 .name = "input",
699 .release = input_dev_release, 699 .release = input_dev_release,
700 .hotplug = input_dev_hotplug, 700 .uevent = input_dev_uevent,
701}; 701};
702 702
703struct input_dev *input_allocate_device(void) 703struct input_dev *input_allocate_device(void)
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index fbb69ef6a77b..8e530cc970e1 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -800,16 +800,16 @@ static int serio_bus_match(struct device *dev, struct device_driver *drv)
800 800
801#ifdef CONFIG_HOTPLUG 801#ifdef CONFIG_HOTPLUG
802 802
803#define SERIO_ADD_HOTPLUG_VAR(fmt, val...) \ 803#define SERIO_ADD_UEVENT_VAR(fmt, val...) \
804 do { \ 804 do { \
805 int err = add_hotplug_env_var(envp, num_envp, &i, \ 805 int err = add_uevent_var(envp, num_envp, &i, \
806 buffer, buffer_size, &len, \ 806 buffer, buffer_size, &len, \
807 fmt, val); \ 807 fmt, val); \
808 if (err) \ 808 if (err) \
809 return err; \ 809 return err; \
810 } while (0) 810 } while (0)
811 811
812static int serio_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) 812static int serio_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size)
813{ 813{
814 struct serio *serio; 814 struct serio *serio;
815 int i = 0; 815 int i = 0;
@@ -820,21 +820,21 @@ static int serio_hotplug(struct device *dev, char **envp, int num_envp, char *bu
820 820
821 serio = to_serio_port(dev); 821 serio = to_serio_port(dev);
822 822
823 SERIO_ADD_HOTPLUG_VAR("SERIO_TYPE=%02x", serio->id.type); 823 SERIO_ADD_UEVENT_VAR("SERIO_TYPE=%02x", serio->id.type);
824 SERIO_ADD_HOTPLUG_VAR("SERIO_PROTO=%02x", serio->id.proto); 824 SERIO_ADD_UEVENT_VAR("SERIO_PROTO=%02x", serio->id.proto);
825 SERIO_ADD_HOTPLUG_VAR("SERIO_ID=%02x", serio->id.id); 825 SERIO_ADD_UEVENT_VAR("SERIO_ID=%02x", serio->id.id);
826 SERIO_ADD_HOTPLUG_VAR("SERIO_EXTRA=%02x", serio->id.extra); 826 SERIO_ADD_UEVENT_VAR("SERIO_EXTRA=%02x", serio->id.extra);
827 SERIO_ADD_HOTPLUG_VAR("MODALIAS=serio:ty%02Xpr%02Xid%02Xex%02X", 827 SERIO_ADD_UEVENT_VAR("MODALIAS=serio:ty%02Xpr%02Xid%02Xex%02X",
828 serio->id.type, serio->id.proto, serio->id.id, serio->id.extra); 828 serio->id.type, serio->id.proto, serio->id.id, serio->id.extra);
829 envp[i] = NULL; 829 envp[i] = NULL;
830 830
831 return 0; 831 return 0;
832} 832}
833#undef SERIO_ADD_HOTPLUG_VAR 833#undef SERIO_ADD_UEVENT_VAR
834 834
835#else 835#else
836 836
837static int serio_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) 837static int serio_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size)
838{ 838{
839 return -ENODEV; 839 return -ENODEV;
840} 840}
@@ -908,7 +908,7 @@ static int __init serio_init(void)
908 serio_bus.dev_attrs = serio_device_attrs; 908 serio_bus.dev_attrs = serio_device_attrs;
909 serio_bus.drv_attrs = serio_driver_attrs; 909 serio_bus.drv_attrs = serio_driver_attrs;
910 serio_bus.match = serio_bus_match; 910 serio_bus.match = serio_bus_match;
911 serio_bus.hotplug = serio_hotplug; 911 serio_bus.uevent = serio_uevent;
912 serio_bus.resume = serio_resume; 912 serio_bus.resume = serio_resume;
913 bus_register(&serio_bus); 913 bus_register(&serio_bus);
914 914
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index c34c96d18907..228e1852a836 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -128,7 +128,7 @@ static int macio_device_resume(struct device * dev)
128 return 0; 128 return 0;
129} 129}
130 130
131static int macio_hotplug (struct device *dev, char **envp, int num_envp, 131static int macio_uevent(struct device *dev, char **envp, int num_envp,
132 char *buffer, int buffer_size) 132 char *buffer, int buffer_size)
133{ 133{
134 struct macio_dev * macio_dev; 134 struct macio_dev * macio_dev;
@@ -203,7 +203,7 @@ extern struct device_attribute macio_dev_attrs[];
203struct bus_type macio_bus_type = { 203struct bus_type macio_bus_type = {
204 .name = "macio", 204 .name = "macio",
205 .match = macio_bus_match, 205 .match = macio_bus_match,
206 .hotplug = macio_hotplug, 206 .uevent = macio_uevent,
207 .suspend = macio_device_suspend, 207 .suspend = macio_device_suspend,
208 .resume = macio_device_resume, 208 .resume = macio_device_resume,
209 .dev_attrs = macio_dev_attrs, 209 .dev_attrs = macio_dev_attrs,
diff --git a/drivers/mmc/mmc_sysfs.c b/drivers/mmc/mmc_sysfs.c
index 3f4a66ca9555..ec701667abfc 100644
--- a/drivers/mmc/mmc_sysfs.c
+++ b/drivers/mmc/mmc_sysfs.c
@@ -80,7 +80,7 @@ static int mmc_bus_match(struct device *dev, struct device_driver *drv)
80} 80}
81 81
82static int 82static int
83mmc_bus_hotplug(struct device *dev, char **envp, int num_envp, char *buf, 83mmc_bus_uevent(struct device *dev, char **envp, int num_envp, char *buf,
84 int buf_size) 84 int buf_size)
85{ 85{
86 struct mmc_card *card = dev_to_mmc_card(dev); 86 struct mmc_card *card = dev_to_mmc_card(dev);
@@ -140,7 +140,7 @@ static struct bus_type mmc_bus_type = {
140 .name = "mmc", 140 .name = "mmc",
141 .dev_attrs = mmc_dev_attrs, 141 .dev_attrs = mmc_dev_attrs,
142 .match = mmc_bus_match, 142 .match = mmc_bus_match,
143 .hotplug = mmc_bus_hotplug, 143 .uevent = mmc_bus_uevent,
144 .suspend = mmc_bus_suspend, 144 .suspend = mmc_bus_suspend,
145 .resume = mmc_bus_resume, 145 .resume = mmc_bus_resume,
146}; 146};
diff --git a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c
index e1743be31909..1c97e7dd130b 100644
--- a/drivers/pci/hotplug.c
+++ b/drivers/pci/hotplug.c
@@ -3,8 +3,8 @@
3#include <linux/module.h> 3#include <linux/module.h>
4#include "pci.h" 4#include "pci.h"
5 5
6int pci_hotplug (struct device *dev, char **envp, int num_envp, 6int pci_uevent(struct device *dev, char **envp, int num_envp,
7 char *buffer, int buffer_size) 7 char *buffer, int buffer_size)
8{ 8{
9 struct pci_dev *pdev; 9 struct pci_dev *pdev;
10 int i = 0; 10 int i = 0;
@@ -17,34 +17,34 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp,
17 if (!pdev) 17 if (!pdev)
18 return -ENODEV; 18 return -ENODEV;
19 19
20 if (add_hotplug_env_var(envp, num_envp, &i, 20 if (add_uevent_var(envp, num_envp, &i,
21 buffer, buffer_size, &length, 21 buffer, buffer_size, &length,
22 "PCI_CLASS=%04X", pdev->class)) 22 "PCI_CLASS=%04X", pdev->class))
23 return -ENOMEM; 23 return -ENOMEM;
24 24
25 if (add_hotplug_env_var(envp, num_envp, &i, 25 if (add_uevent_var(envp, num_envp, &i,
26 buffer, buffer_size, &length, 26 buffer, buffer_size, &length,
27 "PCI_ID=%04X:%04X", pdev->vendor, pdev->device)) 27 "PCI_ID=%04X:%04X", pdev->vendor, pdev->device))
28 return -ENOMEM; 28 return -ENOMEM;
29 29
30 if (add_hotplug_env_var(envp, num_envp, &i, 30 if (add_uevent_var(envp, num_envp, &i,
31 buffer, buffer_size, &length, 31 buffer, buffer_size, &length,
32 "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor, 32 "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor,
33 pdev->subsystem_device)) 33 pdev->subsystem_device))
34 return -ENOMEM; 34 return -ENOMEM;
35 35
36 if (add_hotplug_env_var(envp, num_envp, &i, 36 if (add_uevent_var(envp, num_envp, &i,
37 buffer, buffer_size, &length, 37 buffer, buffer_size, &length,
38 "PCI_SLOT_NAME=%s", pci_name(pdev))) 38 "PCI_SLOT_NAME=%s", pci_name(pdev)))
39 return -ENOMEM; 39 return -ENOMEM;
40 40
41 if (add_hotplug_env_var(envp, num_envp, &i, 41 if (add_uevent_var(envp, num_envp, &i,
42 buffer, buffer_size, &length, 42 buffer, buffer_size, &length,
43 "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x", 43 "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x",
44 pdev->vendor, pdev->device, 44 pdev->vendor, pdev->device,
45 pdev->subsystem_vendor, pdev->subsystem_device, 45 pdev->subsystem_vendor, pdev->subsystem_device,
46 (u8)(pdev->class >> 16), (u8)(pdev->class >> 8), 46 (u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
47 (u8)(pdev->class))) 47 (u8)(pdev->class)))
48 return -ENOMEM; 48 return -ENOMEM;
49 49
50 envp[i] = NULL; 50 envp[i] = NULL;
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index a9046d4b8af3..7146b69b812c 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -502,8 +502,8 @@ void pci_dev_put(struct pci_dev *dev)
502} 502}
503 503
504#ifndef CONFIG_HOTPLUG 504#ifndef CONFIG_HOTPLUG
505int pci_hotplug (struct device *dev, char **envp, int num_envp, 505int pci_uevent(struct device *dev, char **envp, int num_envp,
506 char *buffer, int buffer_size) 506 char *buffer, int buffer_size)
507{ 507{
508 return -ENODEV; 508 return -ENODEV;
509} 509}
@@ -512,7 +512,7 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp,
512struct bus_type pci_bus_type = { 512struct bus_type pci_bus_type = {
513 .name = "pci", 513 .name = "pci",
514 .match = pci_bus_match, 514 .match = pci_bus_match,
515 .hotplug = pci_hotplug, 515 .uevent = pci_uevent,
516 .suspend = pci_device_suspend, 516 .suspend = pci_device_suspend,
517 .resume = pci_device_resume, 517 .resume = pci_device_resume,
518 .dev_attrs = pci_dev_attrs, 518 .dev_attrs = pci_dev_attrs,
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 6527b36c9a61..294849d24590 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -1,7 +1,7 @@
1/* Functions internal to the PCI core code */ 1/* Functions internal to the PCI core code */
2 2
3extern int pci_hotplug (struct device *dev, char **envp, int num_envp, 3extern int pci_uevent(struct device *dev, char **envp, int num_envp,
4 char *buffer, int buffer_size); 4 char *buffer, int buffer_size);
5extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); 5extern int pci_create_sysfs_dev_files(struct pci_dev *pdev);
6extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); 6extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
7extern void pci_cleanup_rom(struct pci_dev *dev); 7extern void pci_cleanup_rom(struct pci_dev *dev);
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index a30aa74304a2..7cf09084ef61 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -901,14 +901,14 @@ int pcmcia_insert_card(struct pcmcia_socket *skt)
901EXPORT_SYMBOL(pcmcia_insert_card); 901EXPORT_SYMBOL(pcmcia_insert_card);
902 902
903 903
904static int pcmcia_socket_hotplug(struct class_device *dev, char **envp, 904static int pcmcia_socket_uevent(struct class_device *dev, char **envp,
905 int num_envp, char *buffer, int buffer_size) 905 int num_envp, char *buffer, int buffer_size)
906{ 906{
907 struct pcmcia_socket *s = container_of(dev, struct pcmcia_socket, dev); 907 struct pcmcia_socket *s = container_of(dev, struct pcmcia_socket, dev);
908 int i = 0, length = 0; 908 int i = 0, length = 0;
909 909
910 if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, 910 if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
911 &length, "SOCKET_NO=%u", s->sock)) 911 &length, "SOCKET_NO=%u", s->sock))
912 return -ENOMEM; 912 return -ENOMEM;
913 913
914 envp[i] = NULL; 914 envp[i] = NULL;
@@ -927,7 +927,7 @@ static void pcmcia_release_socket_class(struct class *data)
927 927
928struct class pcmcia_socket_class = { 928struct class pcmcia_socket_class = {
929 .name = "pcmcia_socket", 929 .name = "pcmcia_socket",
930 .hotplug = pcmcia_socket_hotplug, 930 .uevent = pcmcia_socket_uevent,
931 .release = pcmcia_release_socket, 931 .release = pcmcia_release_socket,
932 .class_release = pcmcia_release_socket_class, 932 .class_release = pcmcia_release_socket_class,
933}; 933};
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 7f8219f3fd9e..6fb76399547e 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -779,8 +779,8 @@ static int pcmcia_bus_match(struct device * dev, struct device_driver * drv) {
779 779
780#ifdef CONFIG_HOTPLUG 780#ifdef CONFIG_HOTPLUG
781 781
782static int pcmcia_bus_hotplug(struct device *dev, char **envp, int num_envp, 782static int pcmcia_bus_uevent(struct device *dev, char **envp, int num_envp,
783 char *buffer, int buffer_size) 783 char *buffer, int buffer_size)
784{ 784{
785 struct pcmcia_device *p_dev; 785 struct pcmcia_device *p_dev;
786 int i, length = 0; 786 int i, length = 0;
@@ -800,31 +800,31 @@ static int pcmcia_bus_hotplug(struct device *dev, char **envp, int num_envp,
800 800
801 i = 0; 801 i = 0;
802 802
803 if (add_hotplug_env_var(envp, num_envp, &i, 803 if (add_uevent_var(envp, num_envp, &i,
804 buffer, buffer_size, &length, 804 buffer, buffer_size, &length,
805 "SOCKET_NO=%u", 805 "SOCKET_NO=%u",
806 p_dev->socket->sock)) 806 p_dev->socket->sock))
807 return -ENOMEM; 807 return -ENOMEM;
808 808
809 if (add_hotplug_env_var(envp, num_envp, &i, 809 if (add_uevent_var(envp, num_envp, &i,
810 buffer, buffer_size, &length, 810 buffer, buffer_size, &length,
811 "DEVICE_NO=%02X", 811 "DEVICE_NO=%02X",
812 p_dev->device_no)) 812 p_dev->device_no))
813 return -ENOMEM; 813 return -ENOMEM;
814 814
815 if (add_hotplug_env_var(envp, num_envp, &i, 815 if (add_uevent_var(envp, num_envp, &i,
816 buffer, buffer_size, &length, 816 buffer, buffer_size, &length,
817 "MODALIAS=pcmcia:m%04Xc%04Xf%02Xfn%02Xpfn%02X" 817 "MODALIAS=pcmcia:m%04Xc%04Xf%02Xfn%02Xpfn%02X"
818 "pa%08Xpb%08Xpc%08Xpd%08X", 818 "pa%08Xpb%08Xpc%08Xpd%08X",
819 p_dev->has_manf_id ? p_dev->manf_id : 0, 819 p_dev->has_manf_id ? p_dev->manf_id : 0,
820 p_dev->has_card_id ? p_dev->card_id : 0, 820 p_dev->has_card_id ? p_dev->card_id : 0,
821 p_dev->has_func_id ? p_dev->func_id : 0, 821 p_dev->has_func_id ? p_dev->func_id : 0,
822 p_dev->func, 822 p_dev->func,
823 p_dev->device_no, 823 p_dev->device_no,
824 hash[0], 824 hash[0],
825 hash[1], 825 hash[1],
826 hash[2], 826 hash[2],
827 hash[3])) 827 hash[3]))
828 return -ENOMEM; 828 return -ENOMEM;
829 829
830 envp[i] = NULL; 830 envp[i] = NULL;
@@ -834,7 +834,7 @@ static int pcmcia_bus_hotplug(struct device *dev, char **envp, int num_envp,
834 834
835#else 835#else
836 836
837static int pcmcia_bus_hotplug(struct device *dev, char **envp, int num_envp, 837static int pcmcia_bus_uevent(struct device *dev, char **envp, int num_envp,
838 char *buffer, int buffer_size) 838 char *buffer, int buffer_size)
839{ 839{
840 return -ENODEV; 840 return -ENODEV;
@@ -1223,7 +1223,7 @@ static struct class_interface pcmcia_bus_interface = {
1223 1223
1224struct bus_type pcmcia_bus_type = { 1224struct bus_type pcmcia_bus_type = {
1225 .name = "pcmcia", 1225 .name = "pcmcia",
1226 .hotplug = pcmcia_bus_hotplug, 1226 .uevent = pcmcia_bus_uevent,
1227 .match = pcmcia_bus_match, 1227 .match = pcmcia_bus_match,
1228 .dev_attrs = pcmcia_dev_attrs, 1228 .dev_attrs = pcmcia_dev_attrs,
1229}; 1229};
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index bf44a409ba0d..07ddf9a38758 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -2132,7 +2132,7 @@ restart:
2132 } 2132 }
2133 2133
2134 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); 2134 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
2135 kobject_hotplug(&ioa_cfg->host->shost_classdev.kobj, KOBJ_CHANGE); 2135 kobject_uevent(&ioa_cfg->host->shost_classdev.kobj, KOBJ_CHANGE);
2136 LEAVE; 2136 LEAVE;
2137} 2137}
2138 2138
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index e80ef9467825..af2f0941baac 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -363,8 +363,7 @@ void usb_driver_release_interface(struct usb_driver *driver,
363 * Most USB device drivers will use this indirectly, through the usb core, 363 * Most USB device drivers will use this indirectly, through the usb core,
364 * but some layered driver frameworks use it directly. 364 * but some layered driver frameworks use it directly.
365 * These device tables are exported with MODULE_DEVICE_TABLE, through 365 * These device tables are exported with MODULE_DEVICE_TABLE, through
366 * modutils and "modules.usbmap", to support the driver loading 366 * modutils, to support the driver loading functionality of USB hotplugging.
367 * functionality of USB hotplugging.
368 * 367 *
369 * What Matches: 368 * What Matches:
370 * 369 *
@@ -545,10 +544,7 @@ static int usb_device_match (struct device *dev, struct device_driver *drv)
545#ifdef CONFIG_HOTPLUG 544#ifdef CONFIG_HOTPLUG
546 545
547/* 546/*
548 * USB hotplugging invokes what /proc/sys/kernel/hotplug says 547 * This sends an uevent to userspace, typically helping to load driver
549 * (normally /sbin/hotplug) when USB devices get added or removed.
550 *
551 * This invokes a user mode policy agent, typically helping to load driver
552 * or other modules, configure the device, and more. Drivers can provide 548 * or other modules, configure the device, and more. Drivers can provide
553 * a MODULE_DEVICE_TABLE to help with module loading subtasks. 549 * a MODULE_DEVICE_TABLE to help with module loading subtasks.
554 * 550 *
@@ -557,8 +553,8 @@ static int usb_device_match (struct device *dev, struct device_driver *drv)
557 * delays in event delivery. Use sysfs (and DEVPATH) to make sure the 553 * delays in event delivery. Use sysfs (and DEVPATH) to make sure the
558 * device (and this configuration!) are still present. 554 * device (and this configuration!) are still present.
559 */ 555 */
560static int usb_hotplug (struct device *dev, char **envp, int num_envp, 556static int usb_uevent(struct device *dev, char **envp, int num_envp,
561 char *buffer, int buffer_size) 557 char *buffer, int buffer_size)
562{ 558{
563 struct usb_interface *intf; 559 struct usb_interface *intf;
564 struct usb_device *usb_dev; 560 struct usb_device *usb_dev;
@@ -570,7 +566,7 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
570 return -ENODEV; 566 return -ENODEV;
571 567
572 /* driver is often null here; dev_dbg() would oops */ 568 /* driver is often null here; dev_dbg() would oops */
573 pr_debug ("usb %s: hotplug\n", dev->bus_id); 569 pr_debug ("usb %s: uevent\n", dev->bus_id);
574 570
575 /* Must check driver_data here, as on remove driver is always NULL */ 571 /* Must check driver_data here, as on remove driver is always NULL */
576 if ((dev->driver == &usb_generic_driver) || 572 if ((dev->driver == &usb_generic_driver) ||
@@ -597,51 +593,51 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
597 * 593 *
598 * FIXME reduce hardwired intelligence here 594 * FIXME reduce hardwired intelligence here
599 */ 595 */
600 if (add_hotplug_env_var(envp, num_envp, &i, 596 if (add_uevent_var(envp, num_envp, &i,
601 buffer, buffer_size, &length, 597 buffer, buffer_size, &length,
602 "DEVICE=/proc/bus/usb/%03d/%03d", 598 "DEVICE=/proc/bus/usb/%03d/%03d",
603 usb_dev->bus->busnum, usb_dev->devnum)) 599 usb_dev->bus->busnum, usb_dev->devnum))
604 return -ENOMEM; 600 return -ENOMEM;
605#endif 601#endif
606 602
607 /* per-device configurations are common */ 603 /* per-device configurations are common */
608 if (add_hotplug_env_var(envp, num_envp, &i, 604 if (add_uevent_var(envp, num_envp, &i,
609 buffer, buffer_size, &length, 605 buffer, buffer_size, &length,
610 "PRODUCT=%x/%x/%x", 606 "PRODUCT=%x/%x/%x",
611 le16_to_cpu(usb_dev->descriptor.idVendor), 607 le16_to_cpu(usb_dev->descriptor.idVendor),
612 le16_to_cpu(usb_dev->descriptor.idProduct), 608 le16_to_cpu(usb_dev->descriptor.idProduct),
613 le16_to_cpu(usb_dev->descriptor.bcdDevice))) 609 le16_to_cpu(usb_dev->descriptor.bcdDevice)))
614 return -ENOMEM; 610 return -ENOMEM;
615 611
616 /* class-based driver binding models */ 612 /* class-based driver binding models */
617 if (add_hotplug_env_var(envp, num_envp, &i, 613 if (add_uevent_var(envp, num_envp, &i,
618 buffer, buffer_size, &length, 614 buffer, buffer_size, &length,
619 "TYPE=%d/%d/%d", 615 "TYPE=%d/%d/%d",
620 usb_dev->descriptor.bDeviceClass, 616 usb_dev->descriptor.bDeviceClass,
621 usb_dev->descriptor.bDeviceSubClass, 617 usb_dev->descriptor.bDeviceSubClass,
622 usb_dev->descriptor.bDeviceProtocol)) 618 usb_dev->descriptor.bDeviceProtocol))
623 return -ENOMEM; 619 return -ENOMEM;
624 620
625 if (add_hotplug_env_var(envp, num_envp, &i, 621 if (add_uevent_var(envp, num_envp, &i,
626 buffer, buffer_size, &length, 622 buffer, buffer_size, &length,
627 "INTERFACE=%d/%d/%d", 623 "INTERFACE=%d/%d/%d",
628 alt->desc.bInterfaceClass, 624 alt->desc.bInterfaceClass,
629 alt->desc.bInterfaceSubClass, 625 alt->desc.bInterfaceSubClass,
630 alt->desc.bInterfaceProtocol)) 626 alt->desc.bInterfaceProtocol))
631 return -ENOMEM; 627 return -ENOMEM;
632 628
633 if (add_hotplug_env_var(envp, num_envp, &i, 629 if (add_uevent_var(envp, num_envp, &i,
634 buffer, buffer_size, &length, 630 buffer, buffer_size, &length,
635 "MODALIAS=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X", 631 "MODALIAS=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X",
636 le16_to_cpu(usb_dev->descriptor.idVendor), 632 le16_to_cpu(usb_dev->descriptor.idVendor),
637 le16_to_cpu(usb_dev->descriptor.idProduct), 633 le16_to_cpu(usb_dev->descriptor.idProduct),
638 le16_to_cpu(usb_dev->descriptor.bcdDevice), 634 le16_to_cpu(usb_dev->descriptor.bcdDevice),
639 usb_dev->descriptor.bDeviceClass, 635 usb_dev->descriptor.bDeviceClass,
640 usb_dev->descriptor.bDeviceSubClass, 636 usb_dev->descriptor.bDeviceSubClass,
641 usb_dev->descriptor.bDeviceProtocol, 637 usb_dev->descriptor.bDeviceProtocol,
642 alt->desc.bInterfaceClass, 638 alt->desc.bInterfaceClass,
643 alt->desc.bInterfaceSubClass, 639 alt->desc.bInterfaceSubClass,
644 alt->desc.bInterfaceProtocol)) 640 alt->desc.bInterfaceProtocol))
645 return -ENOMEM; 641 return -ENOMEM;
646 642
647 envp[i] = NULL; 643 envp[i] = NULL;
@@ -651,7 +647,7 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
651 647
652#else 648#else
653 649
654static int usb_hotplug (struct device *dev, char **envp, 650static int usb_uevent(struct device *dev, char **envp,
655 int num_envp, char *buffer, int buffer_size) 651 int num_envp, char *buffer, int buffer_size)
656{ 652{
657 return -ENODEV; 653 return -ENODEV;
@@ -1491,7 +1487,7 @@ static int usb_generic_resume(struct device *dev)
1491struct bus_type usb_bus_type = { 1487struct bus_type usb_bus_type = {
1492 .name = "usb", 1488 .name = "usb",
1493 .match = usb_device_match, 1489 .match = usb_device_match,
1494 .hotplug = usb_hotplug, 1490 .uevent = usb_uevent,
1495 .suspend = usb_generic_suspend, 1491 .suspend = usb_generic_suspend,
1496 .resume = usb_generic_resume, 1492 .resume = usb_generic_resume,
1497}; 1493};
diff --git a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c
index 0eaabeb37ac3..641268d7e6f3 100644
--- a/drivers/usb/host/hc_crisv10.c
+++ b/drivers/usb/host/hc_crisv10.c
@@ -4397,7 +4397,7 @@ static int __init etrax_usb_hc_init(void)
4397 device_initialize(&fake_device); 4397 device_initialize(&fake_device);
4398 kobject_set_name(&fake_device.kobj, "etrax_usb"); 4398 kobject_set_name(&fake_device.kobj, "etrax_usb");
4399 kobject_add(&fake_device.kobj); 4399 kobject_add(&fake_device.kobj);
4400 kobject_hotplug(&fake_device.kobj, KOBJ_ADD); 4400 kobject_uevent(&fake_device.kobj, KOBJ_ADD);
4401 hc->bus->controller = &fake_device; 4401 hc->bus->controller = &fake_device;
4402 usb_register_bus(hc->bus); 4402 usb_register_bus(hc->bus);
4403 4403
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 14016b1cd948..024206c4a0e4 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -142,12 +142,12 @@ static struct bin_attribute w1_slave_attr_bin_id = {
142/* Default family */ 142/* Default family */
143static struct w1_family w1_default_family; 143static struct w1_family w1_default_family;
144 144
145static int w1_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size); 145static int w1_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size);
146 146
147static struct bus_type w1_bus_type = { 147static struct bus_type w1_bus_type = {
148 .name = "w1", 148 .name = "w1",
149 .match = w1_master_match, 149 .match = w1_master_match,
150 .hotplug = w1_hotplug, 150 .uevent = w1_uevent,
151}; 151};
152 152
153struct device_driver w1_master_driver = { 153struct device_driver w1_master_driver = {
@@ -361,7 +361,7 @@ void w1_destroy_master_attributes(struct w1_master *master)
361} 361}
362 362
363#ifdef CONFIG_HOTPLUG 363#ifdef CONFIG_HOTPLUG
364static int w1_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) 364static int w1_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size)
365{ 365{
366 struct w1_master *md = NULL; 366 struct w1_master *md = NULL;
367 struct w1_slave *sl = NULL; 367 struct w1_slave *sl = NULL;
@@ -377,7 +377,7 @@ static int w1_hotplug(struct device *dev, char **envp, int num_envp, char *buffe
377 event_owner = "slave"; 377 event_owner = "slave";
378 name = sl->name; 378 name = sl->name;
379 } else { 379 } else {
380 dev_dbg(dev, "Unknown hotplug event.\n"); 380 dev_dbg(dev, "Unknown event.\n");
381 return -EINVAL; 381 return -EINVAL;
382 } 382 }
383 383
@@ -386,18 +386,18 @@ static int w1_hotplug(struct device *dev, char **envp, int num_envp, char *buffe
386 if (dev->driver != &w1_slave_driver || !sl) 386 if (dev->driver != &w1_slave_driver || !sl)
387 return 0; 387 return 0;
388 388
389 err = add_hotplug_env_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_FID=%02X", sl->reg_num.family); 389 err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_FID=%02X", sl->reg_num.family);
390 if (err) 390 if (err)
391 return err; 391 return err;
392 392
393 err = add_hotplug_env_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_SLAVE_ID=%024LX", (u64)sl->reg_num.id); 393 err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_SLAVE_ID=%024LX", (u64)sl->reg_num.id);
394 if (err) 394 if (err)
395 return err; 395 return err;
396 396
397 return 0; 397 return 0;
398}; 398};
399#else 399#else
400static int w1_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) 400static int w1_uevent(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size)
401{ 401{
402 return 0; 402 return 0;
403} 403}