diff options
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: |