]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/char/tape_class.c
device create: s390: convert device_create to device_create_drvdata
[linux-2.6-omap-h63xx.git] / drivers / s390 / char / tape_class.c
index aa7f166f40340dd4c77a99cf9e86428e174ca2d2..12c2a5aaf31b47e88587957b7f31cb6a24edff7b 100644 (file)
@@ -69,10 +69,9 @@ struct tape_class_device *register_tape_dev(
        if (rc)
                goto fail_with_cdev;
 
-       tcd->class_device = device_create(tape_class, device,
-                                         tcd->char_device->dev,
-                                         "%s", tcd->device_name
-                       );
+       tcd->class_device = device_create_drvdata(tape_class, device,
+                                                 tcd->char_device->dev,
+                                                 NULL, "%s", tcd->device_name);
        rc = IS_ERR(tcd->class_device) ? PTR_ERR(tcd->class_device) : 0;
        if (rc)
                goto fail_with_cdev;
@@ -99,11 +98,10 @@ fail_with_tcd:
 }
 EXPORT_SYMBOL(register_tape_dev);
 
-void unregister_tape_dev(struct tape_class_device *tcd)
+void unregister_tape_dev(struct device *device, struct tape_class_device *tcd)
 {
        if (tcd != NULL && !IS_ERR(tcd)) {
-               sysfs_remove_link(&tcd->class_device->kobj,
-                                 tcd->mode_name);
+               sysfs_remove_link(&device->kobj, tcd->mode_name);
                device_destroy(tape_class, tcd->char_device->dev);
                cdev_del(tcd->char_device);
                kfree(tcd);