pcmcia: use autoconfiguration feature for ioports and iomem
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / isdn / hardware / avm / avm_cs.c
index 9dbab9c99beabed2ca18f00a3886f6005d563a08..403a995bec95b0cb5a497fb1cb1315c42ce8c034 100644 (file)
@@ -72,13 +72,8 @@ static void avmcs_detach(struct pcmcia_device *p_dev);
 
 static int avmcs_probe(struct pcmcia_device *p_dev)
 {
-
-    /* The io structure describes IO port mapping */
-    p_dev->resource[0]->end = 16;
-    p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
-
     /* General socket configuration */
-    p_dev->config_flags |= CONF_ENABLE_IRQ;
+    p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
     p_dev->config_index = 1;
     p_dev->config_regs = PRESENT_OPTION;
 
@@ -107,16 +102,12 @@ static void avmcs_detach(struct pcmcia_device *link)
     
 ======================================================================*/
 
-static int avmcs_configcheck(struct pcmcia_device *p_dev,
-                            cistpl_cftable_entry_t *cf,
-                            cistpl_cftable_entry_t *dflt,
-                            void *priv_data)
+static int avmcs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
 {
-       if (cf->io.nwin <= 0)
-               return -ENODEV;
+       p_dev->resource[0]->end = 16;
+       p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
+       p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
 
-       p_dev->resource[0]->start = cf->io.win[0].base;
-       p_dev->resource[0]->end = cf->io.win[0].len;
        return pcmcia_request_io(p_dev);
 }