aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/vmlogrdr.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2007-10-22 06:52:42 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-10-22 06:52:48 -0400
commit7f021ce1957504cacc78896de857b90293badabc (patch)
tree7784c56c9887742c40e68a09c9855f29991f06e9 /drivers/s390/char/vmlogrdr.c
parent5bf04b2062c5b441d7154216694fea7dc2a6a7f3 (diff)
[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/vmlogrdr.c')
-rw-r--r--drivers/s390/char/vmlogrdr.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index 12f7a4ce82c1..e0c4c508e121 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -74,7 +74,7 @@ struct vmlogrdr_priv_t {
74 int dev_in_use; /* 1: already opened, 0: not opened*/ 74 int dev_in_use; /* 1: already opened, 0: not opened*/
75 spinlock_t priv_lock; 75 spinlock_t priv_lock;
76 struct device *device; 76 struct device *device;
77 struct class_device *class_device; 77 struct device *class_device;
78 int autorecording; 78 int autorecording;
79 int autopurge; 79 int autopurge;
80}; 80};
@@ -762,12 +762,10 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
762 device_unregister(dev); 762 device_unregister(dev);
763 return ret; 763 return ret;
764 } 764 }
765 priv->class_device = class_device_create( 765 priv->class_device = device_create(vmlogrdr_class, dev,
766 vmlogrdr_class, 766 MKDEV(vmlogrdr_major,
767 NULL, 767 priv->minor_num),
768 MKDEV(vmlogrdr_major, priv->minor_num), 768 "%s", dev->bus_id);
769 dev,
770 "%s", dev->bus_id );
771 if (IS_ERR(priv->class_device)) { 769 if (IS_ERR(priv->class_device)) {
772 ret = PTR_ERR(priv->class_device); 770 ret = PTR_ERR(priv->class_device);
773 priv->class_device=NULL; 771 priv->class_device=NULL;
@@ -783,8 +781,7 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
783 781
784static int vmlogrdr_unregister_device(struct vmlogrdr_priv_t *priv) 782static int vmlogrdr_unregister_device(struct vmlogrdr_priv_t *priv)
785{ 783{
786 class_device_destroy(vmlogrdr_class, 784 device_destroy(vmlogrdr_class, MKDEV(vmlogrdr_major, priv->minor_num));
787 MKDEV(vmlogrdr_major, priv->minor_num));
788 if (priv->device != NULL) { 785 if (priv->device != NULL) {
789 sysfs_remove_group(&priv->device->kobj, &vmlogrdr_attr_group); 786 sysfs_remove_group(&priv->device->kobj, &vmlogrdr_attr_group);
790 device_unregister(priv->device); 787 device_unregister(priv->device);