diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:49:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:49:58 -0400 |
commit | e80ab411e589e00550e2e6e5a6a02d59cc730357 (patch) | |
tree | 870225ff7b5b8d03e82a996963213a4bb9cce248 /drivers/scsi/ch.c | |
parent | 529a41e36673b518c9e091f3a8d932b6b9e3c461 (diff) | |
parent | ee959b00c335d7780136c5abda37809191fe52c3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
SCSI: convert struct class_device to struct device
DRM: remove unused dev_class
IB: rename "dev" to "srp_dev" in srp_host structure
IB: convert struct class_device to struct device
memstick: convert struct class_device to struct device
driver core: replace remaining __FUNCTION__ occurrences
sysfs: refill attribute buffer when reading from offset 0
PM: Remove destroy_suspended_device()
Firmware: add iSCSI iBFT Support
PM: Remove legacy PM (fix)
Kobject: Replace list_for_each() with list_for_each_entry().
SYSFS: Explicitly include required header file slab.h.
Driver core: make device_is_registered() work for class devices
PM: Convert wakeup flag accessors to inline functions
PM: Make wakeup flags available whenever CONFIG_PM is set
PM: Fix misuse of wakeup flag accessors in serial core
Driver core: Call device_pm_add() after bus_add_device() in device_add()
PM: Handle device registrations during suspend/resume
block: send disk "change" event for rescan_partitions()
sysdev: detect multiple driver registrations
...
Fixed trivial conflict in include/linux/memory.h due to semaphore header
file change (made irrelevant by the change to mutex).
Diffstat (limited to 'drivers/scsi/ch.c')
-rw-r--r-- | drivers/scsi/ch.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index 92d1cb1b21cb..75c84d7b9ce8 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c | |||
@@ -881,7 +881,7 @@ static long ch_ioctl_compat(struct file * file, | |||
881 | static int ch_probe(struct device *dev) | 881 | static int ch_probe(struct device *dev) |
882 | { | 882 | { |
883 | struct scsi_device *sd = to_scsi_device(dev); | 883 | struct scsi_device *sd = to_scsi_device(dev); |
884 | struct class_device *class_dev; | 884 | struct device *class_dev; |
885 | int minor, ret = -ENOMEM; | 885 | int minor, ret = -ENOMEM; |
886 | scsi_changer *ch; | 886 | scsi_changer *ch; |
887 | 887 | ||
@@ -910,11 +910,11 @@ static int ch_probe(struct device *dev) | |||
910 | ch->minor = minor; | 910 | ch->minor = minor; |
911 | sprintf(ch->name,"ch%d",ch->minor); | 911 | sprintf(ch->name,"ch%d",ch->minor); |
912 | 912 | ||
913 | class_dev = class_device_create(ch_sysfs_class, NULL, | 913 | class_dev = device_create(ch_sysfs_class, dev, |
914 | MKDEV(SCSI_CHANGER_MAJOR, ch->minor), | 914 | MKDEV(SCSI_CHANGER_MAJOR,ch->minor), |
915 | dev, "s%s", ch->name); | 915 | "s%s", ch->name); |
916 | if (IS_ERR(class_dev)) { | 916 | if (IS_ERR(class_dev)) { |
917 | printk(KERN_WARNING "ch%d: class_device_create failed\n", | 917 | printk(KERN_WARNING "ch%d: device_create failed\n", |
918 | ch->minor); | 918 | ch->minor); |
919 | ret = PTR_ERR(class_dev); | 919 | ret = PTR_ERR(class_dev); |
920 | goto remove_idr; | 920 | goto remove_idr; |
@@ -945,8 +945,7 @@ static int ch_remove(struct device *dev) | |||
945 | idr_remove(&ch_index_idr, ch->minor); | 945 | idr_remove(&ch_index_idr, ch->minor); |
946 | spin_unlock(&ch_index_lock); | 946 | spin_unlock(&ch_index_lock); |
947 | 947 | ||
948 | class_device_destroy(ch_sysfs_class, | 948 | device_destroy(ch_sysfs_class, MKDEV(SCSI_CHANGER_MAJOR,ch->minor)); |
949 | MKDEV(SCSI_CHANGER_MAJOR,ch->minor)); | ||
950 | kfree(ch->dt); | 949 | kfree(ch->dt); |
951 | kfree(ch); | 950 | kfree(ch); |
952 | return 0; | 951 | return 0; |