basic modification from way back
[powerpc.git] / drivers / pcmcia / at91_cf.c
index b674630..948efc7 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/platform_device.h>
 #include <linux/errno.h>
 #include <linux/init.h>
@@ -23,9 +22,9 @@
 #include <asm/io.h>
 #include <asm/sizes.h>
 
-#include <asm/arch/at91rm9200.h>
 #include <asm/arch/board.h>
 #include <asm/arch/gpio.h>
+#include <asm/arch/at91rm9200_mc.h>
 
 
 /*
@@ -230,7 +229,7 @@ static int __init at91_cf_probe(struct platform_device *pdev)
        if (!io)
                return -ENODEV;
 
-       cf = kcalloc(1, sizeof *cf, GFP_KERNEL);
+       cf = kzalloc(sizeof *cf, GFP_KERNEL);
        if (!cf)
                return -ENOMEM;
 
@@ -278,7 +277,7 @@ static int __init at91_cf_probe(struct platform_device *pdev)
                board->det_pin, board->irq_pin);
 
        cf->socket.owner = THIS_MODULE;
-       cf->socket.dev.dev = &pdev->dev;
+       cf->socket.dev.parent = &pdev->dev;
        cf->socket.ops = &at91_cf_ops;
        cf->socket.resource_ops = &pccard_static_ops;
        cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP
@@ -361,7 +360,6 @@ static struct platform_driver at91_cf_driver = {
                .name           = (char *) driver_name,
                .owner          = THIS_MODULE,
        },
-       .probe          = at91_cf_probe,
        .remove         = __exit_p(at91_cf_remove),
        .suspend        = at91_cf_suspend,
        .resume         = at91_cf_resume,
@@ -371,7 +369,7 @@ static struct platform_driver at91_cf_driver = {
 
 static int __init at91_cf_init(void)
 {
-       return platform_driver_register(&at91_cf_driver);
+       return platform_driver_probe(&at91_cf_driver, at91_cf_probe);
 }
 module_init(at91_cf_init);