summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/tape_class.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2007-10-22 12:52:42 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-10-22 12:52:48 +0200
commit7f021ce1957504cacc78896de857b90293badabc (patch)
tree7784c56c9887742c40e68a09c9855f29991f06e9 /drivers/s390/char/tape_class.c
parent5bf04b2062c5b441d7154216694fea7dc2a6a7f3 (diff)
downloadop-kernel-dev-7f021ce1957504cacc78896de857b90293badabc.zip
op-kernel-dev-7f021ce1957504cacc78896de857b90293badabc.tar.gz
[S390] struct class_device -> struct device conversion.
Convert struct class_device users under drivers/s390/char to use struct device. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/tape_class.c')
-rw-r--r--drivers/s390/char/tape_class.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c
index 2e0d297..aa7f166 100644
--- a/drivers/s390/char/tape_class.c
+++ b/drivers/s390/char/tape_class.c
@@ -69,12 +69,9 @@ struct tape_class_device *register_tape_dev(
if (rc)
goto fail_with_cdev;
- tcd->class_device = class_device_create(
- tape_class,
- NULL,
- tcd->char_device->dev,
- device,
- "%s", tcd->device_name
+ tcd->class_device = device_create(tape_class, device,
+ tcd->char_device->dev,
+ "%s", tcd->device_name
);
rc = IS_ERR(tcd->class_device) ? PTR_ERR(tcd->class_device) : 0;
if (rc)
@@ -90,7 +87,7 @@ struct tape_class_device *register_tape_dev(
return tcd;
fail_with_class_device:
- class_device_destroy(tape_class, tcd->char_device->dev);
+ device_destroy(tape_class, tcd->char_device->dev);
fail_with_cdev:
cdev_del(tcd->char_device);
@@ -105,11 +102,9 @@ EXPORT_SYMBOL(register_tape_dev);
void unregister_tape_dev(struct tape_class_device *tcd)
{
if (tcd != NULL && !IS_ERR(tcd)) {
- sysfs_remove_link(
- &tcd->class_device->dev->kobj,
- tcd->mode_name
- );
- class_device_destroy(tape_class, tcd->char_device->dev);
+ sysfs_remove_link(&tcd->class_device->kobj,
+ tcd->mode_name);
+ device_destroy(tape_class, tcd->char_device->dev);
cdev_del(tcd->char_device);
kfree(tcd);
}
OpenPOWER on IntegriCloud