]> err.no Git - linux-2.6/blobdiff - drivers/s390/char/vmlogrdr.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild
[linux-2.6] / drivers / s390 / char / vmlogrdr.c
index a5a00e9ae4d01aacf3407a6e813f2ce3fb15623e..e0c4c508e12181b813b51a3926396be5a46e85c9 100644 (file)
@@ -74,7 +74,7 @@ struct vmlogrdr_priv_t {
        int dev_in_use; /* 1: already opened, 0: not opened*/
        spinlock_t priv_lock;
        struct device  *device;
-       struct class_device  *class_device;
+       struct device  *class_device;
        int autorecording;
        int autopurge;
 };
@@ -762,12 +762,10 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
                device_unregister(dev);
                return ret;
        }
-       priv->class_device = class_device_create(
-                               vmlogrdr_class,
-                               NULL,
-                               MKDEV(vmlogrdr_major, priv->minor_num),
-                               dev,
-                               "%s", dev->bus_id );
+       priv->class_device = device_create(vmlogrdr_class, dev,
+                                          MKDEV(vmlogrdr_major,
+                                                priv->minor_num),
+                                          "%s", dev->bus_id);
        if (IS_ERR(priv->class_device)) {
                ret = PTR_ERR(priv->class_device);
                priv->class_device=NULL;
@@ -783,8 +781,7 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
 
 static int vmlogrdr_unregister_device(struct vmlogrdr_priv_t *priv)
 {
-       class_device_destroy(vmlogrdr_class,
-                            MKDEV(vmlogrdr_major, priv->minor_num));
+       device_destroy(vmlogrdr_class, MKDEV(vmlogrdr_major, priv->minor_num));
        if (priv->device != NULL) {
                sysfs_remove_group(&priv->device->kobj, &vmlogrdr_attr_group);
                device_unregister(priv->device);
@@ -835,7 +832,7 @@ static void vmlogrdr_cleanup(void)
 }
 
 
-static int vmlogrdr_init(void)
+static int __init vmlogrdr_init(void)
 {
        int rc;
        int i;
@@ -885,7 +882,7 @@ cleanup:
 }
 
 
-static void vmlogrdr_exit(void)
+static void __exit vmlogrdr_exit(void)
 {
        vmlogrdr_cleanup();
        printk (KERN_INFO "vmlogrdr: driver unloaded\n");