rd: support XIP
[powerpc.git] / drivers / block / aoe / aoechr.c
index e22b4c9..d5480e3 100644 (file)
@@ -233,7 +233,7 @@ loop:
        }
 }
 
-static struct file_operations aoe_fops = {
+static const struct file_operations aoe_fops = {
        .write = aoechr_write,
        .read = aoechr_read,
        .open = aoechr_open,
@@ -259,9 +259,8 @@ aoechr_init(void)
                return PTR_ERR(aoe_class);
        }
        for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
-               class_device_create(aoe_class, NULL,
-                                       MKDEV(AOE_MAJOR, chardevs[i].minor),
-                                       NULL, chardevs[i].name);
+               device_create(aoe_class, NULL,
+                             MKDEV(AOE_MAJOR, chardevs[i].minor), chardevs[i].name);
 
        return 0;
 }
@@ -272,7 +271,7 @@ aoechr_exit(void)
        int i;
 
        for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
-               class_device_destroy(aoe_class, MKDEV(AOE_MAJOR, chardevs[i].minor));
+               device_destroy(aoe_class, MKDEV(AOE_MAJOR, chardevs[i].minor));
        class_destroy(aoe_class);
        unregister_chrdev(AOE_MAJOR, "aoechr");
 }