aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/powerpc/eeh-pci-error-recovery.txt31
-rw-r--r--arch/powerpc/kernel/vio.c2
-rw-r--r--block/genhd.c48
-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
-rw-r--r--fs/partitions/check.c6
-rw-r--r--include/linux/device.h14
-rw-r--r--include/linux/firmware.h2
-rw-r--r--include/linux/kobject.h40
-rw-r--r--include/linux/sysctl.h2
-rw-r--r--include/linux/usb.h2
-rw-r--r--kernel/ksysfs.c14
-rw-r--r--kernel/sysctl.c4
-rw-r--r--lib/kobject.c4
-rw-r--r--lib/kobject_uevent.c64
-rw-r--r--net/bluetooth/hci_sysfs.c4
-rw-r--r--net/bridge/br_sysfs_if.c4
-rw-r--r--net/core/net-sysfs.c8
40 files changed, 372 insertions, 378 deletions
diff --git a/Documentation/powerpc/eeh-pci-error-recovery.txt b/Documentation/powerpc/eeh-pci-error-recovery.txt
index e75d7474322c..67a11a36270c 100644
--- a/Documentation/powerpc/eeh-pci-error-recovery.txt
+++ b/Documentation/powerpc/eeh-pci-error-recovery.txt
@@ -115,7 +115,7 @@ Current PPC64 Linux EEH Implementation
115At this time, a generic EEH recovery mechanism has been implemented, 115At this time, a generic EEH recovery mechanism has been implemented,
116so that individual device drivers do not need to be modified to support 116so that individual device drivers do not need to be modified to support
117EEH recovery. This generic mechanism piggy-backs on the PCI hotplug 117EEH recovery. This generic mechanism piggy-backs on the PCI hotplug
118infrastructure, and percolates events up through the hotplug/udev 118infrastructure, and percolates events up through the userspace/udev
119infrastructure. Followiing is a detailed description of how this is 119infrastructure. Followiing is a detailed description of how this is
120accomplished. 120accomplished.
121 121
@@ -172,7 +172,7 @@ A handler for the EEH notifier_block events is implemented in
172drivers/pci/hotplug/pSeries_pci.c, called handle_eeh_events(). 172drivers/pci/hotplug/pSeries_pci.c, called handle_eeh_events().
173It saves the device BAR's and then calls rpaphp_unconfig_pci_adapter(). 173It saves the device BAR's and then calls rpaphp_unconfig_pci_adapter().
174This last call causes the device driver for the card to be stopped, 174This last call causes the device driver for the card to be stopped,
175which causes hotplug events to go out to user space. This triggers 175which causes uevents to go out to user space. This triggers
176user-space scripts that might issue commands such as "ifdown eth0" 176user-space scripts that might issue commands such as "ifdown eth0"
177for ethernet cards, and so on. This handler then sleeps for 5 seconds, 177for ethernet cards, and so on. This handler then sleeps for 5 seconds,
178hoping to give the user-space scripts enough time to complete. 178hoping to give the user-space scripts enough time to complete.
@@ -258,29 +258,30 @@ rpa_php_unconfig_pci_adapter() { // in rpaphp_pci.c
258 calls 258 calls
259 pci_destroy_dev (struct pci_dev *) { 259 pci_destroy_dev (struct pci_dev *) {
260 calls 260 calls
261 device_unregister (&dev->dev) { // in /drivers/base/core.c 261 device_unregister (&dev->dev) { // in /drivers/base/core.c
262 calls 262 calls
263 device_del(struct device * dev) { // in /drivers/base/core.c 263 device_del(struct device * dev) { // in /drivers/base/core.c
264 calls 264 calls
265 kobject_del() { //in /libs/kobject.c 265 kobject_del() { //in /libs/kobject.c
266 calls 266 calls
267 kobject_hotplug() { // in /libs/kobject.c 267 kobject_uevent() { // in /libs/kobject.c
268 calls 268 calls
269 kset_hotplug() { // in /lib/kobject.c 269 kset_uevent() { // in /lib/kobject.c
270 calls 270 calls
271 kset->hotplug_ops->hotplug() which is really just 271 kset->uevent_ops->uevent() // which is really just
272 a call to 272 a call to
273 dev_hotplug() { // in /drivers/base/core.c 273 dev_uevent() { // in /drivers/base/core.c
274 calls 274 calls
275 dev->bus->hotplug() which is really just a call to 275 dev->bus->uevent() which is really just a call to
276 pci_hotplug () { // in drivers/pci/hotplug.c 276 pci_uevent () { // in drivers/pci/hotplug.c
277 which prints device name, etc.... 277 which prints device name, etc....
278 } 278 }
279 } 279 }
280 then kset_hotplug() calls 280 then kobject_uevent() sends a netlink uevent to userspace
281 call_usermodehelper () with 281 --> userspace uevent
282 argv[0]=hotplug_path[] which is "/sbin/hotplug" 282 (during early boot, nobody listens to netlink events and
283 --> event to userspace, 283 kobject_uevent() executes uevent_helper[], which runs the
284 event process /sbin/hotplug)
284 } 285 }
285 } 286 }
286 kobject_del() then calls sysfs_remove_dir(), which would 287 kobject_del() then calls sysfs_remove_dir(), which would
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 71a6addf9f7f..13c41495fe06 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -293,6 +293,6 @@ static int vio_hotplug(struct device *dev, char **envp, int num_envp,
293 293
294struct bus_type vio_bus_type = { 294struct bus_type vio_bus_type = {
295 .name = "vio", 295 .name = "vio",
296 .hotplug = vio_hotplug, 296 .uevent = vio_hotplug,
297 .match = vio_bus_match, 297 .match = vio_bus_match,
298}; 298};
diff --git a/block/genhd.c b/block/genhd.c
index f04609d553b8..f1ed83f3f083 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -358,7 +358,7 @@ static struct sysfs_ops disk_sysfs_ops = {
358static ssize_t disk_uevent_store(struct gendisk * disk, 358static ssize_t disk_uevent_store(struct gendisk * disk,
359 const char *buf, size_t count) 359 const char *buf, size_t count)
360{ 360{
361 kobject_hotplug(&disk->kobj, KOBJ_ADD); 361 kobject_uevent(&disk->kobj, KOBJ_ADD);
362 return count; 362 return count;
363} 363}
364static ssize_t disk_dev_read(struct gendisk * disk, char *page) 364static ssize_t disk_dev_read(struct gendisk * disk, char *page)
@@ -455,14 +455,14 @@ static struct kobj_type ktype_block = {
455 455
456extern struct kobj_type ktype_part; 456extern struct kobj_type ktype_part;
457 457
458static int block_hotplug_filter(struct kset *kset, struct kobject *kobj) 458static int block_uevent_filter(struct kset *kset, struct kobject *kobj)
459{ 459{
460 struct kobj_type *ktype = get_ktype(kobj); 460 struct kobj_type *ktype = get_ktype(kobj);
461 461
462 return ((ktype == &ktype_block) || (ktype == &ktype_part)); 462 return ((ktype == &ktype_block) || (ktype == &ktype_part));
463} 463}
464 464
465static int block_hotplug(struct kset *kset, struct kobject *kobj, char **envp, 465static int block_uevent(struct kset *kset, struct kobject *kobj, char **envp,
466 int num_envp, char *buffer, int buffer_size) 466 int num_envp, char *buffer, int buffer_size)
467{ 467{
468 struct kobj_type *ktype = get_ktype(kobj); 468 struct kobj_type *ktype = get_ktype(kobj);
@@ -474,40 +474,40 @@ static int block_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
474 474
475 if (ktype == &ktype_block) { 475 if (ktype == &ktype_block) {
476 disk = container_of(kobj, struct gendisk, kobj); 476 disk = container_of(kobj, struct gendisk, kobj);
477 add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, 477 add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
478 &length, "MINOR=%u", disk->first_minor); 478 &length, "MINOR=%u", disk->first_minor);
479 } else if (ktype == &ktype_part) { 479 } else if (ktype == &ktype_part) {
480 disk = container_of(kobj->parent, struct gendisk, kobj); 480 disk = container_of(kobj->parent, struct gendisk, kobj);
481 part = container_of(kobj, struct hd_struct, kobj); 481 part = container_of(kobj, struct hd_struct, kobj);
482 add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, 482 add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
483 &length, "MINOR=%u", 483 &length, "MINOR=%u",
484 disk->first_minor + part->partno); 484 disk->first_minor + part->partno);
485 } else 485 } else
486 return 0; 486 return 0;
487 487
488 add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &length, 488 add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
489 "MAJOR=%u", disk->major); 489 "MAJOR=%u", disk->major);
490 490
491 /* add physical device, backing this device */ 491 /* add physical device, backing this device */
492 physdev = disk->driverfs_dev; 492 physdev = disk->driverfs_dev;
493 if (physdev) { 493 if (physdev) {
494 char *path = kobject_get_path(&physdev->kobj, GFP_KERNEL); 494 char *path = kobject_get_path(&physdev->kobj, GFP_KERNEL);
495 495
496 add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, 496 add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
497 &length, "PHYSDEVPATH=%s", path); 497 &length, "PHYSDEVPATH=%s", path);
498 kfree(path); 498 kfree(path);
499 499
500 if (physdev->bus) 500 if (physdev->bus)
501 add_hotplug_env_var(envp, num_envp, &i, 501 add_uevent_var(envp, num_envp, &i,
502 buffer, buffer_size, &length, 502 buffer, buffer_size, &length,
503 "PHYSDEVBUS=%s", 503 "PHYSDEVBUS=%s",
504 physdev->bus->name); 504 physdev->bus->name);
505 505
506 if (physdev->driver) 506 if (physdev->driver)
507 add_hotplug_env_var(envp, num_envp, &i, 507 add_uevent_var(envp, num_envp, &i,
508 buffer, buffer_size, &length, 508 buffer, buffer_size, &length,
509 "PHYSDEVDRIVER=%s", 509 "PHYSDEVDRIVER=%s",
510 physdev->driver->name); 510 physdev->driver->name);
511 } 511 }
512 512
513 /* terminate, set to next free slot, shrink available space */ 513 /* terminate, set to next free slot, shrink available space */
@@ -520,13 +520,13 @@ static int block_hotplug(struct kset *kset, struct kobject *kobj, char **envp,
520 return 0; 520 return 0;
521} 521}
522 522
523static struct kset_hotplug_ops block_hotplug_ops = { 523static struct kset_uevent_ops block_uevent_ops = {
524 .filter = block_hotplug_filter, 524 .filter = block_uevent_filter,
525 .hotplug = block_hotplug, 525 .uevent = block_uevent,
526}; 526};
527 527
528/* declare block_subsys. */ 528/* declare block_subsys. */
529static decl_subsys(block, &ktype_block, &block_hotplug_ops); 529static decl_subsys(block, &ktype_block, &block_uevent_ops);
530 530
531 531
532/* 532/*
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}
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index 8dc1822a7022..7187a57d51e8 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -226,7 +226,7 @@ static struct sysfs_ops part_sysfs_ops = {
226static ssize_t part_uevent_store(struct hd_struct * p, 226static ssize_t part_uevent_store(struct hd_struct * p,
227 const char *page, size_t count) 227 const char *page, size_t count)
228{ 228{
229 kobject_hotplug(&p->kobj, KOBJ_ADD); 229 kobject_uevent(&p->kobj, KOBJ_ADD);
230 return count; 230 return count;
231} 231}
232static ssize_t part_dev_read(struct hd_struct * p, char *page) 232static ssize_t part_dev_read(struct hd_struct * p, char *page)
@@ -360,7 +360,7 @@ void register_disk(struct gendisk *disk)
360 if ((err = kobject_add(&disk->kobj))) 360 if ((err = kobject_add(&disk->kobj)))
361 return; 361 return;
362 disk_sysfs_symlinks(disk); 362 disk_sysfs_symlinks(disk);
363 kobject_hotplug(&disk->kobj, KOBJ_ADD); 363 kobject_uevent(&disk->kobj, KOBJ_ADD);
364 364
365 /* No minors to use for partitions */ 365 /* No minors to use for partitions */
366 if (disk->minors == 1) { 366 if (disk->minors == 1) {
@@ -465,6 +465,6 @@ void del_gendisk(struct gendisk *disk)
465 sysfs_remove_link(&disk->driverfs_dev->kobj, "block"); 465 sysfs_remove_link(&disk->driverfs_dev->kobj, "block");
466 put_device(disk->driverfs_dev); 466 put_device(disk->driverfs_dev);
467 } 467 }
468 kobject_hotplug(&disk->kobj, KOBJ_REMOVE); 468 kobject_uevent(&disk->kobj, KOBJ_REMOVE);
469 kobject_del(&disk->kobj); 469 kobject_del(&disk->kobj);
470} 470}
diff --git a/include/linux/device.h b/include/linux/device.h
index 17cbc6db67b4..0cdee78e5ce1 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -47,8 +47,8 @@ struct bus_type {
47 struct driver_attribute * drv_attrs; 47 struct driver_attribute * drv_attrs;
48 48
49 int (*match)(struct device * dev, struct device_driver * drv); 49 int (*match)(struct device * dev, struct device_driver * drv);
50 int (*hotplug) (struct device *dev, char **envp, 50 int (*uevent)(struct device *dev, char **envp,
51 int num_envp, char *buffer, int buffer_size); 51 int num_envp, char *buffer, int buffer_size);
52 int (*suspend)(struct device * dev, pm_message_t state); 52 int (*suspend)(struct device * dev, pm_message_t state);
53 int (*resume)(struct device * dev); 53 int (*resume)(struct device * dev);
54}; 54};
@@ -151,7 +151,7 @@ struct class {
151 struct class_attribute * class_attrs; 151 struct class_attribute * class_attrs;
152 struct class_device_attribute * class_dev_attrs; 152 struct class_device_attribute * class_dev_attrs;
153 153
154 int (*hotplug)(struct class_device *dev, char **envp, 154 int (*uevent)(struct class_device *dev, char **envp,
155 int num_envp, char *buffer, int buffer_size); 155 int num_envp, char *buffer, int buffer_size);
156 156
157 void (*release)(struct class_device *dev); 157 void (*release)(struct class_device *dev);
@@ -209,9 +209,9 @@ extern int class_device_create_file(struct class_device *,
209 * set, this will be called instead of the class specific release function. 209 * set, this will be called instead of the class specific release function.
210 * Only use this if you want to override the default release function, like 210 * Only use this if you want to override the default release function, like
211 * when you are nesting class_device structures. 211 * when you are nesting class_device structures.
212 * @hotplug: pointer to a hotplug function for this struct class_device. If 212 * @uevent: pointer to a uevent function for this struct class_device. If
213 * set, this will be called instead of the class specific hotplug function. 213 * set, this will be called instead of the class specific uevent function.
214 * Only use this if you want to override the default hotplug function, like 214 * Only use this if you want to override the default uevent function, like
215 * when you are nesting class_device structures. 215 * when you are nesting class_device structures.
216 */ 216 */
217struct class_device { 217struct class_device {
@@ -227,7 +227,7 @@ struct class_device {
227 struct class_device *parent; /* parent of this child device, if there is one */ 227 struct class_device *parent; /* parent of this child device, if there is one */
228 228
229 void (*release)(struct class_device *dev); 229 void (*release)(struct class_device *dev);
230 int (*hotplug)(struct class_device *dev, char **envp, 230 int (*uevent)(struct class_device *dev, char **envp,
231 int num_envp, char *buffer, int buffer_size); 231 int num_envp, char *buffer, int buffer_size);
232 char class_id[BUS_ID_SIZE]; /* unique to this class */ 232 char class_id[BUS_ID_SIZE]; /* unique to this class */
233}; 233};
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 2063c0839d4f..2d716080be4a 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -14,7 +14,7 @@ struct device;
14int request_firmware(const struct firmware **fw, const char *name, 14int request_firmware(const struct firmware **fw, const char *name,
15 struct device *device); 15 struct device *device);
16int request_firmware_nowait( 16int request_firmware_nowait(
17 struct module *module, int hotplug, 17 struct module *module, int uevent,
18 const char *name, struct device *device, void *context, 18 const char *name, struct device *device, void *context,
19 void (*cont)(const struct firmware *fw, void *context)); 19 void (*cont)(const struct firmware *fw, void *context));
20 20
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 5b08248fba72..8eb21f2f25e1 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -26,15 +26,14 @@
26#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <asm/atomic.h> 27#include <asm/atomic.h>
28 28
29#define KOBJ_NAME_LEN 20 29#define KOBJ_NAME_LEN 20
30 30#define UEVENT_HELPER_PATH_LEN 256
31#define HOTPLUG_PATH_LEN 256
32 31
33/* path to the userspace helper executed on an event */ 32/* path to the userspace helper executed on an event */
34extern char hotplug_path[]; 33extern char uevent_helper[];
35 34
36/* counter to tag the hotplug event, read only except for the kobject core */ 35/* counter to tag the uevent, read only except for the kobject core */
37extern u64 hotplug_seqnum; 36extern u64 uevent_seqnum;
38 37
39/* the actions here must match the proper string in lib/kobject_uevent.c */ 38/* the actions here must match the proper string in lib/kobject_uevent.c */
40typedef int __bitwise kobject_action_t; 39typedef int __bitwise kobject_action_t;
@@ -101,15 +100,14 @@ struct kobj_type {
101 * of object; multiple ksets can belong to one subsystem. All 100 * of object; multiple ksets can belong to one subsystem. All
102 * ksets of a subsystem share the subsystem's lock. 101 * ksets of a subsystem share the subsystem's lock.
103 * 102 *
104 * Each kset can support hotplugging; if it does, it will be given 103 * Each kset can support specific event variables; it can
105 * the opportunity to filter out specific kobjects from being 104 * supress the event generation or add subsystem specific
106 * reported, as well as to add its own "data" elements to the 105 * variables carried with the event.
107 * environment being passed to the hotplug helper.
108 */ 106 */
109struct kset_hotplug_ops { 107struct kset_uevent_ops {
110 int (*filter)(struct kset *kset, struct kobject *kobj); 108 int (*filter)(struct kset *kset, struct kobject *kobj);
111 const char *(*name)(struct kset *kset, struct kobject *kobj); 109 const char *(*name)(struct kset *kset, struct kobject *kobj);
112 int (*hotplug)(struct kset *kset, struct kobject *kobj, char **envp, 110 int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp,
113 int num_envp, char *buffer, int buffer_size); 111 int num_envp, char *buffer, int buffer_size);
114}; 112};
115 113
@@ -119,7 +117,7 @@ struct kset {
119 struct list_head list; 117 struct list_head list;
120 spinlock_t list_lock; 118 spinlock_t list_lock;
121 struct kobject kobj; 119 struct kobject kobj;
122 struct kset_hotplug_ops * hotplug_ops; 120 struct kset_uevent_ops * uevent_ops;
123}; 121};
124 122
125 123
@@ -167,20 +165,20 @@ struct subsystem {
167 struct rw_semaphore rwsem; 165 struct rw_semaphore rwsem;
168}; 166};
169 167
170#define decl_subsys(_name,_type,_hotplug_ops) \ 168#define decl_subsys(_name,_type,_uevent_ops) \
171struct subsystem _name##_subsys = { \ 169struct subsystem _name##_subsys = { \
172 .kset = { \ 170 .kset = { \
173 .kobj = { .name = __stringify(_name) }, \ 171 .kobj = { .name = __stringify(_name) }, \
174 .ktype = _type, \ 172 .ktype = _type, \
175 .hotplug_ops =_hotplug_ops, \ 173 .uevent_ops =_uevent_ops, \
176 } \ 174 } \
177} 175}
178#define decl_subsys_name(_varname,_name,_type,_hotplug_ops) \ 176#define decl_subsys_name(_varname,_name,_type,_uevent_ops) \
179struct subsystem _varname##_subsys = { \ 177struct subsystem _varname##_subsys = { \
180 .kset = { \ 178 .kset = { \
181 .kobj = { .name = __stringify(_name) }, \ 179 .kobj = { .name = __stringify(_name) }, \
182 .ktype = _type, \ 180 .ktype = _type, \
183 .hotplug_ops =_hotplug_ops, \ 181 .uevent_ops =_uevent_ops, \
184 } \ 182 } \
185} 183}
186 184
@@ -256,16 +254,16 @@ extern int subsys_create_file(struct subsystem * , struct subsys_attribute *);
256extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *); 254extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *);
257 255
258#ifdef CONFIG_HOTPLUG 256#ifdef CONFIG_HOTPLUG
259void kobject_hotplug(struct kobject *kobj, enum kobject_action action); 257void kobject_uevent(struct kobject *kobj, enum kobject_action action);
260 258
261int add_hotplug_env_var(char **envp, int num_envp, int *cur_index, 259int add_uevent_var(char **envp, int num_envp, int *cur_index,
262 char *buffer, int buffer_size, int *cur_len, 260 char *buffer, int buffer_size, int *cur_len,
263 const char *format, ...) 261 const char *format, ...)
264 __attribute__((format (printf, 7, 8))); 262 __attribute__((format (printf, 7, 8)));
265#else 263#else
266static inline void kobject_hotplug(struct kobject *kobj, enum kobject_action action) { } 264static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
267 265
268static inline int add_hotplug_env_var(char **envp, int num_envp, int *cur_index, 266static inline int add_uevent_var(char **envp, int num_envp, int *cur_index,
269 char *buffer, int buffer_size, int *cur_len, 267 char *buffer, int buffer_size, int *cur_len,
270 const char *format, ...) 268 const char *format, ...)
271{ return 0; } 269{ return 0; }
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 4be34ef8c2f7..501564264518 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -124,7 +124,7 @@ enum
124 KERN_OVERFLOWUID=46, /* int: overflow UID */ 124 KERN_OVERFLOWUID=46, /* int: overflow UID */
125 KERN_OVERFLOWGID=47, /* int: overflow GID */ 125 KERN_OVERFLOWGID=47, /* int: overflow GID */
126 KERN_SHMPATH=48, /* string: path to shm fs */ 126 KERN_SHMPATH=48, /* string: path to shm fs */
127 KERN_HOTPLUG=49, /* string: path to hotplug policy agent */ 127 KERN_HOTPLUG=49, /* string: path to uevent helper (deprecated) */
128 KERN_IEEE_EMULATION_WARNINGS=50, /* int: unimplemented ieee instructions */ 128 KERN_IEEE_EMULATION_WARNINGS=50, /* int: unimplemented ieee instructions */
129 KERN_S390_USER_DEBUG_LOGGING=51, /* int: dumps of user faults */ 129 KERN_S390_USER_DEBUG_LOGGING=51, /* int: dumps of user faults */
130 KERN_CORE_USES_PID=52, /* int: use core or core.%pid */ 130 KERN_CORE_USES_PID=52, /* int: use core or core.%pid */
diff --git a/include/linux/usb.h b/include/linux/usb.h
index d81b050e5955..7a20997e8071 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -225,7 +225,7 @@ struct usb_interface_cache {
225 * Device drivers should not attempt to activate configurations. The choice 225 * Device drivers should not attempt to activate configurations. The choice
226 * of which configuration to install is a policy decision based on such 226 * of which configuration to install is a policy decision based on such
227 * considerations as available power, functionality provided, and the user's 227 * considerations as available power, functionality provided, and the user's
228 * desires (expressed through hotplug scripts). However, drivers can call 228 * desires (expressed through userspace tools). However, drivers can call
229 * usb_reset_configuration() to reinitialize the current configuration and 229 * usb_reset_configuration() to reinitialize the current configuration and
230 * all its interfaces. 230 * all its interfaces.
231 */ 231 */
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index e975a76a9d5b..bfb4a7a54e22 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -26,23 +26,23 @@ static struct subsys_attribute _name##_attr = \
26/* current uevent sequence number */ 26/* current uevent sequence number */
27static ssize_t uevent_seqnum_show(struct subsystem *subsys, char *page) 27static ssize_t uevent_seqnum_show(struct subsystem *subsys, char *page)
28{ 28{
29 return sprintf(page, "%llu\n", (unsigned long long)hotplug_seqnum); 29 return sprintf(page, "%llu\n", (unsigned long long)uevent_seqnum);
30} 30}
31KERNEL_ATTR_RO(uevent_seqnum); 31KERNEL_ATTR_RO(uevent_seqnum);
32 32
33/* uevent helper program, used during early boo */ 33/* uevent helper program, used during early boo */
34static ssize_t uevent_helper_show(struct subsystem *subsys, char *page) 34static ssize_t uevent_helper_show(struct subsystem *subsys, char *page)
35{ 35{
36 return sprintf(page, "%s\n", hotplug_path); 36 return sprintf(page, "%s\n", uevent_helper);
37} 37}
38static ssize_t uevent_helper_store(struct subsystem *subsys, const char *page, size_t count) 38static ssize_t uevent_helper_store(struct subsystem *subsys, const char *page, size_t count)
39{ 39{
40 if (count+1 > HOTPLUG_PATH_LEN) 40 if (count+1 > UEVENT_HELPER_PATH_LEN)
41 return -ENOENT; 41 return -ENOENT;
42 memcpy(hotplug_path, page, count); 42 memcpy(uevent_helper, page, count);
43 hotplug_path[count] = '\0'; 43 uevent_helper[count] = '\0';
44 if (count && hotplug_path[count-1] == '\n') 44 if (count && uevent_helper[count-1] == '\n')
45 hotplug_path[count-1] = '\0'; 45 uevent_helper[count-1] = '\0';
46 return count; 46 return count;
47} 47}
48KERNEL_ATTR_RW(uevent_helper); 48KERNEL_ATTR_RW(uevent_helper);
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 6a51e25d4466..345f4a1d533f 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -395,8 +395,8 @@ static ctl_table kern_table[] = {
395 { 395 {
396 .ctl_name = KERN_HOTPLUG, 396 .ctl_name = KERN_HOTPLUG,
397 .procname = "hotplug", 397 .procname = "hotplug",
398 .data = &hotplug_path, 398 .data = &uevent_helper,
399 .maxlen = HOTPLUG_PATH_LEN, 399 .maxlen = UEVENT_HELPER_PATH_LEN,
400 .mode = 0644, 400 .mode = 0644,
401 .proc_handler = &proc_dostring, 401 .proc_handler = &proc_dostring,
402 .strategy = &sysctl_string, 402 .strategy = &sysctl_string,
diff --git a/lib/kobject.c b/lib/kobject.c
index a181abed89f6..7a0e6809490d 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -207,7 +207,7 @@ int kobject_register(struct kobject * kobj)
207 kobject_name(kobj),error); 207 kobject_name(kobj),error);
208 dump_stack(); 208 dump_stack();
209 } else 209 } else
210 kobject_hotplug(kobj, KOBJ_ADD); 210 kobject_uevent(kobj, KOBJ_ADD);
211 } else 211 } else
212 error = -EINVAL; 212 error = -EINVAL;
213 return error; 213 return error;
@@ -312,7 +312,7 @@ void kobject_del(struct kobject * kobj)
312void kobject_unregister(struct kobject * kobj) 312void kobject_unregister(struct kobject * kobj)
313{ 313{
314 pr_debug("kobject %s: unregistering\n",kobject_name(kobj)); 314 pr_debug("kobject %s: unregistering\n",kobject_name(kobj));
315 kobject_hotplug(kobj, KOBJ_REMOVE); 315 kobject_uevent(kobj, KOBJ_REMOVE);
316 kobject_del(kobj); 316 kobject_del(kobj);
317 kobject_put(kobj); 317 kobject_put(kobj);
318} 318}
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index dd061da3aba9..01479e5c6d18 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -22,12 +22,12 @@
22#include <linux/kobject.h> 22#include <linux/kobject.h>
23#include <net/sock.h> 23#include <net/sock.h>
24 24
25#define BUFFER_SIZE 1024 /* buffer for the hotplug env */ 25#define BUFFER_SIZE 1024 /* buffer for the variables */
26#define NUM_ENVP 32 /* number of env pointers */ 26#define NUM_ENVP 32 /* number of env pointers */
27 27
28#if defined(CONFIG_HOTPLUG) 28#if defined(CONFIG_HOTPLUG)
29char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug"; 29char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug";
30u64 hotplug_seqnum; 30u64 uevent_seqnum;
31static DEFINE_SPINLOCK(sequence_lock); 31static DEFINE_SPINLOCK(sequence_lock);
32static struct sock *uevent_sock; 32static struct sock *uevent_sock;
33 33
@@ -50,12 +50,12 @@ static char *action_to_string(enum kobject_action action)
50} 50}
51 51
52/** 52/**
53 * kobject_hotplug - notify userspace by executing /sbin/hotplug 53 * kobject_uevent - notify userspace by ending an uevent
54 * 54 *
55 * @action: action that is happening (usually "ADD" or "REMOVE") 55 * @action: action that is happening (usually KOBJ_ADD and KOBJ_REMOVE)
56 * @kobj: struct kobject that the action is happening to 56 * @kobj: struct kobject that the action is happening to
57 */ 57 */
58void kobject_hotplug(struct kobject *kobj, enum kobject_action action) 58void kobject_uevent(struct kobject *kobj, enum kobject_action action)
59{ 59{
60 char **envp; 60 char **envp;
61 char *buffer; 61 char *buffer;
@@ -65,7 +65,7 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action)
65 const char *subsystem; 65 const char *subsystem;
66 struct kobject *top_kobj; 66 struct kobject *top_kobj;
67 struct kset *kset; 67 struct kset *kset;
68 struct kset_hotplug_ops *hotplug_ops; 68 struct kset_uevent_ops *uevent_ops;
69 u64 seq; 69 u64 seq;
70 char *seq_buff; 70 char *seq_buff;
71 int i = 0; 71 int i = 0;
@@ -88,11 +88,11 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action)
88 return; 88 return;
89 89
90 kset = top_kobj->kset; 90 kset = top_kobj->kset;
91 hotplug_ops = kset->hotplug_ops; 91 uevent_ops = kset->uevent_ops;
92 92
93 /* skip the event, if the filter returns zero. */ 93 /* skip the event, if the filter returns zero. */
94 if (hotplug_ops && hotplug_ops->filter) 94 if (uevent_ops && uevent_ops->filter)
95 if (!hotplug_ops->filter(kset, kobj)) 95 if (!uevent_ops->filter(kset, kobj))
96 return; 96 return;
97 97
98 /* environment index */ 98 /* environment index */
@@ -111,8 +111,8 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action)
111 goto exit; 111 goto exit;
112 112
113 /* originating subsystem */ 113 /* originating subsystem */
114 if (hotplug_ops && hotplug_ops->name) 114 if (uevent_ops && uevent_ops->name)
115 subsystem = hotplug_ops->name(kset, kobj); 115 subsystem = uevent_ops->name(kset, kobj);
116 else 116 else
117 subsystem = kobject_name(&kset->kobj); 117 subsystem = kobject_name(&kset->kobj);
118 118
@@ -134,12 +134,12 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action)
134 scratch += strlen("SEQNUM=18446744073709551616") + 1; 134 scratch += strlen("SEQNUM=18446744073709551616") + 1;
135 135
136 /* let the kset specific function add its stuff */ 136 /* let the kset specific function add its stuff */
137 if (hotplug_ops && hotplug_ops->hotplug) { 137 if (uevent_ops && uevent_ops->uevent) {
138 retval = hotplug_ops->hotplug (kset, kobj, 138 retval = uevent_ops->uevent(kset, kobj,
139 &envp[i], NUM_ENVP - i, scratch, 139 &envp[i], NUM_ENVP - i, scratch,
140 BUFFER_SIZE - (scratch - buffer)); 140 BUFFER_SIZE - (scratch - buffer));
141 if (retval) { 141 if (retval) {
142 pr_debug ("%s - hotplug() returned %d\n", 142 pr_debug ("%s - uevent() returned %d\n",
143 __FUNCTION__, retval); 143 __FUNCTION__, retval);
144 goto exit; 144 goto exit;
145 } 145 }
@@ -147,7 +147,7 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action)
147 147
148 /* we will send an event, request a new sequence number */ 148 /* we will send an event, request a new sequence number */
149 spin_lock(&sequence_lock); 149 spin_lock(&sequence_lock);
150 seq = ++hotplug_seqnum; 150 seq = ++uevent_seqnum;
151 spin_unlock(&sequence_lock); 151 spin_unlock(&sequence_lock);
152 sprintf(seq_buff, "SEQNUM=%llu", (unsigned long long)seq); 152 sprintf(seq_buff, "SEQNUM=%llu", (unsigned long long)seq);
153 153
@@ -177,10 +177,10 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action)
177 } 177 }
178 178
179 /* call uevent_helper, usually only enabled during early boot */ 179 /* call uevent_helper, usually only enabled during early boot */
180 if (hotplug_path[0]) { 180 if (uevent_helper[0]) {
181 char *argv [3]; 181 char *argv [3];
182 182
183 argv [0] = hotplug_path; 183 argv [0] = uevent_helper;
184 argv [1] = (char *)subsystem; 184 argv [1] = (char *)subsystem;
185 argv [2] = NULL; 185 argv [2] = NULL;
186 call_usermodehelper (argv[0], argv, envp, 0); 186 call_usermodehelper (argv[0], argv, envp, 0);
@@ -192,39 +192,39 @@ exit:
192 kfree(envp); 192 kfree(envp);
193 return; 193 return;
194} 194}
195EXPORT_SYMBOL(kobject_hotplug); 195EXPORT_SYMBOL_GPL(kobject_uevent);
196 196
197/** 197/**
198 * add_hotplug_env_var - helper for creating hotplug environment variables 198 * add_uevent_var - helper for creating event variables
199 * @envp: Pointer to table of environment variables, as passed into 199 * @envp: Pointer to table of environment variables, as passed into
200 * hotplug() method. 200 * uevent() method.
201 * @num_envp: Number of environment variable slots available, as 201 * @num_envp: Number of environment variable slots available, as
202 * passed into hotplug() method. 202 * passed into uevent() method.
203 * @cur_index: Pointer to current index into @envp. It should be 203 * @cur_index: Pointer to current index into @envp. It should be
204 * initialized to 0 before the first call to add_hotplug_env_var(), 204 * initialized to 0 before the first call to add_uevent_var(),
205 * and will be incremented on success. 205 * and will be incremented on success.
206 * @buffer: Pointer to buffer for environment variables, as passed 206 * @buffer: Pointer to buffer for environment variables, as passed
207 * into hotplug() method. 207 * into uevent() method.
208 * @buffer_size: Length of @buffer, as passed into hotplug() method. 208 * @buffer_size: Length of @buffer, as passed into uevent() method.
209 * @cur_len: Pointer to current length of space used in @buffer. 209 * @cur_len: Pointer to current length of space used in @buffer.
210 * Should be initialized to 0 before the first call to 210 * Should be initialized to 0 before the first call to
211 * add_hotplug_env_var(), and will be incremented on success. 211 * add_uevent_var(), and will be incremented on success.
212 * @format: Format for creating environment variable (of the form 212 * @format: Format for creating environment variable (of the form
213 * "XXX=%x") for snprintf(). 213 * "XXX=%x") for snprintf().
214 * 214 *
215 * Returns 0 if environment variable was added successfully or -ENOMEM 215 * Returns 0 if environment variable was added successfully or -ENOMEM
216 * if no space was available. 216 * if no space was available.
217 */ 217 */
218int add_hotplug_env_var(char **envp, int num_envp, int *cur_index, 218int add_uevent_var(char **envp, int num_envp, int *cur_index,
219 char *buffer, int buffer_size, int *cur_len, 219 char *buffer, int buffer_size, int *cur_len,
220 const char *format, ...) 220 const char *format, ...)
221{ 221{
222 va_list args; 222 va_list args;
223 223
224 /* 224 /*
225 * We check against num_envp - 1 to make sure there is at 225 * We check against num_envp - 1 to make sure there is at
226 * least one slot left after we return, since the hotplug 226 * least one slot left after we return, since kobject_uevent()
227 * method needs to set the last slot to NULL. 227 * needs to set the last slot to NULL.
228 */ 228 */
229 if (*cur_index >= num_envp - 1) 229 if (*cur_index >= num_envp - 1)
230 return -ENOMEM; 230 return -ENOMEM;
@@ -243,7 +243,7 @@ int add_hotplug_env_var(char **envp, int num_envp, int *cur_index,
243 (*cur_index)++; 243 (*cur_index)++;
244 return 0; 244 return 0;
245} 245}
246EXPORT_SYMBOL(add_hotplug_env_var); 246EXPORT_SYMBOL_GPL(add_uevent_var);
247 247
248static int __init kobject_uevent_init(void) 248static int __init kobject_uevent_init(void)
249{ 249{
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index bd7568ac87fc..0ed38740388c 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -78,7 +78,7 @@ static struct class_device_attribute *bt_attrs[] = {
78}; 78};
79 79
80#ifdef CONFIG_HOTPLUG 80#ifdef CONFIG_HOTPLUG
81static int bt_hotplug(struct class_device *cdev, char **envp, int num_envp, char *buf, int size) 81static int bt_uevent(struct class_device *cdev, char **envp, int num_envp, char *buf, int size)
82{ 82{
83 struct hci_dev *hdev = class_get_devdata(cdev); 83 struct hci_dev *hdev = class_get_devdata(cdev);
84 int n, i = 0; 84 int n, i = 0;
@@ -107,7 +107,7 @@ struct class bt_class = {
107 .name = "bluetooth", 107 .name = "bluetooth",
108 .release = bt_release, 108 .release = bt_release,
109#ifdef CONFIG_HOTPLUG 109#ifdef CONFIG_HOTPLUG
110 .hotplug = bt_hotplug, 110 .uevent = bt_uevent,
111#endif 111#endif
112}; 112};
113 113
diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c
index f6a19d53eaeb..2ebdc23bbe26 100644
--- a/net/bridge/br_sysfs_if.c
+++ b/net/bridge/br_sysfs_if.c
@@ -248,7 +248,7 @@ int br_sysfs_addif(struct net_bridge_port *p)
248 if (err) 248 if (err)
249 goto out2; 249 goto out2;
250 250
251 kobject_hotplug(&p->kobj, KOBJ_ADD); 251 kobject_uevent(&p->kobj, KOBJ_ADD);
252 return 0; 252 return 0;
253 out2: 253 out2:
254 kobject_del(&p->kobj); 254 kobject_del(&p->kobj);
@@ -260,7 +260,7 @@ void br_sysfs_removeif(struct net_bridge_port *p)
260{ 260{
261 pr_debug("br_sysfs_removeif\n"); 261 pr_debug("br_sysfs_removeif\n");
262 sysfs_remove_link(&p->br->ifobj, p->dev->name); 262 sysfs_remove_link(&p->br->ifobj, p->dev->name);
263 kobject_hotplug(&p->kobj, KOBJ_REMOVE); 263 kobject_uevent(&p->kobj, KOBJ_REMOVE);
264 kobject_del(&p->kobj); 264 kobject_del(&p->kobj);
265} 265}
266 266
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index e2137f3e489d..198655dd9a77 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -369,14 +369,14 @@ static struct attribute_group wireless_group = {
369#endif 369#endif
370 370
371#ifdef CONFIG_HOTPLUG 371#ifdef CONFIG_HOTPLUG
372static int netdev_hotplug(struct class_device *cd, char **envp, 372static int netdev_uevent(struct class_device *cd, char **envp,
373 int num_envp, char *buf, int size) 373 int num_envp, char *buf, int size)
374{ 374{
375 struct net_device *dev = to_net_dev(cd); 375 struct net_device *dev = to_net_dev(cd);
376 int i = 0; 376 int i = 0;
377 int n; 377 int n;
378 378
379 /* pass interface in env to hotplug. */ 379 /* pass interface to uevent. */
380 envp[i++] = buf; 380 envp[i++] = buf;
381 n = snprintf(buf, size, "INTERFACE=%s", dev->name) + 1; 381 n = snprintf(buf, size, "INTERFACE=%s", dev->name) + 1;
382 buf += n; 382 buf += n;
@@ -408,7 +408,7 @@ static struct class net_class = {
408 .name = "net", 408 .name = "net",
409 .release = netdev_release, 409 .release = netdev_release,
410#ifdef CONFIG_HOTPLUG 410#ifdef CONFIG_HOTPLUG
411 .hotplug = netdev_hotplug, 411 .uevent = netdev_uevent,
412#endif 412#endif
413}; 413};
414 414