pcmcia: remove cs_types.h
[linux-2.6.git] / drivers / pcmcia / electra_cf.c
index 52d0aa8..f94d828 100644 (file)
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
+#include <linux/mm.h>
 #include <linux/vmalloc.h>
+#include <linux/of_platform.h>
+#include <linux/slab.h>
 
 #include <pcmcia/ss.h>
-#include <asm/of_platform.h>
 
 static const char driver_name[] = "electra-cf";
 
@@ -183,7 +185,7 @@ static int __devinit electra_cf_probe(struct of_device *ofdev,
                                      const struct of_device_id *match)
 {
        struct device *device = &ofdev->dev;
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct electra_cf_socket   *cf;
        struct resource mem, io;
        int status;
@@ -296,7 +298,7 @@ static int __devinit electra_cf_probe(struct of_device *ofdev,
                goto fail3;
        }
 
-       dev_info(device, "at mem 0x%lx io 0x%lx irq %d\n",
+       dev_info(device, "at mem 0x%lx io 0x%llx irq %d\n",
                 cf->mem_phys, io.start, cf->irq);
 
        cf->active = 1;
@@ -346,7 +348,7 @@ static int __devexit electra_cf_remove(struct of_device *ofdev)
        return 0;
 }
 
-static struct of_device_id electra_cf_match[] = {
+static const struct of_device_id electra_cf_match[] = {
        {
                .compatible   = "electra-cf",
        },
@@ -355,8 +357,11 @@ static struct of_device_id electra_cf_match[] = {
 MODULE_DEVICE_TABLE(of, electra_cf_match);
 
 static struct of_platform_driver electra_cf_driver = {
-       .name      = (char *)driver_name,
-       .match_table    = electra_cf_match,
+       .driver = {
+               .name = (char *)driver_name,
+               .owner = THIS_MODULE,
+               .of_match_table = electra_cf_match,
+       },
        .probe    = electra_cf_probe,
        .remove   = electra_cf_remove,
 };