diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 12:59:26 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 12:59:26 -0800 |
commit | 5fe8252fc3a21666cf19053fbd7ec7bd9664f5d9 (patch) | |
tree | 07fbc97eabdafe48362ba4f295474c86309a5602 /fs/partitions/check.c | |
parent | 460223d21d960e420775ca4d11ddaa8389af4d25 (diff) | |
parent | ef665c1a06be719ed9a6b0ad7967137258d9457a (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
sysfs: fix build errors: uevent with CONFIG_SYSFS=n
pcmcia: some class_device fallout
Driver core: device_add_attrs() cleanup
debugfs: Remove misleading comments.
debugfs: implement symbolic links
Driver: remove redundant kobject_unregister checks
kobject: kobj->k_name verification fix
serial: Add PCMCIA IDs for Quatech DSP-100 dual RS232 adapter.
Driver core: let request_module() send a /sys/modules/kmod/-uevent
Driver.h copyright update
Diffstat (limited to 'fs/partitions/check.c')
-rw-r--r-- | fs/partitions/check.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index ac32a2e8540..22d38ffc9ef 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -358,8 +358,7 @@ void delete_partition(struct gendisk *disk, int part) p->ios[0] = p->ios[1] = 0; p->sectors[0] = p->sectors[1] = 0; sysfs_remove_link(&p->kobj, "subsystem"); - if (p->holder_dir) - kobject_unregister(p->holder_dir); + kobject_unregister(p->holder_dir); kobject_uevent(&p->kobj, KOBJ_REMOVE); kobject_del(&p->kobj); kobject_put(&p->kobj); @@ -603,10 +602,8 @@ void del_gendisk(struct gendisk *disk) disk->stamp = 0; kobject_uevent(&disk->kobj, KOBJ_REMOVE); - if (disk->holder_dir) - kobject_unregister(disk->holder_dir); - if (disk->slave_dir) - kobject_unregister(disk->slave_dir); + kobject_unregister(disk->holder_dir); + kobject_unregister(disk->slave_dir); if (disk->driverfs_dev) { char *disk_name = make_block_name(disk); sysfs_remove_link(&disk->kobj, "device"); |