diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-20 11:13:05 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:40 -0500 |
commit | c10997f6575f476ff38442fa18fd4a0d80345f9d (patch) | |
tree | 9b2bb7e647bd39fb80f23d7a6b34bf2587d660a7 /drivers | |
parent | 38a382ae5dd4f4d04e3046816b0a41836094e538 (diff) |
Kobject: convert drivers/* from kobject_unregister() to kobject_put()
There is no need for kobject_unregister() anymore, thanks to Kay's
kobject cleanup changes, so replace all instances of it with
kobject_put().
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/bus.c | 4 | ||||
-rw-r--r-- | drivers/base/sys.c | 2 | ||||
-rw-r--r-- | drivers/block/pktcdvd.c | 2 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 4 | ||||
-rw-r--r-- | drivers/cpuidle/sysfs.c | 4 | ||||
-rw-r--r-- | drivers/edac/edac_device_sysfs.c | 10 | ||||
-rw-r--r-- | drivers/edac/edac_mc_sysfs.c | 12 | ||||
-rw-r--r-- | drivers/edac/edac_pci_sysfs.c | 6 | ||||
-rw-r--r-- | drivers/firmware/edd.c | 2 | ||||
-rw-r--r-- | drivers/firmware/efivars.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/core/sysfs.c | 6 | ||||
-rw-r--r-- | drivers/md/md.c | 2 | ||||
-rw-r--r-- | drivers/net/ibmveth.c | 2 | ||||
-rw-r--r-- | drivers/parisc/pdc_stable.c | 6 | ||||
-rw-r--r-- | drivers/pci/hotplug/pci_hotplug_core.c | 2 | ||||
-rw-r--r-- | drivers/pci/hotplug/rpadlpar_sysfs.c | 4 | ||||
-rw-r--r-- | drivers/uio/uio.c | 8 |
17 files changed, 40 insertions, 42 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index aea579365f6d..a377b65ba328 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -681,7 +681,7 @@ int bus_add_driver(struct device_driver *drv) | |||
681 | kobject_uevent(&priv->kobj, KOBJ_ADD); | 681 | kobject_uevent(&priv->kobj, KOBJ_ADD); |
682 | return error; | 682 | return error; |
683 | out_unregister: | 683 | out_unregister: |
684 | kobject_unregister(&priv->kobj); | 684 | kobject_put(&priv->kobj); |
685 | out_put_bus: | 685 | out_put_bus: |
686 | bus_put(bus); | 686 | bus_put(bus); |
687 | return error; | 687 | return error; |
@@ -708,7 +708,7 @@ void bus_remove_driver(struct device_driver * drv) | |||
708 | pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name); | 708 | pr_debug("bus: '%s': remove driver %s\n", drv->bus->name, drv->name); |
709 | driver_detach(drv); | 709 | driver_detach(drv); |
710 | module_remove_driver(drv); | 710 | module_remove_driver(drv); |
711 | kobject_unregister(&drv->p->kobj); | 711 | kobject_put(&drv->p->kobj); |
712 | bus_put(drv->bus); | 712 | bus_put(drv->bus); |
713 | } | 713 | } |
714 | 714 | ||
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 47fc6eb6473f..e666441dd76b 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -264,7 +264,7 @@ void sysdev_unregister(struct sys_device * sysdev) | |||
264 | } | 264 | } |
265 | mutex_unlock(&sysdev_drivers_lock); | 265 | mutex_unlock(&sysdev_drivers_lock); |
266 | 266 | ||
267 | kobject_unregister(&sysdev->kobj); | 267 | kobject_put(&sysdev->kobj); |
268 | } | 268 | } |
269 | 269 | ||
270 | 270 | ||
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index d1ee38361e0b..e9de1712e5a0 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -130,7 +130,7 @@ static struct pktcdvd_kobj* pkt_kobj_create(struct pktcdvd_device *pd, | |||
130 | static void pkt_kobj_remove(struct pktcdvd_kobj *p) | 130 | static void pkt_kobj_remove(struct pktcdvd_kobj *p) |
131 | { | 131 | { |
132 | if (p) | 132 | if (p) |
133 | kobject_unregister(&p->kobj); | 133 | kobject_put(&p->kobj); |
134 | } | 134 | } |
135 | /* | 135 | /* |
136 | * default release function for pktcdvd kernel objects. | 136 | * default release function for pktcdvd kernel objects. |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 9e102af0c07b..5efd5550f4ca 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -913,7 +913,7 @@ err_out_unregister: | |||
913 | cpufreq_cpu_data[j] = NULL; | 913 | cpufreq_cpu_data[j] = NULL; |
914 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); | 914 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); |
915 | 915 | ||
916 | kobject_unregister(&policy->kobj); | 916 | kobject_put(&policy->kobj); |
917 | wait_for_completion(&policy->kobj_unregister); | 917 | wait_for_completion(&policy->kobj_unregister); |
918 | 918 | ||
919 | err_out_driver_exit: | 919 | err_out_driver_exit: |
@@ -1030,8 +1030,6 @@ static int __cpufreq_remove_dev (struct sys_device * sys_dev) | |||
1030 | 1030 | ||
1031 | unlock_policy_rwsem_write(cpu); | 1031 | unlock_policy_rwsem_write(cpu); |
1032 | 1032 | ||
1033 | kobject_unregister(&data->kobj); | ||
1034 | |||
1035 | kobject_put(&data->kobj); | 1033 | kobject_put(&data->kobj); |
1036 | 1034 | ||
1037 | /* we need to make sure that the underlying kobj is actually | 1035 | /* we need to make sure that the underlying kobj is actually |
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 059db9c21474..088ea74edd34 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c | |||
@@ -277,7 +277,7 @@ static struct kobj_type ktype_state_cpuidle = { | |||
277 | 277 | ||
278 | static void inline cpuidle_free_state_kobj(struct cpuidle_device *device, int i) | 278 | static void inline cpuidle_free_state_kobj(struct cpuidle_device *device, int i) |
279 | { | 279 | { |
280 | kobject_unregister(&device->kobjs[i]->kobj); | 280 | kobject_put(&device->kobjs[i]->kobj); |
281 | wait_for_completion(&device->kobjs[i]->kobj_unregister); | 281 | wait_for_completion(&device->kobjs[i]->kobj_unregister); |
282 | kfree(device->kobjs[i]); | 282 | kfree(device->kobjs[i]); |
283 | device->kobjs[i] = NULL; | 283 | device->kobjs[i] = NULL; |
@@ -358,5 +358,5 @@ void cpuidle_remove_sysfs(struct sys_device *sysdev) | |||
358 | struct cpuidle_device *dev; | 358 | struct cpuidle_device *dev; |
359 | 359 | ||
360 | dev = per_cpu(cpuidle_devices, cpu); | 360 | dev = per_cpu(cpuidle_devices, cpu); |
361 | kobject_unregister(&dev->kobj); | 361 | kobject_put(&dev->kobj); |
362 | } | 362 | } |
diff --git a/drivers/edac/edac_device_sysfs.c b/drivers/edac/edac_device_sysfs.c index 10e5b19a3e3b..53764577035f 100644 --- a/drivers/edac/edac_device_sysfs.c +++ b/drivers/edac/edac_device_sysfs.c | |||
@@ -303,7 +303,7 @@ void edac_device_unregister_sysfs_main_kobj( | |||
303 | * a) module_put() this module | 303 | * a) module_put() this module |
304 | * b) 'kfree' the memory | 304 | * b) 'kfree' the memory |
305 | */ | 305 | */ |
306 | kobject_unregister(&edac_dev->kobj); | 306 | kobject_put(&edac_dev->kobj); |
307 | } | 307 | } |
308 | 308 | ||
309 | /* edac_dev -> instance information */ | 309 | /* edac_dev -> instance information */ |
@@ -574,7 +574,7 @@ static int edac_device_create_block(struct edac_device_ctl_info *edac_dev, | |||
574 | 574 | ||
575 | /* Error unwind stack */ | 575 | /* Error unwind stack */ |
576 | err_on_attrib: | 576 | err_on_attrib: |
577 | kobject_unregister(&block->kobj); | 577 | kobject_put(&block->kobj); |
578 | 578 | ||
579 | err_out: | 579 | err_out: |
580 | return err; | 580 | return err; |
@@ -605,7 +605,7 @@ static void edac_device_delete_block(struct edac_device_ctl_info *edac_dev, | |||
605 | /* unregister this block's kobject, SEE: | 605 | /* unregister this block's kobject, SEE: |
606 | * edac_device_ctrl_block_release() callback operation | 606 | * edac_device_ctrl_block_release() callback operation |
607 | */ | 607 | */ |
608 | kobject_unregister(&block->kobj); | 608 | kobject_put(&block->kobj); |
609 | } | 609 | } |
610 | 610 | ||
611 | /* instance ctor/dtor code */ | 611 | /* instance ctor/dtor code */ |
@@ -672,7 +672,7 @@ static int edac_device_create_instance(struct edac_device_ctl_info *edac_dev, | |||
672 | 672 | ||
673 | /* error unwind stack */ | 673 | /* error unwind stack */ |
674 | err_release_instance_kobj: | 674 | err_release_instance_kobj: |
675 | kobject_unregister(&instance->kobj); | 675 | kobject_put(&instance->kobj); |
676 | 676 | ||
677 | err_out: | 677 | err_out: |
678 | return err; | 678 | return err; |
@@ -697,7 +697,7 @@ static void edac_device_delete_instance(struct edac_device_ctl_info *edac_dev, | |||
697 | /* unregister this instance's kobject, SEE: | 697 | /* unregister this instance's kobject, SEE: |
698 | * edac_device_ctrl_instance_release() for callback operation | 698 | * edac_device_ctrl_instance_release() for callback operation |
699 | */ | 699 | */ |
700 | kobject_unregister(&instance->kobj); | 700 | kobject_put(&instance->kobj); |
701 | } | 701 | } |
702 | 702 | ||
703 | /* | 703 | /* |
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 45b1d3633418..9aac88027fb3 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c | |||
@@ -395,7 +395,7 @@ static int edac_create_csrow_object(struct mem_ctl_info *mci, | |||
395 | goto err_release_top_kobj; | 395 | goto err_release_top_kobj; |
396 | 396 | ||
397 | /* At this point, to release a csrow kobj, one must | 397 | /* At this point, to release a csrow kobj, one must |
398 | * call the kobject_unregister and allow that tear down | 398 | * call the kobject_put and allow that tear down |
399 | * to work the releasing | 399 | * to work the releasing |
400 | */ | 400 | */ |
401 | 401 | ||
@@ -406,7 +406,7 @@ static int edac_create_csrow_object(struct mem_ctl_info *mci, | |||
406 | err = edac_create_channel_files(&csrow->kobj, chan); | 406 | err = edac_create_channel_files(&csrow->kobj, chan); |
407 | if (err) { | 407 | if (err) { |
408 | /* special case the unregister here */ | 408 | /* special case the unregister here */ |
409 | kobject_unregister(&csrow->kobj); | 409 | kobject_put(&csrow->kobj); |
410 | goto err_out; | 410 | goto err_out; |
411 | } | 411 | } |
412 | } | 412 | } |
@@ -808,7 +808,7 @@ fail_out: | |||
808 | void edac_mc_unregister_sysfs_main_kobj(struct mem_ctl_info *mci) | 808 | void edac_mc_unregister_sysfs_main_kobj(struct mem_ctl_info *mci) |
809 | { | 809 | { |
810 | /* delete the kobj from the mc_kset */ | 810 | /* delete the kobj from the mc_kset */ |
811 | kobject_unregister(&mci->edac_mci_kobj); | 811 | kobject_put(&mci->edac_mci_kobj); |
812 | } | 812 | } |
813 | 813 | ||
814 | #define EDAC_DEVICE_SYMLINK "device" | 814 | #define EDAC_DEVICE_SYMLINK "device" |
@@ -923,7 +923,7 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) | |||
923 | fail1: | 923 | fail1: |
924 | for (i--; i >= 0; i--) { | 924 | for (i--; i >= 0; i--) { |
925 | if (csrow->nr_pages > 0) { | 925 | if (csrow->nr_pages > 0) { |
926 | kobject_unregister(&mci->csrows[i].kobj); | 926 | kobject_put(&mci->csrows[i].kobj); |
927 | } | 927 | } |
928 | } | 928 | } |
929 | 929 | ||
@@ -950,7 +950,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) | |||
950 | for (i = 0; i < mci->nr_csrows; i++) { | 950 | for (i = 0; i < mci->nr_csrows; i++) { |
951 | if (mci->csrows[i].nr_pages > 0) { | 951 | if (mci->csrows[i].nr_pages > 0) { |
952 | debugf0("%s() unreg csrow-%d\n", __func__, i); | 952 | debugf0("%s() unreg csrow-%d\n", __func__, i); |
953 | kobject_unregister(&mci->csrows[i].kobj); | 953 | kobject_put(&mci->csrows[i].kobj); |
954 | } | 954 | } |
955 | } | 955 | } |
956 | 956 | ||
@@ -967,7 +967,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) | |||
967 | debugf0("%s() unregister this mci kobj\n", __func__); | 967 | debugf0("%s() unregister this mci kobj\n", __func__); |
968 | 968 | ||
969 | /* unregister this instance's kobject */ | 969 | /* unregister this instance's kobject */ |
970 | kobject_unregister(&mci->edac_mci_kobj); | 970 | kobject_put(&mci->edac_mci_kobj); |
971 | } | 971 | } |
972 | 972 | ||
973 | 973 | ||
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c index 834eaa9d6148..5b075da99145 100644 --- a/drivers/edac/edac_pci_sysfs.c +++ b/drivers/edac/edac_pci_sysfs.c | |||
@@ -205,7 +205,7 @@ void edac_pci_unregister_sysfs_instance_kobj(struct edac_pci_ctl_info *pci) | |||
205 | * function release the main reference count and then | 205 | * function release the main reference count and then |
206 | * kfree the memory | 206 | * kfree the memory |
207 | */ | 207 | */ |
208 | kobject_unregister(&pci->kobj); | 208 | kobject_put(&pci->kobj); |
209 | } | 209 | } |
210 | 210 | ||
211 | /***************************** EDAC PCI sysfs root **********************/ | 211 | /***************************** EDAC PCI sysfs root **********************/ |
@@ -411,9 +411,9 @@ static void edac_pci_main_kobj_teardown(void) | |||
411 | * main kobj | 411 | * main kobj |
412 | */ | 412 | */ |
413 | if (atomic_dec_return(&edac_pci_sysfs_refcount) == 0) { | 413 | if (atomic_dec_return(&edac_pci_sysfs_refcount) == 0) { |
414 | debugf0("%s() called kobject_unregister on main kobj\n", | 414 | debugf0("%s() called kobject_put on main kobj\n", |
415 | __func__); | 415 | __func__); |
416 | kobject_unregister(&edac_pci_top_main_kobj); | 416 | kobject_put(&edac_pci_top_main_kobj); |
417 | } | 417 | } |
418 | } | 418 | } |
419 | 419 | ||
diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c index dc0b87b13505..d168223db159 100644 --- a/drivers/firmware/edd.c +++ b/drivers/firmware/edd.c | |||
@@ -693,7 +693,7 @@ edd_create_symlink_to_pcidev(struct edd_device *edev) | |||
693 | static inline void | 693 | static inline void |
694 | edd_device_unregister(struct edd_device *edev) | 694 | edd_device_unregister(struct edd_device *edev) |
695 | { | 695 | { |
696 | kobject_unregister(&edev->kobj); | 696 | kobject_put(&edev->kobj); |
697 | } | 697 | } |
698 | 698 | ||
699 | static void edd_populate_dir(struct edd_device * edev) | 699 | static void edd_populate_dir(struct edd_device * edev) |
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index b61a72fb6219..f4f709d1370b 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -397,7 +397,7 @@ static struct kobj_type efivar_ktype = { | |||
397 | static inline void | 397 | static inline void |
398 | efivar_unregister(struct efivar_entry *var) | 398 | efivar_unregister(struct efivar_entry *var) |
399 | { | 399 | { |
400 | kobject_unregister(&var->kobj); | 400 | kobject_put(&var->kobj); |
401 | } | 401 | } |
402 | 402 | ||
403 | 403 | ||
@@ -732,7 +732,7 @@ efivars_init(void) | |||
732 | kset_unregister(vars_kset); | 732 | kset_unregister(vars_kset); |
733 | 733 | ||
734 | out_firmware_unregister: | 734 | out_firmware_unregister: |
735 | kobject_unregister(efi_kobj); | 735 | kobject_put(efi_kobj); |
736 | 736 | ||
737 | out_free: | 737 | out_free: |
738 | kfree(variable_name); | 738 | kfree(variable_name); |
@@ -753,7 +753,7 @@ efivars_exit(void) | |||
753 | } | 753 | } |
754 | 754 | ||
755 | kset_unregister(vars_kset); | 755 | kset_unregister(vars_kset); |
756 | kobject_unregister(efi_kobj); | 756 | kobject_put(efi_kobj); |
757 | } | 757 | } |
758 | 758 | ||
759 | module_init(efivars_init); | 759 | module_init(efivars_init); |
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index aa81129704cf..c864ef70fdf9 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c | |||
@@ -714,7 +714,7 @@ err_put: | |||
714 | sysfs_remove_group(p, &pma_group); | 714 | sysfs_remove_group(p, &pma_group); |
715 | sysfs_remove_group(p, &port->pkey_group); | 715 | sysfs_remove_group(p, &port->pkey_group); |
716 | sysfs_remove_group(p, &port->gid_group); | 716 | sysfs_remove_group(p, &port->gid_group); |
717 | kobject_unregister(p); | 717 | kobject_put(p); |
718 | } | 718 | } |
719 | } | 719 | } |
720 | 720 | ||
@@ -738,10 +738,10 @@ void ib_device_unregister_sysfs(struct ib_device *device) | |||
738 | sysfs_remove_group(p, &pma_group); | 738 | sysfs_remove_group(p, &pma_group); |
739 | sysfs_remove_group(p, &port->pkey_group); | 739 | sysfs_remove_group(p, &port->pkey_group); |
740 | sysfs_remove_group(p, &port->gid_group); | 740 | sysfs_remove_group(p, &port->gid_group); |
741 | kobject_unregister(p); | 741 | kobject_put(p); |
742 | } | 742 | } |
743 | 743 | ||
744 | kobject_unregister(device->ports_parent); | 744 | kobject_put(device->ports_parent); |
745 | class_device_unregister(&device->class_dev); | 745 | class_device_unregister(&device->class_dev); |
746 | } | 746 | } |
747 | 747 | ||
diff --git a/drivers/md/md.c b/drivers/md/md.c index ae800ba061a6..c28a120b4161 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -231,7 +231,7 @@ static void mddev_put(mddev_t *mddev) | |||
231 | list_del(&mddev->all_mddevs); | 231 | list_del(&mddev->all_mddevs); |
232 | spin_unlock(&all_mddevs_lock); | 232 | spin_unlock(&all_mddevs_lock); |
233 | blk_cleanup_queue(mddev->queue); | 233 | blk_cleanup_queue(mddev->queue); |
234 | kobject_unregister(&mddev->kobj); | 234 | kobject_put(&mddev->kobj); |
235 | } else | 235 | } else |
236 | spin_unlock(&all_mddevs_lock); | 236 | spin_unlock(&all_mddevs_lock); |
237 | } | 237 | } |
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index bee30375999a..57772bebff56 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -1236,7 +1236,7 @@ static int __devexit ibmveth_remove(struct vio_dev *dev) | |||
1236 | int i; | 1236 | int i; |
1237 | 1237 | ||
1238 | for(i = 0; i<IbmVethNumBufferPools; i++) | 1238 | for(i = 0; i<IbmVethNumBufferPools; i++) |
1239 | kobject_unregister(&adapter->rx_buff_pool[i].kobj); | 1239 | kobject_put(&adapter->rx_buff_pool[i].kobj); |
1240 | 1240 | ||
1241 | unregister_netdev(netdev); | 1241 | unregister_netdev(netdev); |
1242 | 1242 | ||
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 87bc6b73b249..de34aa9d3136 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
@@ -1026,7 +1026,7 @@ pdcs_unregister_pathentries(void) | |||
1026 | for (i = 0; (entry = pdcspath_entries[i]); i++) { | 1026 | for (i = 0; (entry = pdcspath_entries[i]); i++) { |
1027 | read_lock(&entry->rw_lock); | 1027 | read_lock(&entry->rw_lock); |
1028 | if (entry->ready >= 2) | 1028 | if (entry->ready >= 2) |
1029 | kobject_unregister(&entry->kobj); | 1029 | kobject_put(&entry->kobj); |
1030 | read_unlock(&entry->rw_lock); | 1030 | read_unlock(&entry->rw_lock); |
1031 | } | 1031 | } |
1032 | } | 1032 | } |
@@ -1086,7 +1086,7 @@ fail_pdcsreg: | |||
1086 | kset_unregister(paths_kset); | 1086 | kset_unregister(paths_kset); |
1087 | 1087 | ||
1088 | fail_ksetreg: | 1088 | fail_ksetreg: |
1089 | kobject_unregister(stable_kobj); | 1089 | kobject_put(stable_kobj); |
1090 | 1090 | ||
1091 | fail_firmreg: | 1091 | fail_firmreg: |
1092 | printk(KERN_INFO PDCS_PREFIX " bailing out\n"); | 1092 | printk(KERN_INFO PDCS_PREFIX " bailing out\n"); |
@@ -1098,7 +1098,7 @@ pdc_stable_exit(void) | |||
1098 | { | 1098 | { |
1099 | pdcs_unregister_pathentries(); | 1099 | pdcs_unregister_pathentries(); |
1100 | kset_unregister(paths_kset); | 1100 | kset_unregister(paths_kset); |
1101 | kobject_unregister(stable_kobj); | 1101 | kobject_put(stable_kobj); |
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | 1104 | ||
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index 3606d5b52a70..47bb0e1ff3fa 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c | |||
@@ -671,7 +671,7 @@ int pci_hp_deregister (struct hotplug_slot *slot) | |||
671 | 671 | ||
672 | fs_remove_slot (slot); | 672 | fs_remove_slot (slot); |
673 | dbg ("Removed slot %s from the list\n", slot->name); | 673 | dbg ("Removed slot %s from the list\n", slot->name); |
674 | kobject_unregister(&slot->kobj); | 674 | kobject_put(&slot->kobj); |
675 | return 0; | 675 | return 0; |
676 | } | 676 | } |
677 | 677 | ||
diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c index 9cde367915b6..e32148a8fa12 100644 --- a/drivers/pci/hotplug/rpadlpar_sysfs.c +++ b/drivers/pci/hotplug/rpadlpar_sysfs.c | |||
@@ -114,12 +114,12 @@ int dlpar_sysfs_init(void) | |||
114 | 114 | ||
115 | error = sysfs_create_group(dlpar_kobj, &dlpar_attr_group); | 115 | error = sysfs_create_group(dlpar_kobj, &dlpar_attr_group); |
116 | if (error) | 116 | if (error) |
117 | kobject_unregister(dlpar_kobj); | 117 | kobject_put(dlpar_kobj); |
118 | return error; | 118 | return error; |
119 | } | 119 | } |
120 | 120 | ||
121 | void dlpar_sysfs_exit(void) | 121 | void dlpar_sysfs_exit(void) |
122 | { | 122 | { |
123 | sysfs_remove_group(dlpar_kobj, &dlpar_attr_group); | 123 | sysfs_remove_group(dlpar_kobj, &dlpar_attr_group); |
124 | kobject_unregister(dlpar_kobj); | 124 | kobject_put(dlpar_kobj); |
125 | } | 125 | } |
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index f352731add64..03b66fb734a6 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c | |||
@@ -186,9 +186,9 @@ err: | |||
186 | for (mi--; mi>=0; mi--) { | 186 | for (mi--; mi>=0; mi--) { |
187 | mem = &idev->info->mem[mi]; | 187 | mem = &idev->info->mem[mi]; |
188 | map = mem->map; | 188 | map = mem->map; |
189 | kobject_unregister(&map->kobj); | 189 | kobject_put(&map->kobj); |
190 | } | 190 | } |
191 | kobject_unregister(idev->map_dir); | 191 | kobject_put(idev->map_dir); |
192 | sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp); | 192 | sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp); |
193 | err_group: | 193 | err_group: |
194 | dev_err(idev->dev, "error creating sysfs files (%d)\n", ret); | 194 | dev_err(idev->dev, "error creating sysfs files (%d)\n", ret); |
@@ -203,9 +203,9 @@ static void uio_dev_del_attributes(struct uio_device *idev) | |||
203 | mem = &idev->info->mem[mi]; | 203 | mem = &idev->info->mem[mi]; |
204 | if (mem->size == 0) | 204 | if (mem->size == 0) |
205 | break; | 205 | break; |
206 | kobject_unregister(&mem->map->kobj); | 206 | kobject_put(&mem->map->kobj); |
207 | } | 207 | } |
208 | kobject_unregister(idev->map_dir); | 208 | kobject_put(idev->map_dir); |
209 | sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp); | 209 | sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp); |
210 | } | 210 | } |
211 | 211 | ||