diff options
Diffstat (limited to 'drivers/s390/char/tape_class.c')
| -rw-r--r-- | drivers/s390/char/tape_class.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index aa7f166f403..91c3c642c76 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c @@ -1,17 +1,22 @@ /* - * (C) Copyright IBM Corp. 2004 - * tape_class.c + * Copyright IBM Corp. 2004 * * Tape class device support * * Author: Stefan Bader <shbader@de.ibm.com> * Based on simple class device code by Greg K-H */ + +#define KMSG_COMPONENT "tape" +#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt + +#include <linux/slab.h> + #include "tape_class.h" MODULE_AUTHOR("Stefan Bader <shbader@de.ibm.com>"); MODULE_DESCRIPTION( - "(C) Copyright IBM Corp. 2004 All Rights Reserved.\n" + "Copyright IBM Corp. 2004 All Rights Reserved.\n" "tape_class.c" ); MODULE_LICENSE("GPL"); @@ -70,10 +75,9 @@ struct tape_class_device *register_tape_dev( goto fail_with_cdev; 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; + tcd->char_device->dev, NULL, + "%s", tcd->device_name); + rc = PTR_RET(tcd->class_device); if (rc) goto fail_with_cdev; rc = sysfs_create_link( @@ -99,11 +103,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); |
