diff options
author | Tony Jones <tonyj@suse.de> | 2008-02-22 00:13:36 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-19 19:10:33 -0700 |
commit | ee959b00c335d7780136c5abda37809191fe52c3 (patch) | |
tree | 7775f3b274fd8caf5e7e5154fea89e96f2babd94 /block | |
parent | 56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (diff) | |
download | linux-3.10-ee959b00c335d7780136c5abda37809191fe52c3.tar.gz linux-3.10-ee959b00c335d7780136c5abda37809191fe52c3.tar.bz2 linux-3.10-ee959b00c335d7780136c5abda37809191fe52c3.zip |
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 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: |