diff options
author | Tony Jones <tonyj@suse.de> | 2008-02-21 18:13:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-19 22:10:33 -0400 |
commit | ee959b00c335d7780136c5abda37809191fe52c3 (patch) | |
tree | 7775f3b274fd8caf5e7e5154fea89e96f2babd94 /block | |
parent | 56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (diff) |
SCSI: convert struct class_device to struct device
It's big, but there doesn't seem to be a way to split it up smaller...
Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'block')
-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 302ac1f5af39..f51172ed27c2 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: |