diff options
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, mutex_lock(&bsg_mutex); hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode))); - strncpy(bd->name, rq->bsg_dev.class_dev->class_id, sizeof(bd->name) - 1); + strncpy(bd->name, rq->bsg_dev.class_dev->bus_id, sizeof(bd->name) - 1); dprintk("bound to <%s>, max queue %d\n", format_dev_t(buf, inode->i_rdev), bd->max_queue); @@ -946,7 +946,7 @@ void bsg_unregister_queue(struct request_queue *q) mutex_lock(&bsg_mutex); idr_remove(&bsg_minor_idr, bcd->minor); sysfs_remove_link(&q->kobj, "bsg"); - class_device_unregister(bcd->class_dev); + device_unregister(bcd->class_dev); put_device(bcd->dev); bcd->class_dev = NULL; mutex_unlock(&bsg_mutex); @@ -959,7 +959,7 @@ int bsg_register_queue(struct request_queue *q, struct device *gdev, struct bsg_class_device *bcd; dev_t dev; int ret, minor; - struct class_device *class_dev = NULL; + struct device *class_dev = NULL; const char *devname; if (name) @@ -998,8 +998,7 @@ int bsg_register_queue(struct request_queue *q, struct device *gdev, bcd->queue = q; bcd->dev = get_device(gdev); dev = MKDEV(bsg_major, bcd->minor); - class_dev = class_device_create(bsg_class, NULL, dev, gdev, "%s", - devname); + class_dev = device_create(bsg_class, gdev, dev, "%s", devname); if (IS_ERR(class_dev)) { ret = PTR_ERR(class_dev); goto put_dev; @@ -1016,7 +1015,7 @@ int bsg_register_queue(struct request_queue *q, struct device *gdev, return 0; unregister_class_dev: - class_device_unregister(class_dev); + device_unregister(class_dev); put_dev: put_device(gdev); remove_idr: |