linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / char / vr41xx_giu.c
index 8116a47..2267c7b 100644 (file)
@@ -33,7 +33,6 @@
 #include <asm/cpu.h>
 #include <asm/io.h>
 #include <asm/vr41xx/giu.h>
-#include <asm/vr41xx/irq.h>
 #include <asm/vr41xx/vr41xx.h>
 
 MODULE_AUTHOR("Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>");
@@ -606,7 +605,7 @@ static int gpio_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-static const struct file_operations gpio_fops = {
+static struct file_operations gpio_fops = {
        .owner          = THIS_MODULE,
        .read           = gpio_read,
        .write          = gpio_write,
@@ -614,7 +613,7 @@ static const struct file_operations gpio_fops = {
        .release        = gpio_release,
 };
 
-static int __devinit giu_probe(struct platform_device *dev)
+static int giu_probe(struct platform_device *dev)
 {
        unsigned long start, size, flags = 0;
        unsigned int nr_pins = 0;
@@ -690,15 +689,15 @@ static int __devinit giu_probe(struct platform_device *dev)
 
        for (i = GIU_IRQ_BASE; i <= GIU_IRQ_LAST; i++) {
                if (i < GIU_IRQ(GIUINT_HIGH_OFFSET))
-                       irq_desc[i].chip = &giuint_low_irq_type;
+                       irq_desc[i].handler = &giuint_low_irq_type;
                else
-                       irq_desc[i].chip = &giuint_high_irq_type;
+                       irq_desc[i].handler = &giuint_high_irq_type;
        }
 
        return cascade_irq(GIUINT_IRQ, giu_get_irq);
 }
 
-static int __devexit giu_remove(struct platform_device *dev)
+static int giu_remove(struct platform_device *dev)
 {
        iounmap(giu_base);
 
@@ -713,10 +712,9 @@ static struct platform_device *giu_platform_device;
 
 static struct platform_driver giu_device_driver = {
        .probe          = giu_probe,
-       .remove         = __devexit_p(giu_remove),
+       .remove         = giu_remove,
        .driver         = {
                .name   = "GIU",
-               .owner  = THIS_MODULE,
        },
 };
 
@@ -724,15 +722,9 @@ static int __init vr41xx_giu_init(void)
 {
        int retval;
 
-       giu_platform_device = platform_device_alloc("GIU", -1);
-       if (!giu_platform_device)
-               return -ENOMEM;
-
-       retval = platform_device_add(giu_platform_device);
-       if (retval < 0) {
-               platform_device_put(giu_platform_device);
-               return retval;
-       }
+       giu_platform_device = platform_device_register_simple("GIU", -1, NULL, 0);
+       if (IS_ERR(giu_platform_device))
+               return PTR_ERR(giu_platform_device);
 
        retval = platform_driver_register(&giu_device_driver);
        if (retval < 0)