]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/mtd/maps/pcmciamtd.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[net-next-2.6.git] / drivers / mtd / maps / pcmciamtd.c
index 99c7257363d671d2931bc69b17ca2c15f54c6fa0..91702294839942e8c225ed3f3176011a489d2d61 100644 (file)
@@ -16,7 +16,6 @@
 #include <asm/io.h>
 #include <asm/system.h>
 
-#include <pcmcia/cs.h>
 #include <pcmcia/cistpl.h>
 #include <pcmcia/ds.h>
 
@@ -322,11 +321,6 @@ static void pcmciamtd_set_vpp(struct map_info *map, int on)
 }
 
 
-/* After a card is removed, pcmciamtd_release() will unregister the
- * device, and release the PCMCIA configuration.  If the device is
- * still open, this will be postponed until it is closed.
- */
-
 static void pcmciamtd_release(struct pcmcia_device *link)
 {
        struct pcmciamtd_dev *dev = link->priv;
@@ -476,11 +470,6 @@ static void card_settings(struct pcmciamtd_dev *dev, struct pcmcia_device *p_dev
 }
 
 
-/* pcmciamtd_config() is scheduled to run after a CARD_INSERTION event
- * is received, to configure the PCMCIA socket, and to make the
- * MTD device available to the system.
- */
-
 static int pcmciamtd_config(struct pcmcia_device *link)
 {
        struct pcmciamtd_dev *dev = link->priv;
@@ -568,7 +557,6 @@ static int pcmciamtd_config(struct pcmcia_device *link)
        dev->pcmcia_map.map_priv_2 = (unsigned long)link->resource[2];
 
        dev->vpp = (vpp) ? vpp : link->socket->socket.Vpp;
-       link->conf.Attributes = 0;
        if(setvpp == 2) {
                link->vpp = dev->vpp;
        } else {
@@ -577,7 +565,7 @@ static int pcmciamtd_config(struct pcmcia_device *link)
 
        link->config_index = 0;
        DEBUG(2, "Setting Configuration");
-       ret = pcmcia_request_configuration(link, &link->conf);
+       ret = pcmcia_enable_device(link);
        if (ret != 0) {
                if (dev->win_base) {
                        iounmap(dev->win_base);
@@ -652,10 +640,6 @@ static int pcmciamtd_config(struct pcmcia_device *link)
        }
        dev_info(&dev->p_dev->dev, "mtd%d: %s\n", mtd->index, mtd->name);
        return 0;
-
-       dev_err(&dev->p_dev->dev, "CS Error, exiting\n");
-       pcmciamtd_release(link);
-       return -ENODEV;
 }
 
 
@@ -678,12 +662,6 @@ static int pcmciamtd_resume(struct pcmcia_device *dev)
 }
 
 
-/* This deletes a driver "instance".  The device is de-registered
- * with Card Services.  If it has been released, all local data
- * structures are freed.  Otherwise, the structures will be freed
- * when the device is released.
- */
-
 static void pcmciamtd_detach(struct pcmcia_device *link)
 {
        struct pcmciamtd_dev *dev = link->priv;
@@ -701,11 +679,6 @@ static void pcmciamtd_detach(struct pcmcia_device *link)
 }
 
 
-/* pcmciamtd_attach() creates an "instance" of the driver, allocating
- * local data structures for one device.  The device is registered
- * with Card Services.
- */
-
 static int pcmciamtd_probe(struct pcmcia_device *link)
 {
        struct pcmciamtd_dev *dev;
@@ -718,8 +691,6 @@ static int pcmciamtd_probe(struct pcmcia_device *link)
        dev->p_dev = link;
        link->priv = dev;
 
-       link->conf.Attributes = 0;
-
        return pcmciamtd_config(link);
 }
 
@@ -754,9 +725,7 @@ static struct pcmcia_device_id pcmciamtd_ids[] = {
 MODULE_DEVICE_TABLE(pcmcia, pcmciamtd_ids);
 
 static struct pcmcia_driver pcmciamtd_driver = {
-       .drv            = {
-               .name   = "pcmciamtd"
-       },
+       .name           = "pcmciamtd",
        .probe          = pcmciamtd_probe,
        .remove         = pcmciamtd_detach,
        .owner          = THIS_MODULE,
@@ -768,8 +737,6 @@ static struct pcmcia_driver pcmciamtd_driver = {
 
 static int __init init_pcmciamtd(void)
 {
-       info(DRIVER_DESC);
-
        if(bankwidth && bankwidth != 1 && bankwidth != 2) {
                info("bad bankwidth (%d), using default", bankwidth);
                bankwidth = 2;