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 /block/bsg.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 'block/bsg.c')
-rw-r--r-- | block/bsg.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/block/bsg.c b/block/bsg.c index 302ac1f5af3..f51172ed27c 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -758,7 +758,7 @@ static struct bsg_device *bsg_add_device(struct inode *inode, | |||
758 | mutex_lock(&bsg_mutex); | 758 | mutex_lock(&bsg_mutex); |
759 | hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode))); | 759 | hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode))); |
760 | 760 | ||
761 | strncpy(bd->name, rq->bsg_dev.class_dev->class_id, sizeof(bd->name) - 1); | 761 | strncpy(bd->name, rq->bsg_dev.class_dev->bus_id, sizeof(bd->name) - 1); |
762 | dprintk("bound to <%s>, max queue %d\n", | 762 | dprintk("bound to <%s>, max queue %d\n", |
763 | format_dev_t(buf, inode->i_rdev), bd->max_queue); | 763 | format_dev_t(buf, inode->i_rdev), bd->max_queue); |
764 | 764 | ||
@@ -946,7 +946,7 @@ void bsg_unregister_queue(struct request_queue *q) | |||
946 | mutex_lock(&bsg_mutex); | 946 | mutex_lock(&bsg_mutex); |
947 | idr_remove(&bsg_minor_idr, bcd->minor); | 947 | idr_remove(&bsg_minor_idr, bcd->minor); |
948 | sysfs_remove_link(&q->kobj, "bsg"); | 948 | sysfs_remove_link(&q->kobj, "bsg"); |
949 | class_device_unregister(bcd->class_dev); | 949 | device_unregister(bcd->class_dev); |
950 | put_device(bcd->dev); | 950 | put_device(bcd->dev); |
951 | bcd->class_dev = NULL; | 951 | bcd->class_dev = NULL; |
952 | mutex_unlock(&bsg_mutex); | 952 | mutex_unlock(&bsg_mutex); |
@@ -959,7 +959,7 @@ int bsg_register_queue(struct request_queue *q, struct device *gdev, | |||
959 | struct bsg_class_device *bcd; | 959 | struct bsg_class_device *bcd; |
960 | dev_t dev; | 960 | dev_t dev; |
961 | int ret, minor; | 961 | int ret, minor; |
962 | struct class_device *class_dev = NULL; | 962 | struct device *class_dev = NULL; |
963 | const char *devname; | 963 | const char *devname; |
964 | 964 | ||
965 | if (name) | 965 | if (name) |
@@ -998,8 +998,7 @@ int bsg_register_queue(struct request_queue *q, struct device *gdev, | |||
998 | bcd->queue = q; | 998 | bcd->queue = q; |
999 | bcd->dev = get_device(gdev); | 999 | bcd->dev = get_device(gdev); |
1000 | dev = MKDEV(bsg_major, bcd->minor); | 1000 | dev = MKDEV(bsg_major, bcd->minor); |
1001 | class_dev = class_device_create(bsg_class, NULL, dev, gdev, "%s", | 1001 | class_dev = device_create(bsg_class, gdev, dev, "%s", devname); |
1002 | devname); | ||
1003 | if (IS_ERR(class_dev)) { | 1002 | if (IS_ERR(class_dev)) { |
1004 | ret = PTR_ERR(class_dev); | 1003 | ret = PTR_ERR(class_dev); |
1005 | goto put_dev; | 1004 | goto put_dev; |
@@ -1016,7 +1015,7 @@ int bsg_register_queue(struct request_queue *q, struct device *gdev, | |||
1016 | return 0; | 1015 | return 0; |
1017 | 1016 | ||
1018 | unregister_class_dev: | 1017 | unregister_class_dev: |
1019 | class_device_unregister(class_dev); | 1018 | device_unregister(class_dev); |
1020 | put_dev: | 1019 | put_dev: |
1021 | put_device(gdev); | 1020 | put_device(gdev); |
1022 | remove_idr: | 1021 | remove_idr: |