Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pcmcia: convert pcmcia_request_configuration to pcmcia_enable_device

pcmcia_enable_device() now replaces pcmcia_request_configuration().
Instead of config_req_t, all necessary flags are either passed as
a parameter to pcmcia_enable_device(), or (in rare circumstances)
set in struct pcmcia_device -> flags.

With the last remaining user of include/pcmcia/cs.h gone, remove
all references.

CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-ide@vger.kernel.org
CC: linux-usb@vger.kernel.org
CC: laforge@gnumonks.org
CC: linux-mtd@lists.infradead.org
CC: alsa-devel@alsa-project.org
CC: linux-serial@vger.kernel.org
CC: Jiri Kosina <jkosina@suse.cz>
CC: linux-scsi@vger.kernel.org
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth)
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

+179 -395
+6
Documentation/pcmcia/driver-changes.txt
··· 1 1 This file details changes in 2.6 which affect PCMCIA card driver authors: 2 + * pcmcia_request_configuration -> pcmcia_enable_device (as of 2.6.36) 3 + pcmcia_request_configuration() got renamed to pcmcia_enable_device(), 4 + as it mirrors pcmcia_disable_device(). Configuration settings are now 5 + stored in struct pcmcia_device, e.g. in the fields config_flags, 6 + config_index, config_base, vpp. 7 + 2 8 * pcmcia_request_window changes (as of 2.6.36) 3 9 Instead of win_req_t, drivers are now requested to fill out 4 10 struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four ioport
+2 -3
drivers/ata/pata_pcmcia.c
··· 34 34 #include <linux/ata.h> 35 35 #include <linux/libata.h> 36 36 37 - #include <pcmcia/cs.h> 38 37 #include <pcmcia/cistpl.h> 39 38 #include <pcmcia/ds.h> 40 39 #include <pcmcia/cisreg.h> ··· 248 249 /* Set up attributes in order to probe card and get resources */ 249 250 pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 250 251 pdev->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 251 - pdev->conf.Attributes = CONF_ENABLE_IRQ; 252 + pdev->config_flags |= CONF_ENABLE_IRQ; 252 253 253 254 /* See if we have a manufacturer identifier. Use it to set is_kme for 254 255 vendor quirks */ ··· 274 275 if (!pdev->irq) 275 276 goto failed; 276 277 277 - ret = pcmcia_request_configuration(pdev, &pdev->conf); 278 + ret = pcmcia_enable_device(pdev); 278 279 if (ret) 279 280 goto failed; 280 281
+2 -3
drivers/bluetooth/bluecard_cs.c
··· 39 39 #include <linux/skbuff.h> 40 40 #include <linux/io.h> 41 41 42 - #include <pcmcia/cs.h> 43 42 #include <pcmcia/cistpl.h> 44 43 #include <pcmcia/ciscode.h> 45 44 #include <pcmcia/ds.h> ··· 864 865 info->p_dev = link; 865 866 link->priv = info; 866 867 867 - link->conf.Attributes = CONF_ENABLE_IRQ; 868 + link->config_flags |= CONF_ENABLE_IRQ; 868 869 869 870 return bluecard_config(link); 870 871 } ··· 904 905 if (i != 0) 905 906 goto failed; 906 907 907 - i = pcmcia_request_configuration(link, &link->conf); 908 + i = pcmcia_enable_device(link); 908 909 if (i != 0) 909 910 goto failed; 910 911
+2 -3
drivers/bluetooth/bt3c_cs.c
··· 45 45 #include <linux/device.h> 46 46 #include <linux/firmware.h> 47 47 48 - #include <pcmcia/cs.h> 49 48 #include <pcmcia/cistpl.h> 50 49 #include <pcmcia/ciscode.h> 51 50 #include <pcmcia/ds.h> ··· 659 660 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 660 661 link->resource[0]->end = 8; 661 662 662 - link->conf.Attributes = CONF_ENABLE_IRQ; 663 + link->config_flags |= CONF_ENABLE_IRQ; 663 664 664 665 return bt3c_config(link); 665 666 } ··· 740 741 if (i != 0) 741 742 goto failed; 742 743 743 - i = pcmcia_request_configuration(link, &link->conf); 744 + i = pcmcia_enable_device(link); 744 745 if (i != 0) 745 746 goto failed; 746 747
+2 -3
drivers/bluetooth/btuart_cs.c
··· 41 41 #include <asm/system.h> 42 42 #include <asm/io.h> 43 43 44 - #include <pcmcia/cs.h> 45 44 #include <pcmcia/cistpl.h> 46 45 #include <pcmcia/ciscode.h> 47 46 #include <pcmcia/ds.h> ··· 588 589 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 589 590 link->resource[0]->end = 8; 590 591 591 - link->conf.Attributes = CONF_ENABLE_IRQ; 592 + link->config_flags |= CONF_ENABLE_IRQ; 592 593 593 594 return btuart_config(link); 594 595 } ··· 669 670 if (i != 0) 670 671 goto failed; 671 672 672 - i = pcmcia_request_configuration(link, &link->conf); 673 + i = pcmcia_enable_device(link); 673 674 if (i != 0) 674 675 goto failed; 675 676
+2 -3
drivers/bluetooth/dtl1_cs.c
··· 41 41 #include <asm/system.h> 42 42 #include <asm/io.h> 43 43 44 - #include <pcmcia/cs.h> 45 44 #include <pcmcia/cistpl.h> 46 45 #include <pcmcia/ciscode.h> 47 46 #include <pcmcia/ds.h> ··· 574 575 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 575 576 link->resource[0]->end = 8; 576 577 577 - link->conf.Attributes = CONF_ENABLE_IRQ; 578 + link->config_flags |= CONF_ENABLE_IRQ; 578 579 579 580 return dtl1_config(link); 580 581 } ··· 618 619 if (i != 0) 619 620 goto failed; 620 621 621 - i = pcmcia_request_configuration(link, &link->conf); 622 + i = pcmcia_enable_device(link); 622 623 if (i != 0) 623 624 goto failed; 624 625
+1 -2
drivers/char/pcmcia/cm4000_cs.c
··· 34 34 #include <linux/uaccess.h> 35 35 #include <linux/io.h> 36 36 37 - #include <pcmcia/cs.h> 38 37 #include <pcmcia/cistpl.h> 39 38 #include <pcmcia/cisreg.h> 40 39 #include <pcmcia/ciscode.h> ··· 1766 1767 if (pcmcia_loop_config(link, cm4000_config_check, NULL)) 1767 1768 goto cs_release; 1768 1769 1769 - if (pcmcia_request_configuration(link, &link->conf)) 1770 + if (pcmcia_enable_device(link)) 1770 1771 goto cs_release; 1771 1772 1772 1773 dev = link->priv;
+2 -3
drivers/char/pcmcia/cm4040_cs.c
··· 29 29 #include <asm/uaccess.h> 30 30 #include <asm/io.h> 31 31 32 - #include <pcmcia/cs.h> 33 32 #include <pcmcia/cistpl.h> 34 33 #include <pcmcia/cisreg.h> 35 34 #include <pcmcia/ciscode.h> ··· 546 547 if (pcmcia_loop_config(link, cm4040_config_check, NULL)) 547 548 goto cs_release; 548 549 549 - fail_rc = pcmcia_request_configuration(link, &link->conf); 550 + fail_rc = pcmcia_enable_device(link); 550 551 if (fail_rc != 0) { 551 552 dev_printk(KERN_INFO, &link->dev, 552 - "pcmcia_request_configuration failed 0x%x\n", 553 + "pcmcia_enable_device failed 0x%x\n", 553 554 fail_rc); 554 555 goto cs_release; 555 556 }
+2 -4
drivers/char/pcmcia/ipwireless/main.c
··· 32 32 #include <pcmcia/device_id.h> 33 33 #include <pcmcia/ss.h> 34 34 #include <pcmcia/ds.h> 35 - #include <pcmcia/cs.h> 36 35 37 36 static struct pcmcia_device_id ipw_ids[] = { 38 37 PCMCIA_DEVICE_MANF_CARD(0x02f2, 0x0100), ··· 171 172 if (ret != 0) 172 173 return ret; 173 174 174 - link->conf.Attributes = CONF_ENABLE_IRQ; 175 + link->config_flags |= CONF_ENABLE_IRQ; 175 176 176 177 INIT_WORK(&ipw->work_reboot, signalled_reboot_work); 177 178 ··· 209 210 * Do the RequestConfiguration last, because it enables interrupts. 210 211 * Then we don't get any interrupts before we're ready for them. 211 212 */ 212 - ret = pcmcia_request_configuration(link, &link->conf); 213 - 213 + ret = pcmcia_enable_device(link); 214 214 if (ret != 0) 215 215 goto exit; 216 216
-1
drivers/char/pcmcia/ipwireless/main.h
··· 21 21 #include <linux/sched.h> 22 22 #include <linux/types.h> 23 23 24 - #include <pcmcia/cs.h> 25 24 #include <pcmcia/cistpl.h> 26 25 #include <pcmcia/ds.h> 27 26
-1
drivers/char/pcmcia/ipwireless/tty.h
··· 21 21 #include <linux/types.h> 22 22 #include <linux/sched.h> 23 23 24 - #include <pcmcia/cs.h> 25 24 #include <pcmcia/cistpl.h> 26 25 #include <pcmcia/ds.h> 27 26
+3 -3
drivers/ide/ide-cs.c
··· 43 43 #include <asm/io.h> 44 44 #include <asm/system.h> 45 45 46 - #include <pcmcia/cs.h> 47 46 #include <pcmcia/cistpl.h> 48 47 #include <pcmcia/ds.h> 49 48 #include <pcmcia/cisreg.h> ··· 98 99 99 100 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 100 101 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 101 - link->conf.Attributes = CONF_ENABLE_IRQ; 102 + link->config_flags |= CONF_ENABLE_IRQ; 102 103 103 104 return ide_config(link); 104 105 } /* ide_attach */ ··· 283 284 284 285 if (!link->irq) 285 286 goto failed; 286 - ret = pcmcia_request_configuration(link, &link->conf); 287 + 288 + ret = pcmcia_enable_device(link); 287 289 if (ret) 288 290 goto failed; 289 291
+2 -3
drivers/isdn/hardware/avm/avm_cs.c
··· 20 20 #include <asm/io.h> 21 21 #include <asm/system.h> 22 22 23 - #include <pcmcia/cs.h> 24 23 #include <pcmcia/cistpl.h> 25 24 #include <pcmcia/ciscode.h> 26 25 #include <pcmcia/ds.h> ··· 78 79 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 79 80 80 81 /* General socket configuration */ 81 - p_dev->conf.Attributes = CONF_ENABLE_IRQ; 82 + p_dev->config_flags |= CONF_ENABLE_IRQ; 82 83 p_dev->config_index = 1; 83 84 p_dev->config_regs = PRESENT_OPTION; 84 85 ··· 148 149 /* 149 150 * configure the PCMCIA socket 150 151 */ 151 - i = pcmcia_request_configuration(link, &link->conf); 152 + i = pcmcia_enable_device(link); 152 153 if (i != 0) { 153 154 pcmcia_disable_device(link); 154 155 break;
+2 -3
drivers/isdn/hisax/avma1_cs.c
··· 20 20 #include <asm/io.h> 21 21 #include <asm/system.h> 22 22 23 - #include <pcmcia/cs.h> 24 23 #include <pcmcia/cistpl.h> 25 24 #include <pcmcia/ds.h> 26 25 #include "hisax_cfg.h" ··· 83 84 p_dev->resource[1]->flags |= IO_DATA_PATH_WIDTH_16; 84 85 85 86 /* General socket configuration */ 86 - p_dev->conf.Attributes = CONF_ENABLE_IRQ; 87 + p_dev->config_flags |= CONF_ENABLE_IRQ; 87 88 p_dev->config_index = 1; 88 89 p_dev->config_regs = PRESENT_OPTION; 89 90 ··· 159 160 /* 160 161 * configure the PCMCIA socket 161 162 */ 162 - i = pcmcia_request_configuration(link, &link->conf); 163 + i = pcmcia_enable_device(link); 163 164 if (i != 0) { 164 165 pcmcia_disable_device(link); 165 166 break;
+2 -6
drivers/isdn/hisax/elsa_cs.c
··· 46 46 #include <asm/io.h> 47 47 #include <asm/system.h> 48 48 49 - #include <pcmcia/cs.h> 50 49 #include <pcmcia/cistpl.h> 51 50 #include <pcmcia/cisreg.h> 52 51 #include <pcmcia/ds.h> ··· 128 129 link->resource[0]->end = 8; 129 130 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 130 131 131 - link->conf.Attributes = CONF_ENABLE_IRQ; 132 - 133 132 return elsa_cs_config(link); 134 133 } /* elsa_cs_attach */ 135 134 ··· 202 205 if (!link->irq) 203 206 goto failed; 204 207 205 - i = pcmcia_request_configuration(link, &link->conf); 208 + i = pcmcia_enable_device(link); 206 209 if (i != 0) 207 210 goto failed; 208 211 209 212 /* Finally, report what we've done */ 210 213 dev_info(&link->dev, "index 0x%02x: ", 211 214 link->config_index); 212 - if (link->conf.Attributes & CONF_ENABLE_IRQ) 213 - printk(", irq %d", link->irq); 215 + printk(", irq %d", link->irq); 214 216 if (link->resource[0]) 215 217 printk(" & %pR", link->resource[0]); 216 218 if (link->resource[1])
+4 -8
drivers/isdn/hisax/sedlbauer_cs.c
··· 46 46 #include <asm/io.h> 47 47 #include <asm/system.h> 48 48 49 - #include <pcmcia/cs.h> 50 49 #include <pcmcia/cistpl.h> 51 50 #include <pcmcia/cisreg.h> 52 51 #include <pcmcia/ds.h> ··· 131 132 link->resource[0]->end = 8; 132 133 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 133 134 134 - link->conf.Attributes = 0; 135 - 136 135 return sedlbauer_config(link); 137 136 } /* sedlbauer_attach */ 138 137 ··· 172 175 173 176 /* Does this card need audio output? */ 174 177 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 175 - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 178 + p_dev->config_flags |= CONF_ENABLE_SPKR; 176 179 177 180 /* Use power settings for Vcc and Vpp if present */ 178 181 /* Note that the CIS values need to be rescaled */ ··· 189 192 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) 190 193 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; 191 194 192 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 195 + p_dev->config_flags |= CONF_ENABLE_IRQ; 193 196 194 197 /* IO window settings */ 195 198 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 244 247 the I/O windows and the interrupt mapping, and putting the 245 248 card and host interface into "Memory and IO" mode. 246 249 */ 247 - ret = pcmcia_request_configuration(link, &link->conf); 250 + ret = pcmcia_enable_device(link); 248 251 if (ret) 249 252 goto failed; 250 253 ··· 253 256 link->config_index); 254 257 if (link->vpp) 255 258 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); 256 - if (link->conf.Attributes & CONF_ENABLE_IRQ) 257 - printk(", irq %d", link->irq); 259 + printk(", irq %d", link->irq); 258 260 if (link->resource[0]) 259 261 printk(" & %pR", link->resource[0]); 260 262 if (link->resource[1])
+3 -5
drivers/isdn/hisax/teles_cs.c
··· 27 27 #include <asm/io.h> 28 28 #include <asm/system.h> 29 29 30 - #include <pcmcia/cs.h> 31 30 #include <pcmcia/cistpl.h> 32 31 #include <pcmcia/cisreg.h> 33 32 #include <pcmcia/ds.h> ··· 108 109 link->resource[0]->end = 96; 109 110 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 110 111 111 - link->conf.Attributes = CONF_ENABLE_IRQ; 112 + link->config_flags |= CONF_ENABLE_IRQ; 112 113 113 114 return teles_cs_config(link); 114 115 } /* teles_attach */ ··· 184 185 if (!link->irq) 185 186 goto cs_failed; 186 187 187 - i = pcmcia_request_configuration(link, &link->conf); 188 + i = pcmcia_enable_device(link); 188 189 if (i != 0) 189 190 goto cs_failed; 190 191 191 192 /* Finally, report what we've done */ 192 193 dev_info(&link->dev, "index 0x%02x:", 193 194 link->config_index); 194 - if (link->conf.Attributes & CONF_ENABLE_IRQ) 195 - printk(", irq %d", link->irq); 195 + printk(", irq %d", link->irq); 196 196 if (link->resource[0]) 197 197 printk(" & %pR", link->resource[0]); 198 198 if (link->resource[1])
-1
drivers/mmc/host/sdricoh_cs.c
··· 30 30 #include <linux/ioport.h> 31 31 #include <linux/scatterlist.h> 32 32 33 - #include <pcmcia/cs.h> 34 33 #include <pcmcia/cistpl.h> 35 34 #include <pcmcia/ds.h> 36 35 #include <linux/io.h>
+1 -5
drivers/mtd/maps/pcmciamtd.c
··· 16 16 #include <asm/io.h> 17 17 #include <asm/system.h> 18 18 19 - #include <pcmcia/cs.h> 20 19 #include <pcmcia/cistpl.h> 21 20 #include <pcmcia/ds.h> 22 21 ··· 567 568 dev->pcmcia_map.map_priv_2 = (unsigned long)link->resource[2]; 568 569 569 570 dev->vpp = (vpp) ? vpp : link->socket->socket.Vpp; 570 - link->conf.Attributes = 0; 571 571 if(setvpp == 2) { 572 572 link->vpp = dev->vpp; 573 573 } else { ··· 575 577 576 578 link->config_index = 0; 577 579 DEBUG(2, "Setting Configuration"); 578 - ret = pcmcia_request_configuration(link, &link->conf); 580 + ret = pcmcia_enable_device(link); 579 581 if (ret != 0) { 580 582 if (dev->win_base) { 581 583 iounmap(dev->win_base); ··· 715 717 716 718 dev->p_dev = link; 717 719 link->priv = dev; 718 - 719 - link->conf.Attributes = 0; 720 720 721 721 return pcmciamtd_config(link); 722 722 }
+2 -3
drivers/net/pcmcia/3c574_cs.c
··· 87 87 #include <linux/bitops.h> 88 88 #include <linux/mii.h> 89 89 90 - #include <pcmcia/cs.h> 91 90 #include <pcmcia/cistpl.h> 92 91 #include <pcmcia/cisreg.h> 93 92 #include <pcmcia/ciscode.h> ··· 279 280 spin_lock_init(&lp->window_lock); 280 281 link->resource[0]->end = 32; 281 282 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; 282 - link->conf.Attributes = CONF_ENABLE_IRQ; 283 + link->config_flags |= CONF_ENABLE_IRQ; 283 284 link->config_index = 1; 284 285 285 286 dev->netdev_ops = &el3_netdev_ops; ··· 350 351 if (ret) 351 352 goto failed; 352 353 353 - ret = pcmcia_request_configuration(link, &link->conf); 354 + ret = pcmcia_enable_device(link); 354 355 if (ret) 355 356 goto failed; 356 357
+2 -3
drivers/net/pcmcia/3c589_cs.c
··· 41 41 #include <linux/bitops.h> 42 42 #include <linux/jiffies.h> 43 43 44 - #include <pcmcia/cs.h> 45 44 #include <pcmcia/cistpl.h> 46 45 #include <pcmcia/cisreg.h> 47 46 #include <pcmcia/ciscode.h> ··· 215 216 link->resource[0]->end = 16; 216 217 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; 217 218 218 - link->conf.Attributes = CONF_ENABLE_IRQ; 219 + link->config_flags |= CONF_ENABLE_IRQ; 219 220 link->config_index = 1; 220 221 221 222 dev->netdev_ops = &el3_netdev_ops; ··· 292 293 if (ret) 293 294 goto failed; 294 295 295 - ret = pcmcia_request_configuration(link, &link->conf); 296 + ret = pcmcia_enable_device(link); 296 297 if (ret) 297 298 goto failed; 298 299
+5 -5
drivers/net/pcmcia/axnet_cs.c
··· 39 39 #include <linux/mii.h> 40 40 #include "../8390.h" 41 41 42 - #include <pcmcia/cs.h> 43 42 #include <pcmcia/cistpl.h> 44 43 #include <pcmcia/ciscode.h> 45 44 #include <pcmcia/ds.h> ··· 165 166 info = PRIV(dev); 166 167 info->p_dev = link; 167 168 link->priv = dev; 168 - link->conf.Attributes = CONF_ENABLE_IRQ; 169 + link->config_flags |= CONF_ENABLE_IRQ; 169 170 170 171 dev->netdev_ops = &axnet_netdev_ops; 171 172 ··· 331 332 332 333 if (!link->irq) 333 334 goto failed; 334 - 335 + 336 + link->config_flags |= CONF_ENABLE_IRQ; 335 337 if (resource_size(link->resource[1]) == 8) 336 - link->conf.Attributes |= CONF_ENABLE_SPKR; 338 + link->config_flags |= CONF_ENABLE_SPKR; 337 339 338 - ret = pcmcia_request_configuration(link, &link->conf); 340 + ret = pcmcia_enable_device(link); 339 341 if (ret) 340 342 goto failed; 341 343
+2 -3
drivers/net/pcmcia/com20020_cs.c
··· 43 43 #include <linux/arcdevice.h> 44 44 #include <linux/com20020.h> 45 45 46 - #include <pcmcia/cs.h> 47 46 #include <pcmcia/cistpl.h> 48 47 #include <pcmcia/ds.h> 49 48 ··· 159 160 160 161 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 161 162 p_dev->resource[0]->end = 16; 162 - p_dev->conf.Attributes = CONF_ENABLE_IRQ; 163 + p_dev->config_flags |= CONF_ENABLE_IRQ; 163 164 164 165 info->dev = dev; 165 166 p_dev->priv = info; ··· 280 281 281 282 dev->irq = link->irq; 282 283 283 - ret = pcmcia_request_configuration(link, &link->conf); 284 + ret = pcmcia_enable_device(link); 284 285 if (ret) 285 286 goto failed; 286 287
+2 -3
drivers/net/pcmcia/fmvj18x_cs.c
··· 49 49 #include <linux/ioport.h> 50 50 #include <linux/crc32.h> 51 51 52 - #include <pcmcia/cs.h> 53 52 #include <pcmcia/cistpl.h> 54 53 #include <pcmcia/ciscode.h> 55 54 #include <pcmcia/ds.h> ··· 251 252 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 252 253 253 254 /* General socket configuration */ 254 - link->conf.Attributes = CONF_ENABLE_IRQ; 255 + link->config_flags |= CONF_ENABLE_IRQ; 255 256 256 257 dev->netdev_ops = &fjn_netdev_ops; 257 258 dev->watchdog_timeo = TX_TIMEOUT; ··· 430 431 ret = pcmcia_request_irq(link, fjn_interrupt); 431 432 if (ret) 432 433 goto failed; 433 - ret = pcmcia_request_configuration(link, &link->conf); 434 + ret = pcmcia_enable_device(link); 434 435 if (ret) 435 436 goto failed; 436 437
+2 -3
drivers/net/pcmcia/ibmtr_cs.c
··· 57 57 #include <linux/trdevice.h> 58 58 #include <linux/ibmtr.h> 59 59 60 - #include <pcmcia/cs.h> 61 60 #include <pcmcia/cistpl.h> 62 61 #include <pcmcia/ds.h> 63 62 ··· 151 152 152 153 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 153 154 link->resource[0]->end = 4; 154 - link->conf.Attributes = CONF_ENABLE_IRQ; 155 + link->config_flags |= CONF_ENABLE_IRQ; 155 156 link->config_regs = PRESENT_OPTION; 156 157 157 158 info->dev = dev; ··· 268 269 resource_size(link->resource[3])); 269 270 ti->sram_phys = link->resource[3]->start; 270 271 271 - ret = pcmcia_request_configuration(link, &link->conf); 272 + ret = pcmcia_enable_device(link); 272 273 if (ret) 273 274 goto failed; 274 275
+2 -3
drivers/net/pcmcia/nmclan_cs.c
··· 146 146 #include <linux/ioport.h> 147 147 #include <linux/bitops.h> 148 148 149 - #include <pcmcia/cs.h> 150 149 #include <pcmcia/cisreg.h> 151 150 #include <pcmcia/cistpl.h> 152 151 #include <pcmcia/ds.h> ··· 459 460 spin_lock_init(&lp->bank_lock); 460 461 link->resource[0]->end = 32; 461 462 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 462 - link->conf.Attributes = CONF_ENABLE_IRQ; 463 + link->config_flags |= CONF_ENABLE_IRQ; 463 464 link->config_index = 1; 464 465 link->config_regs = PRESENT_OPTION; 465 466 ··· 648 649 ret = pcmcia_request_exclusive_irq(link, mace_interrupt); 649 650 if (ret) 650 651 goto failed; 651 - ret = pcmcia_request_configuration(link, &link->conf); 652 + ret = pcmcia_enable_device(link); 652 653 if (ret) 653 654 goto failed; 654 655
+3 -4
drivers/net/pcmcia/pcnet_cs.c
··· 42 42 #include <linux/mii.h> 43 43 #include "../8390.h" 44 44 45 - #include <pcmcia/cs.h> 46 45 #include <pcmcia/cistpl.h> 47 46 #include <pcmcia/ciscode.h> 48 47 #include <pcmcia/ds.h> ··· 259 260 info->p_dev = link; 260 261 link->priv = dev; 261 262 262 - link->conf.Attributes = CONF_ENABLE_IRQ; 263 + link->config_flags |= CONF_ENABLE_IRQ; 263 264 264 265 dev->netdev_ops = &pcnet_netdev_ops; 265 266 ··· 559 560 return NULL; 560 561 561 562 if (resource_size(link->resource[1]) == 8) 562 - link->conf.Attributes |= CONF_ENABLE_SPKR; 563 + link->config_flags |= CONF_ENABLE_SPKR; 563 564 564 565 if ((link->manf_id == MANFID_IBM) && 565 566 (link->card_id == PRODID_IBM_HOME_AND_AWAY)) 566 567 link->config_index |= 0x10; 567 568 568 - ret = pcmcia_request_configuration(link, &link->conf); 569 + ret = pcmcia_enable_device(link); 569 570 if (ret) 570 571 return NULL; 571 572
+4 -5
drivers/net/pcmcia/smc91c92_cs.c
··· 44 44 #include <linux/jiffies.h> 45 45 #include <linux/firmware.h> 46 46 47 - #include <pcmcia/cs.h> 48 47 #include <pcmcia/cistpl.h> 49 48 #include <pcmcia/cisreg.h> 50 49 #include <pcmcia/ciscode.h> ··· 325 326 spin_lock_init(&smc->lock); 326 327 link->resource[0]->end = 16; 327 328 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 328 - link->conf.Attributes = CONF_ENABLE_IRQ; 329 + link->config_flags |= CONF_ENABLE_IRQ; 329 330 330 331 /* The SMC91c92-specific entries in the device structure. */ 331 332 dev->netdev_ops = &smc_netdev_ops; ··· 443 444 unsigned int offset; 444 445 int i; 445 446 446 - link->conf.Attributes |= CONF_ENABLE_SPKR; 447 + link->config_flags |= CONF_ENABLE_SPKR; 447 448 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 448 449 link->resource[1]->end = 8; 449 450 ··· 636 637 static const unsigned int com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; 637 638 int i, j; 638 639 639 - link->conf.Attributes |= CONF_ENABLE_SPKR; 640 + link->config_flags |= CONF_ENABLE_SPKR; 640 641 link->resource[0]->end = 64; 641 642 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 642 643 link->resource[1]->end = 8; ··· 861 862 i = pcmcia_request_irq(link, smc_interrupt); 862 863 if (i) 863 864 goto config_failed; 864 - i = pcmcia_request_configuration(link, &link->conf); 865 + i = pcmcia_enable_device(link); 865 866 if (i) 866 867 goto config_failed; 867 868
+6 -6
drivers/net/pcmcia/xirc2ps_cs.c
··· 82 82 #include <linux/bitops.h> 83 83 #include <linux/mii.h> 84 84 85 - #include <pcmcia/cs.h> 86 85 #include <pcmcia/cistpl.h> 87 86 #include <pcmcia/cisreg.h> 88 87 #include <pcmcia/ciscode.h> ··· 528 529 link->priv = dev; 529 530 530 531 /* General socket configuration */ 531 - link->conf.Attributes = CONF_ENABLE_IRQ; 532 + link->config_flags |= CONF_ENABLE_IRQ; 532 533 link->config_index = 1; 533 534 534 535 /* Fill in card specific entries */ ··· 810 811 if (local->modem) { 811 812 int pass; 812 813 813 - if (do_sound) 814 - link->conf.Attributes |= CONF_ENABLE_SPKR; 815 - 816 814 link->resource[1]->end = 8; 817 815 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 818 816 if (local->dingo) { ··· 859 863 * This actually configures the PCMCIA socket -- setting up 860 864 * the I/O windows and the interrupt mapping. 861 865 */ 862 - if ((err=pcmcia_request_configuration(link, &link->conf))) 866 + link->config_flags |= CONF_ENABLE_IRQ; 867 + if (do_sound) 868 + link->config_flags |= CONF_ENABLE_SPKR; 869 + 870 + if ((err = pcmcia_enable_device(link))) 863 871 goto config_error; 864 872 865 873 if (local->dingo) {
+3 -13
drivers/net/wireless/airo_cs.c
··· 32 32 #include <linux/timer.h> 33 33 #include <linux/netdevice.h> 34 34 35 - #include <pcmcia/cs.h> 36 35 #include <pcmcia/cistpl.h> 37 36 #include <pcmcia/cisreg.h> 38 37 #include <pcmcia/ds.h> ··· 95 96 96 97 dev_dbg(&p_dev->dev, "airo_attach()\n"); 97 98 98 - /* 99 - General socket configuration defaults can go here. In this 100 - client, we assume very little, and rely on the CIS for almost 101 - everything. In most clients, many details (i.e., number, sizes, 102 - and attributes of IO windows) are fixed by the nature of the 103 - device, and can be hard-wired here. 104 - */ 105 - p_dev->conf.Attributes = 0; 106 - 107 99 /* Allocate space for private device-specific data */ 108 100 local = kzalloc(sizeof(local_info_t), GFP_KERNEL); 109 101 if (!local) { ··· 148 158 149 159 /* Does this card need audio output? */ 150 160 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 151 - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 161 + p_dev->config_flags |= CONF_ENABLE_SPKR; 152 162 153 163 /* Use power settings for Vcc and Vpp if present */ 154 164 /* Note that the CIS values need to be rescaled */ ··· 157 167 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) 158 168 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; 159 169 160 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 170 + p_dev->config_flags |= CONF_ENABLE_IRQ; 161 171 162 172 /* IO window settings */ 163 173 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 219 229 the I/O windows and the interrupt mapping, and putting the 220 230 card and host interface into "Memory and IO" mode. 221 231 */ 222 - ret = pcmcia_request_configuration(link, &link->conf); 232 + ret = pcmcia_enable_device(link); 223 233 if (ret) 224 234 goto failed; 225 235 ((local_info_t *)link->priv)->eth_dev =
+3 -13
drivers/net/wireless/atmel_cs.c
··· 42 42 #include <linux/moduleparam.h> 43 43 #include <linux/device.h> 44 44 45 - #include <pcmcia/cs.h> 46 45 #include <pcmcia/cistpl.h> 47 46 #include <pcmcia/cisreg.h> 48 47 #include <pcmcia/ds.h> ··· 105 106 106 107 dev_dbg(&p_dev->dev, "atmel_attach()\n"); 107 108 108 - /* 109 - General socket configuration defaults can go here. In this 110 - client, we assume very little, and rely on the CIS for almost 111 - everything. In most clients, many details (i.e., number, sizes, 112 - and attributes of IO windows) are fixed by the nature of the 113 - device, and can be hard-wired here. 114 - */ 115 - p_dev->conf.Attributes = 0; 116 - 117 109 /* Allocate space for private device-specific data */ 118 110 local = kzalloc(sizeof(local_info_t), GFP_KERNEL); 119 111 if (!local) { ··· 165 175 166 176 /* Does this card need audio output? */ 167 177 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 168 - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 178 + p_dev->config_flags |= CONF_ENABLE_SPKR; 169 179 170 180 /* Use power settings for Vcc and Vpp if present */ 171 181 /* Note that the CIS values need to be rescaled */ ··· 174 184 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) 175 185 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; 176 186 177 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 187 + p_dev->config_flags |= CONF_ENABLE_IRQ; 178 188 179 189 /* IO window settings */ 180 190 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 232 242 the I/O windows and the interrupt mapping, and putting the 233 243 card and host interface into "Memory and IO" mode. 234 244 */ 235 - ret = pcmcia_request_configuration(link, &link->conf); 245 + ret = pcmcia_enable_device(link); 236 246 if (ret) 237 247 goto failed; 238 248
+2 -3
drivers/net/wireless/b43/pcmcia.c
··· 26 26 #include <linux/ssb/ssb.h> 27 27 #include <linux/slab.h> 28 28 29 - #include <pcmcia/cs.h> 30 29 #include <pcmcia/cistpl.h> 31 30 #include <pcmcia/ciscode.h> 32 31 #include <pcmcia/ds.h> ··· 71 72 72 73 err = -ENODEV; 73 74 74 - dev->conf.Attributes = CONF_ENABLE_IRQ; 75 + dev->config_flags |= CONF_ENABLE_IRQ; 75 76 76 77 dev->resource[2]->flags |= WIN_ENABLE | WIN_DATA_WIDTH_16 | 77 78 WIN_USE_WAIT; ··· 88 89 if (!dev->irq) 89 90 goto err_disable; 90 91 91 - res = pcmcia_request_configuration(dev, &dev->conf); 92 + res = pcmcia_enable_device(dev); 92 93 if (res != 0) 93 94 goto err_disable; 94 95
+4 -6
drivers/net/wireless/hostap/hostap_cs.c
··· 12 12 #include <linux/wireless.h> 13 13 #include <net/iw_handler.h> 14 14 15 - #include <pcmcia/cs.h> 16 15 #include <pcmcia/cistpl.h> 17 16 #include <pcmcia/cisreg.h> 18 17 #include <pcmcia/ds.h> ··· 483 484 484 485 /* Does this card need audio output? */ 485 486 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 486 - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 487 + p_dev->config_flags |= CONF_ENABLE_SPKR; 487 488 488 489 /* Use power settings for Vcc and Vpp if present */ 489 490 /* Note that the CIS values need to be rescaled */ ··· 509 510 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; 510 511 511 512 /* Do we need to allocate an interrupt? */ 512 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 513 + p_dev->config_flags |= CONF_ENABLE_IRQ; 513 514 514 515 /* IO window settings */ 515 516 PDEBUG(DEBUG_EXTRA, "IO window settings: cfg->io.nwin=%d " ··· 589 590 * the I/O windows and the interrupt mapping, and putting the 590 591 * card and host interface into "Memory and IO" mode. 591 592 */ 592 - ret = pcmcia_request_configuration(link, &link->conf); 593 + ret = pcmcia_enable_device(link); 593 594 if (ret) 594 595 goto failed_unlock; 595 596 ··· 604 605 if (link->vpp) 605 606 printk(", Vpp %d.%d", link->vpp / 10, 606 607 link->vpp % 10); 607 - if (link->conf.Attributes & CONF_ENABLE_IRQ) 608 - printk(", irq %d", link->irq); 608 + printk(", irq %d", link->irq); 609 609 if (link->resource[0]) 610 610 printk(" & %pR", link->resource[0]); 611 611 if (link->resource[1])
+3 -7
drivers/net/wireless/libertas/if_cs.c
··· 28 28 #include <linux/firmware.h> 29 29 #include <linux/netdevice.h> 30 30 31 - #include <pcmcia/cs.h> 32 31 #include <pcmcia/cistpl.h> 33 32 #include <pcmcia/ds.h> 34 33 ··· 805 806 p_dev->resource[0]->end = cfg->io.win[0].len; 806 807 807 808 /* Do we need to allocate an interrupt? */ 808 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 809 + p_dev->config_flags |= CONF_ENABLE_IRQ; 809 810 810 811 /* IO window settings */ 811 812 if (cfg->io.nwin != 1) { ··· 834 835 card->p_dev = p_dev; 835 836 p_dev->priv = card; 836 837 837 - p_dev->conf.Attributes = 0; 838 - 839 838 if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) { 840 839 lbs_pr_err("error in pcmcia_loop_config\n"); 841 840 goto out1; 842 841 } 843 - 844 842 845 843 /* 846 844 * Allocate an interrupt line. Note that this does not assign ··· 861 865 * the I/O windows and the interrupt mapping, and putting the 862 866 * card and host interface into "Memory and IO" mode. 863 867 */ 864 - ret = pcmcia_request_configuration(p_dev, &p_dev->conf); 868 + ret = pcmcia_enable_device(p_dev); 865 869 if (ret) { 866 - lbs_pr_err("error in pcmcia_request_configuration\n"); 870 + lbs_pr_err("error in pcmcia_enable_device\n"); 867 871 goto out2; 868 872 } 869 873
+2 -10
drivers/net/wireless/orinoco/orinoco_cs.c
··· 17 17 #include <linux/kernel.h> 18 18 #include <linux/init.h> 19 19 #include <linux/delay.h> 20 - #include <pcmcia/cs.h> 21 20 #include <pcmcia/cistpl.h> 22 21 #include <pcmcia/cisreg.h> 23 22 #include <pcmcia/ds.h> ··· 116 117 card->p_dev = link; 117 118 link->priv = priv; 118 119 119 - /* General socket configuration defaults can go here. In this 120 - * client, we assume very little, and rely on the CIS for 121 - * almost everything. In most clients, many details (i.e., 122 - * number, sizes, and attributes of IO windows) are fixed by 123 - * the nature of the device, and can be hard-wired here. */ 124 - link->conf.Attributes = 0; 125 - 126 120 return orinoco_cs_config(link); 127 121 } /* orinoco_cs_attach */ 128 122 ··· 179 187 dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; 180 188 181 189 /* Do we need to allocate an interrupt? */ 182 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 190 + p_dev->config_flags |= CONF_ENABLE_IRQ; 183 191 184 192 /* IO window settings */ 185 193 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 258 266 * the I/O windows and the interrupt mapping, and putting the 259 267 * card and host interface into "Memory and IO" mode. 260 268 */ 261 - ret = pcmcia_request_configuration(link, &link->conf); 269 + ret = pcmcia_enable_device(link); 262 270 if (ret) 263 271 goto failed; 264 272
+2 -10
drivers/net/wireless/orinoco/spectrum_cs.c
··· 25 25 #include <linux/kernel.h> 26 26 #include <linux/init.h> 27 27 #include <linux/delay.h> 28 - #include <pcmcia/cs.h> 29 28 #include <pcmcia/cistpl.h> 30 29 #include <pcmcia/cisreg.h> 31 30 #include <pcmcia/ds.h> ··· 178 179 card->p_dev = link; 179 180 link->priv = priv; 180 181 181 - /* General socket configuration defaults can go here. In this 182 - * client, we assume very little, and rely on the CIS for 183 - * almost everything. In most clients, many details (i.e., 184 - * number, sizes, and attributes of IO windows) are fixed by 185 - * the nature of the device, and can be hard-wired here. */ 186 - link->conf.Attributes = 0; 187 - 188 182 return spectrum_cs_config(link); 189 183 } /* spectrum_cs_attach */ 190 184 ··· 241 249 dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; 242 250 243 251 /* Do we need to allocate an interrupt? */ 244 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 252 + p_dev->config_flags |= CONF_ENABLE_IRQ; 245 253 246 254 /* IO window settings */ 247 255 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 321 329 * the I/O windows and the interrupt mapping, and putting the 322 330 * card and host interface into "Memory and IO" mode. 323 331 */ 324 - ret = pcmcia_request_configuration(link, &link->conf); 332 + ret = pcmcia_enable_device(link); 325 333 if (ret) 326 334 goto failed; 327 335
+2 -3
drivers/net/wireless/ray_cs.c
··· 46 46 #include <linux/ethtool.h> 47 47 #include <linux/ieee80211.h> 48 48 49 - #include <pcmcia/cs.h> 50 49 #include <pcmcia/cistpl.h> 51 50 #include <pcmcia/cisreg.h> 52 51 #include <pcmcia/ds.h> ··· 317 318 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 318 319 319 320 /* General socket configuration */ 320 - p_dev->conf.Attributes = CONF_ENABLE_IRQ; 321 + p_dev->config_flags |= CONF_ENABLE_IRQ; 321 322 p_dev->config_index = 1; 322 323 323 324 p_dev->priv = dev; ··· 412 413 /* This actually configures the PCMCIA socket -- setting up 413 414 the I/O windows and the interrupt mapping. 414 415 */ 415 - ret = pcmcia_request_configuration(link, &link->conf); 416 + ret = pcmcia_enable_device(link); 416 417 if (ret) 417 418 goto failed; 418 419
+2 -3
drivers/net/wireless/wl3501_cs.c
··· 48 48 49 49 #include <net/iw_handler.h> 50 50 51 - #include <pcmcia/cs.h> 52 51 #include <pcmcia/cistpl.h> 53 52 #include <pcmcia/cisreg.h> 54 53 #include <pcmcia/ds.h> ··· 1887 1888 p_dev->resource[0]->flags = IO_DATA_PATH_WIDTH_8; 1888 1889 1889 1890 /* General socket configuration */ 1890 - p_dev->conf.Attributes = CONF_ENABLE_IRQ; 1891 + p_dev->config_flags = CONF_ENABLE_IRQ; 1891 1892 p_dev->config_index = 1; 1892 1893 1893 1894 dev = alloc_etherdev(sizeof(struct wl3501_card)); ··· 1953 1954 /* This actually configures the PCMCIA socket -- setting up the I/O 1954 1955 * windows and the interrupt mapping. */ 1955 1956 1956 - ret = pcmcia_request_configuration(link, &link->conf); 1957 + ret = pcmcia_enable_device(link); 1957 1958 if (ret) 1958 1959 goto failed; 1959 1960
+2 -3
drivers/parport/parport_cs.c
··· 48 48 #include <linux/parport.h> 49 49 #include <linux/parport_pc.h> 50 50 51 - #include <pcmcia/cs.h> 52 51 #include <pcmcia/cistpl.h> 53 52 #include <pcmcia/ds.h> 54 53 #include <pcmcia/cisreg.h> ··· 102 103 103 104 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 104 105 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 105 - link->conf.Attributes = CONF_ENABLE_IRQ; 106 + link->config_flags |= CONF_ENABLE_IRQ; 106 107 107 108 return parport_config(link); 108 109 } /* parport_attach */ ··· 171 172 172 173 if (!link->irq) 173 174 goto failed; 174 - ret = pcmcia_request_configuration(link, &link->conf); 175 + ret = pcmcia_enable_device(link); 175 176 if (ret) 176 177 goto failed; 177 178
-1
drivers/pcmcia/au1000_generic.h
··· 23 23 24 24 /* include the world */ 25 25 26 - #include <pcmcia/cs.h> 27 26 #include <pcmcia/ss.h> 28 27 #include <pcmcia/cistpl.h> 29 28 #include "cs_internal.h"
-1
drivers/pcmcia/au1000_pb1x00.c
··· 31 31 #include <linux/proc_fs.h> 32 32 #include <linux/types.h> 33 33 34 - #include <pcmcia/cs.h> 35 34 #include <pcmcia/ss.h> 36 35 #include <pcmcia/cistpl.h> 37 36
-1
drivers/pcmcia/cistpl.c
··· 28 28 #include <asm/unaligned.h> 29 29 30 30 #include <pcmcia/ss.h> 31 - #include <pcmcia/cs.h> 32 31 #include <pcmcia/cisreg.h> 33 32 #include <pcmcia/cistpl.h> 34 33 #include "cs_internal.h"
-1
drivers/pcmcia/cs.c
··· 33 33 #include <asm/irq.h> 34 34 35 35 #include <pcmcia/ss.h> 36 - #include <pcmcia/cs.h> 37 36 #include <pcmcia/cistpl.h> 38 37 #include <pcmcia/cisreg.h> 39 38 #include <pcmcia/ds.h>
-5
drivers/pcmcia/cs_internal.h
··· 33 33 typedef struct config_t { 34 34 struct kref ref; 35 35 unsigned int state; 36 - unsigned int Attributes; 37 36 38 37 struct resource io[MAX_IO_WIN]; /* io ports */ 39 38 struct resource mem[MAX_WIN]; /* mem areas */ 40 - 41 - struct { 42 - u_int Attributes; 43 - } irq; 44 39 } config_t; 45 40 46 41
+1 -2
drivers/pcmcia/ds.c
··· 26 26 #include <linux/dma-mapping.h> 27 27 #include <linux/slab.h> 28 28 29 - #include <pcmcia/cs.h> 30 29 #include <pcmcia/cistpl.h> 31 30 #include <pcmcia/ds.h> 32 31 #include <pcmcia/ss.h> ··· 1177 1178 1178 1179 if (p_dev->device_no == p_dev->func) { 1179 1180 dev_dbg(dev, "requesting configuration\n"); 1180 - ret = pcmcia_request_configuration(p_dev, &p_dev->conf); 1181 + ret = pcmcia_enable_device(p_dev); 1181 1182 if (ret) 1182 1183 goto out; 1183 1184 }
-1
drivers/pcmcia/i82092.c
··· 16 16 #include <linux/device.h> 17 17 18 18 #include <pcmcia/ss.h> 19 - #include <pcmcia/cs.h> 20 19 21 20 #include <asm/system.h> 22 21 #include <asm/io.h>
-1
drivers/pcmcia/i82365.c
··· 51 51 #include <asm/system.h> 52 52 53 53 #include <pcmcia/ss.h> 54 - #include <pcmcia/cs.h> 55 54 56 55 #include <linux/isapnp.h> 57 56
-1
drivers/pcmcia/m32r_cfc.c
··· 27 27 #include <asm/system.h> 28 28 29 29 #include <pcmcia/ss.h> 30 - #include <pcmcia/cs.h> 31 30 32 31 #undef MAX_IO_WIN /* FIXME */ 33 32 #define MAX_IO_WIN 1
-1
drivers/pcmcia/m32r_pcc.c
··· 28 28 #include <asm/addrspace.h> 29 29 30 30 #include <pcmcia/ss.h> 31 - #include <pcmcia/cs.h> 32 31 33 32 /* XXX: should be moved into asm/irq.h */ 34 33 #define PCC0_IRQ 24
-1
drivers/pcmcia/m8xx_pcmcia.c
··· 59 59 #include <asm/irq.h> 60 60 #include <asm/fs_pd.h> 61 61 62 - #include <pcmcia/cs.h> 63 62 #include <pcmcia/ss.h> 64 63 65 64 #define pcmcia_info(args...) printk(KERN_INFO "m8xx_pcmcia: "args)
-1
drivers/pcmcia/pcmcia_cis.c
··· 22 22 #include <pcmcia/cisreg.h> 23 23 #include <pcmcia/cistpl.h> 24 24 #include <pcmcia/ss.h> 25 - #include <pcmcia/cs.h> 26 25 #include <pcmcia/ds.h> 27 26 #include "cs_internal.h" 28 27
+16 -17
drivers/pcmcia/pcmcia_resource.c
··· 26 26 #include <asm/irq.h> 27 27 28 28 #include <pcmcia/ss.h> 29 - #include <pcmcia/cs.h> 30 29 #include <pcmcia/cistpl.h> 31 30 #include <pcmcia/cisreg.h> 32 31 #include <pcmcia/ds.h> ··· 229 230 * pcmcia_fixup_iowidth() - reduce io width to 8bit 230 231 * 231 232 * pcmcia_fixup_iowidth() allows a PCMCIA device driver to reduce the 232 - * IO width to 8bit after having called pcmcia_request_configuration() 233 + * IO width to 8bit after having called pcmcia_enable_device() 233 234 * previously. 234 235 */ 235 236 int pcmcia_fixup_iowidth(struct pcmcia_device *p_dev) ··· 277 278 * pcmcia_fixup_vpp() - set Vpp to a new voltage level 278 279 * 279 280 * pcmcia_fixup_vpp() allows a PCMCIA device driver to set Vpp to 280 - * a new voltage level between calls to pcmcia_request_configuration() 281 + * a new voltage level between calls to pcmcia_enable_device() 281 282 * and pcmcia_disable_device(). 282 283 */ 283 284 int pcmcia_fixup_vpp(struct pcmcia_device *p_dev, unsigned char new_vpp) ··· 431 432 } /* pcmcia_release_window */ 432 433 EXPORT_SYMBOL(pcmcia_release_window); 433 434 434 - 435 - int pcmcia_request_configuration(struct pcmcia_device *p_dev, 436 - config_req_t *req) 435 + /** 436 + * pcmcia_enable_device() - set up and activate a PCMCIA device 437 + * 438 + */ 439 + int pcmcia_enable_device(struct pcmcia_device *p_dev) 437 440 { 438 441 int i; 439 - u_int base; 442 + unsigned int base; 440 443 struct pcmcia_socket *s = p_dev->socket; 441 444 config_t *c; 442 445 pccard_io_map iomap; 443 446 unsigned char status = 0; 444 447 unsigned char ext_status = 0; 445 448 unsigned char option = 0; 449 + unsigned int flags = p_dev->config_flags; 446 450 447 451 if (!(s->state & SOCKET_PRESENT)) 448 452 return -ENODEV; ··· 468 466 } 469 467 470 468 /* Pick memory or I/O card, DMA mode, interrupt */ 471 - c->Attributes = req->Attributes; 472 469 if (p_dev->_io) 473 470 s->socket.flags |= SS_IOCARD; 474 - if (req->Attributes & CONF_ENABLE_DMA) 475 - s->socket.flags |= SS_DMA_MODE; 476 - if (req->Attributes & CONF_ENABLE_SPKR) { 471 + if (flags & CONF_ENABLE_SPKR) { 477 472 s->socket.flags |= SS_SPKR_ENA; 478 473 status = CCSR_AUDIO_ENA; 479 474 if (!(p_dev->config_regs & PRESENT_STATUS)) 480 475 dev_warn(&p_dev->dev, "speaker requested, but " 481 476 "PRESENT_STATUS not set!\n"); 482 477 } 483 - if (req->Attributes & CONF_ENABLE_IRQ) 478 + if (flags & CONF_ENABLE_IRQ) 484 479 s->socket.io_irq = s->pcmcia_irq; 485 480 else 486 481 s->socket.io_irq = 0; 487 - if (req->Attributes & CONF_ENABLE_ESR) { 482 + if (flags & CONF_ENABLE_ESR) { 488 483 p_dev->config_regs |= PRESENT_EXT_STATUS; 489 484 ext_status = ESR_REQ_ATTN_ENA; 490 485 } ··· 509 510 if (p_dev->config_regs & PRESENT_IOBASE_0) 510 511 option |= COR_ADDR_DECODE; 511 512 } 512 - if ((req->Attributes & CONF_ENABLE_IRQ) && 513 - !(req->Attributes & CONF_ENABLE_PULSE_IRQ)) 513 + if ((flags & CONF_ENABLE_IRQ) && 514 + !(flags & CONF_ENABLE_PULSE_IRQ)) 514 515 option |= COR_LEVEL_REQ; 515 516 pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &option); 516 517 mdelay(40); ··· 559 560 p_dev->_locked = 1; 560 561 mutex_unlock(&s->ops_mutex); 561 562 return 0; 562 - } /* pcmcia_request_configuration */ 563 - EXPORT_SYMBOL(pcmcia_request_configuration); 563 + } /* pcmcia_enable_device */ 564 + EXPORT_SYMBOL(pcmcia_enable_device); 564 565 565 566 566 567 /**
-1
drivers/pcmcia/pd6729.c
··· 18 18 #include <linux/io.h> 19 19 20 20 #include <pcmcia/ss.h> 21 - #include <pcmcia/cs.h> 22 21 23 22 #include <asm/system.h> 24 23
-1
drivers/pcmcia/rsrc_iodyn.c
··· 17 17 #include <linux/kernel.h> 18 18 19 19 #include <pcmcia/ss.h> 20 - #include <pcmcia/cs.h> 21 20 #include <pcmcia/cistpl.h> 22 21 #include "cs_internal.h" 23 22
-1
drivers/pcmcia/rsrc_mgr.c
··· 17 17 #include <linux/kernel.h> 18 18 19 19 #include <pcmcia/ss.h> 20 - #include <pcmcia/cs.h> 21 20 #include <pcmcia/cistpl.h> 22 21 #include "cs_internal.h" 23 22
-1
drivers/pcmcia/rsrc_nonstatic.c
··· 29 29 #include <asm/irq.h> 30 30 31 31 #include <pcmcia/ss.h> 32 - #include <pcmcia/cs.h> 33 32 #include <pcmcia/cistpl.h> 34 33 #include "cs_internal.h" 35 34
-1
drivers/pcmcia/sa1100_generic.c
··· 35 35 #include <linux/slab.h> 36 36 #include <linux/platform_device.h> 37 37 38 - #include <pcmcia/cs.h> 39 38 #include <pcmcia/ss.h> 40 39 41 40 #include <asm/hardware/scoop.h>
-1
drivers/pcmcia/soc_common.h
··· 11 11 12 12 /* include the world */ 13 13 #include <linux/cpufreq.h> 14 - #include <pcmcia/cs.h> 15 14 #include <pcmcia/ss.h> 16 15 #include <pcmcia/cistpl.h> 17 16
-1
drivers/pcmcia/socket_sysfs.c
··· 27 27 #include <asm/irq.h> 28 28 29 29 #include <pcmcia/ss.h> 30 - #include <pcmcia/cs.h> 31 30 #include <pcmcia/cistpl.h> 32 31 #include <pcmcia/cisreg.h> 33 32 #include <pcmcia/ds.h>
-1
drivers/pcmcia/tcic.c
··· 49 49 #include <asm/io.h> 50 50 #include <asm/system.h> 51 51 52 - #include <pcmcia/cs.h> 53 52 #include <pcmcia/ss.h> 54 53 #include "tcic.h" 55 54
-1
drivers/pcmcia/xxs1500_ss.c
··· 17 17 #include <linux/slab.h> 18 18 #include <linux/spinlock.h> 19 19 20 - #include <pcmcia/cs.h> 21 20 #include <pcmcia/ss.h> 22 21 #include <pcmcia/cistpl.h> 23 22
-1
drivers/pcmcia/yenta_socket.c
··· 20 20 #include <linux/slab.h> 21 21 22 22 #include <pcmcia/ss.h> 23 - #include <pcmcia/cs.h> 24 23 25 24 #include "yenta_socket.h" 26 25 #include "i82365.h"
+2 -3
drivers/scsi/pcmcia/aha152x_stub.c
··· 49 49 #include <scsi/scsi_host.h> 50 50 #include "aha152x.h" 51 51 52 - #include <pcmcia/cs.h> 53 52 #include <pcmcia/cistpl.h> 54 53 #include <pcmcia/ds.h> 55 54 ··· 101 102 102 103 link->resource[0]->end = 0x20; 103 104 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 104 - link->conf.Attributes = CONF_ENABLE_IRQ; 105 + link->config_flags |= CONF_ENABLE_IRQ; 105 106 link->config_regs = PRESENT_OPTION; 106 107 107 108 return aha152x_config_cs(link); ··· 158 159 if (!link->irq) 159 160 goto failed; 160 161 161 - ret = pcmcia_request_configuration(link, &link->conf); 162 + ret = pcmcia_enable_device(link); 162 163 if (ret) 163 164 goto failed; 164 165
+2 -3
drivers/scsi/pcmcia/fdomain_stub.c
··· 46 46 #include <scsi/scsi_host.h> 47 47 #include "fdomain.h" 48 48 49 - #include <pcmcia/cs.h> 50 49 #include <pcmcia/cistpl.h> 51 50 #include <pcmcia/ds.h> 52 51 ··· 84 85 link->priv = info; 85 86 link->resource[0]->end = 0x10; 86 87 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 87 - link->conf.Attributes = CONF_ENABLE_IRQ; 88 + link->config_flags |= CONF_ENABLE_IRQ; 88 89 link->config_regs = PRESENT_OPTION; 89 90 90 91 return fdomain_config(link); ··· 130 131 131 132 if (!link->irq) 132 133 goto failed; 133 - ret = pcmcia_request_configuration(link, &link->conf); 134 + ret = pcmcia_enable_device(link); 134 135 if (ret) 135 136 goto failed; 136 137
+5 -8
drivers/scsi/pcmcia/nsp_cs.c
··· 47 47 #include <scsi/scsi.h> 48 48 #include <scsi/scsi_ioctl.h> 49 49 50 - #include <pcmcia/cs.h> 51 50 #include <pcmcia/cistpl.h> 52 51 #include <pcmcia/cisreg.h> 53 52 #include <pcmcia/ds.h> ··· 1561 1562 link->resource[0]->flags = IO_DATA_PATH_WIDTH_AUTO; 1562 1563 1563 1564 /* General socket configuration */ 1564 - link->conf.Attributes = CONF_ENABLE_IRQ; 1565 + link->config_flags |= CONF_ENABLE_IRQ; 1565 1566 1566 1567 ret = nsp_cs_config(link); 1567 1568 ··· 1607 1608 1608 1609 /* Does this card need audio output? */ 1609 1610 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 1610 - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 1611 + p_dev->config_flags |= CONF_ENABLE_SPKR; 1611 1612 1612 1613 /* Use power settings for Vcc and Vpp if present */ 1613 1614 /* Note that the CIS values need to be rescaled */ ··· 1628 1629 } 1629 1630 1630 1631 /* Do we need to allocate an interrupt? */ 1631 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 1632 + p_dev->config_flags |= CONF_ENABLE_IRQ; 1632 1633 1633 1634 /* IO window settings */ 1634 1635 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 1699 1700 if (pcmcia_request_irq(link, nspintr)) 1700 1701 goto cs_failed; 1701 1702 1702 - ret = pcmcia_request_configuration(link, &link->conf); 1703 + ret = pcmcia_enable_device(link); 1703 1704 if (ret) 1704 1705 goto cs_failed; 1705 1706 ··· 1748 1749 if (link->vpp) { 1749 1750 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); 1750 1751 } 1751 - if (link->conf.Attributes & CONF_ENABLE_IRQ) { 1752 - printk(", irq %d", link->irq); 1753 - } 1752 + printk(", irq %d", link->irq); 1754 1753 if (link->resource[0]) 1755 1754 printk(", io %pR", link->resource[0]); 1756 1755 if (link->resource[1])
+3 -4
drivers/scsi/pcmcia/qlogic_stub.c
··· 48 48 #include <scsi/scsi_host.h> 49 49 #include "../qlogicfas408.h" 50 50 51 - #include <pcmcia/cs.h> 52 51 #include <pcmcia/cistpl.h> 53 52 #include <pcmcia/ds.h> 54 53 #include <pcmcia/ciscode.h> ··· 157 158 link->priv = info; 158 159 link->resource[0]->end = 16; 159 160 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 160 - link->conf.Attributes = CONF_ENABLE_IRQ; 161 + link->config_flags |= CONF_ENABLE_IRQ; 161 162 link->config_regs = PRESENT_OPTION; 162 163 163 164 return qlogic_config(link); ··· 207 208 if (!link->irq) 208 209 goto failed; 209 210 210 - ret = pcmcia_request_configuration(link, &link->conf); 211 + ret = pcmcia_enable_device(link); 211 212 if (ret) 212 213 goto failed; 213 214 ··· 262 263 { 263 264 scsi_info_t *info = link->priv; 264 265 265 - pcmcia_request_configuration(link, &link->conf); 266 + pcmcia_enable_device(link); 266 267 if ((info->manf_id == MANFID_MACNICA) || 267 268 (info->manf_id == MANFID_PIONEER) || 268 269 (info->manf_id == 0x0098)) {
+2 -3
drivers/scsi/pcmcia/sym53c500_cs.c
··· 71 71 #include <scsi/scsi.h> 72 72 #include <scsi/scsi_host.h> 73 73 74 - #include <pcmcia/cs.h> 75 74 #include <pcmcia/cistpl.h> 76 75 #include <pcmcia/ds.h> 77 76 #include <pcmcia/ciscode.h> ··· 720 721 if (!link->irq) 721 722 goto failed; 722 723 723 - ret = pcmcia_request_configuration(link, &link->conf); 724 + ret = pcmcia_enable_device(link); 724 725 if (ret) 725 726 goto failed; 726 727 ··· 860 861 link->priv = info; 861 862 link->resource[0]->end = 16; 862 863 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 863 - link->conf.Attributes = CONF_ENABLE_IRQ; 864 + link->config_flags |= CONF_ENABLE_IRQ; 864 865 865 866 return SYM53C500_config(link); 866 867 } /* SYM53C500_attach */
+5 -6
drivers/serial/serial_cs.c
··· 45 45 #include <asm/io.h> 46 46 #include <asm/system.h> 47 47 48 - #include <pcmcia/cs.h> 49 48 #include <pcmcia/cistpl.h> 50 49 #include <pcmcia/ciscode.h> 51 50 #include <pcmcia/ds.h> ··· 183 184 struct serial_info *info = link->priv; 184 185 185 186 if (info->multi) 186 - link->conf.Attributes |= CONF_ENABLE_ESR; 187 + link->config_flags |= CONF_ENABLE_ESR; 187 188 } 188 189 189 190 static const struct serial_quirk quirks[] = { ··· 332 333 info->p_dev = link; 333 334 link->priv = info; 334 335 335 - link->conf.Attributes = CONF_ENABLE_IRQ; 336 + link->config_flags |= CONF_ENABLE_IRQ; 336 337 if (do_sound) 337 - link->conf.Attributes |= CONF_ENABLE_SPKR; 338 + link->config_flags |= CONF_ENABLE_SPKR; 338 339 339 340 return serial_config(link); 340 341 } ··· 502 503 if (info->quirk && info->quirk->config) 503 504 info->quirk->config(link); 504 505 505 - i = pcmcia_request_configuration(link, &link->conf); 506 + i = pcmcia_enable_device(link); 506 507 if (i != 0) 507 508 return -1; 508 509 return setup_serial(link, info, link->resource[0]->start, link->irq); ··· 578 579 if (info->quirk && info->quirk->config) 579 580 info->quirk->config(link); 580 581 581 - i = pcmcia_request_configuration(link, &link->conf); 582 + i = pcmcia_enable_device(link); 582 583 if (i != 0) 583 584 return -ENODEV; 584 585
-1
drivers/ssb/main.c
··· 20 20 #include <linux/mmc/sdio_func.h> 21 21 #include <linux/slab.h> 22 22 23 - #include <pcmcia/cs.h> 24 23 #include <pcmcia/cistpl.h> 25 24 #include <pcmcia/ds.h> 26 25
-1
drivers/ssb/pcmcia.c
··· 13 13 #include <linux/io.h> 14 14 #include <linux/etherdevice.h> 15 15 16 - #include <pcmcia/cs.h> 17 16 #include <pcmcia/cistpl.h> 18 17 #include <pcmcia/ciscode.h> 19 18 #include <pcmcia/ds.h>
-1
drivers/ssb/scan.c
··· 17 17 #include <linux/pci.h> 18 18 #include <linux/io.h> 19 19 20 - #include <pcmcia/cs.h> 21 20 #include <pcmcia/cistpl.h> 22 21 #include <pcmcia/ds.h> 23 22
+3 -8
drivers/staging/comedi/drivers/cb_das16_cs.c
··· 37 37 #include <linux/delay.h> 38 38 #include <linux/pci.h> 39 39 40 - #include <pcmcia/cs.h> 41 40 #include <pcmcia/cistpl.h> 42 41 #include <pcmcia/ds.h> 43 42 ··· 691 692 local->link = link; 692 693 link->priv = local; 693 694 694 - /* Initialize the pcmcia_device structure */ 695 - link->conf.Attributes = 0; 696 - 697 695 cur_dev = link; 698 696 699 697 das16cs_pcmcia_config(link); ··· 719 723 return -EINVAL; 720 724 721 725 /* Do we need to allocate an interrupt? */ 722 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 726 + p_dev->config_flags |= CONF_ENABLE_IRQ; 723 727 724 728 /* IO window settings */ 725 729 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 763 767 the I/O windows and the interrupt mapping, and putting the 764 768 card and host interface into "Memory and IO" mode. 765 769 */ 766 - ret = pcmcia_request_configuration(link, &link->conf); 770 + ret = pcmcia_enable_device(link); 767 771 if (ret) 768 772 goto failed; 769 773 770 774 /* Finally, report what we've done */ 771 775 dev_info(&link->dev, "index 0x%02x", link->config_index); 772 - if (link->conf.Attributes & CONF_ENABLE_IRQ) 773 - printk(", irq %u", link->irq); 776 + printk(", irq %u", link->irq); 774 777 if (link->resource[0]) 775 778 printk(", io %pR", link->resource[0]); 776 779 if (link->resource[1])
+3 -14
drivers/staging/comedi/drivers/das08_cs.c
··· 48 48 #include "das08.h" 49 49 50 50 /* pcmcia includes */ 51 - #include <pcmcia/cs.h> 52 51 #include <pcmcia/cistpl.h> 53 52 #include <pcmcia/ds.h> 54 53 ··· 161 162 local->link = link; 162 163 link->priv = local; 163 164 164 - /* 165 - General socket configuration defaults can go here. In this 166 - client, we assume very little, and rely on the CIS for almost 167 - everything. In most clients, many details (i.e., number, sizes, 168 - and attributes of IO windows) are fixed by the nature of the 169 - device, and can be hard-wired here. 170 - */ 171 - link->conf.Attributes = 0; 172 - 173 165 cur_dev = link; 174 166 175 167 das08_pcmcia_config(link); ··· 201 211 return -ENODEV; 202 212 203 213 /* Do we need to allocate an interrupt? */ 204 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 214 + p_dev->config_flags |= CONF_ENABLE_IRQ; 205 215 206 216 /* IO window settings */ 207 217 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 253 263 the I/O windows and the interrupt mapping, and putting the 254 264 card and host interface into "Memory and IO" mode. 255 265 */ 256 - ret = pcmcia_request_configuration(link, &link->conf); 266 + ret = pcmcia_enable_device(link); 257 267 if (ret) 258 268 goto failed; 259 269 260 270 /* Finally, report what we've done */ 261 271 dev_info(&link->dev, "index 0x%02x", link->config_index); 262 - if (link->conf.Attributes & CONF_ENABLE_IRQ) 263 - printk(", irq %u", link->irq); 272 + printk(", irq %u", link->irq); 264 273 if (link->resource[0]) 265 274 printk(", io %pR", link->resource[0]); 266 275 if (link->resource[1])
+4 -15
drivers/staging/comedi/drivers/ni_daq_700.c
··· 47 47 48 48 #include <linux/ioport.h> 49 49 50 - #include <pcmcia/cs.h> 51 50 #include <pcmcia/cistpl.h> 52 51 #include <pcmcia/cisreg.h> 53 52 #include <pcmcia/ds.h> ··· 490 491 local->link = link; 491 492 link->priv = local; 492 493 493 - /* 494 - General socket configuration defaults can go here. In this 495 - client, we assume very little, and rely on the CIS for almost 496 - everything. In most clients, many details (i.e., number, sizes, 497 - and attributes of IO windows) are fixed by the nature of the 498 - device, and can be hard-wired here. 499 - */ 500 - link->conf.Attributes = 0; 501 - 502 494 pcmcia_cur_dev = link; 503 495 504 496 dio700_config(link); ··· 540 550 541 551 /* Does this card need audio output? */ 542 552 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 543 - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 553 + p_dev->config_flags |= CONF_ENABLE_SPKR; 544 554 545 555 /* Do we need to allocate an interrupt? */ 546 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 556 + p_dev->config_flags |= CONF_ENABLE_IRQ; 547 557 548 558 /* IO window settings */ 549 559 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 592 602 the I/O windows and the interrupt mapping, and putting the 593 603 card and host interface into "Memory and IO" mode. 594 604 */ 595 - ret = pcmcia_request_configuration(link, &link->conf); 605 + ret = pcmcia_enable_device(link); 596 606 if (ret != 0) 597 607 goto failed; 598 608 599 609 /* Finally, report what we've done */ 600 610 dev_info(&link->dev, "index 0x%02x", link->config_index); 601 - if (link->conf.Attributes & CONF_ENABLE_IRQ) 602 - printk(", irq %d", link->irq); 611 + printk(", irq %d", link->irq); 603 612 if (link->resource[0]) 604 613 printk(", io %pR", link->resource[0]); 605 614 if (link->resource[1])
+4 -15
drivers/staging/comedi/drivers/ni_daq_dio24.c
··· 48 48 49 49 #include "8255.h" 50 50 51 - #include <pcmcia/cs.h> 52 51 #include <pcmcia/cistpl.h> 53 52 #include <pcmcia/cisreg.h> 54 53 #include <pcmcia/ds.h> ··· 242 243 local->link = link; 243 244 link->priv = local; 244 245 245 - /* 246 - General socket configuration defaults can go here. In this 247 - client, we assume very little, and rely on the CIS for almost 248 - everything. In most clients, many details (i.e., number, sizes, 249 - and attributes of IO windows) are fixed by the nature of the 250 - device, and can be hard-wired here. 251 - */ 252 - link->conf.Attributes = 0; 253 - 254 246 pcmcia_cur_dev = link; 255 247 256 248 dio24_config(link); ··· 292 302 293 303 /* Does this card need audio output? */ 294 304 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 295 - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 305 + p_dev->config_flags |= CONF_ENABLE_SPKR; 296 306 297 307 /* Do we need to allocate an interrupt? */ 298 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 308 + p_dev->config_flags |= CONF_ENABLE_IRQ; 299 309 300 310 /* IO window settings */ 301 311 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 343 353 the I/O windows and the interrupt mapping, and putting the 344 354 card and host interface into "Memory and IO" mode. 345 355 */ 346 - ret = pcmcia_request_configuration(link, &link->conf); 356 + ret = pcmcia_enable_device(link); 347 357 if (ret) 348 358 goto failed; 349 359 350 360 /* Finally, report what we've done */ 351 361 dev_info(&link->dev, "index 0x%02x", link->config_index); 352 - if (link->conf.Attributes & CONF_ENABLE_IRQ) 353 - printk(", irq %d", link->irq); 362 + printk(", irq %d", link->irq); 354 363 if (link->resource[0]) 355 364 printk(" & %pR", link->resource[0]); 356 365 if (link->resource[1])
+5 -15
drivers/staging/comedi/drivers/ni_labpc_cs.c
··· 71 71 #include "comedi_fc.h" 72 72 #include "ni_labpc.h" 73 73 74 - #include <pcmcia/cs.h> 75 74 #include <pcmcia/cistpl.h> 76 75 #include <pcmcia/cisreg.h> 77 76 #include <pcmcia/ds.h> ··· 218 219 local->link = link; 219 220 link->priv = local; 220 221 221 - /* 222 - General socket configuration defaults can go here. In this 223 - client, we assume very little, and rely on the CIS for almost 224 - everything. In most clients, many details (i.e., number, sizes, 225 - and attributes of IO windows) are fixed by the nature of the 226 - device, and can be hard-wired here. 227 - */ 228 - link->conf.Attributes = 0; 229 - 230 222 pcmcia_cur_dev = link; 231 223 232 224 labpc_config(link); ··· 271 281 272 282 /* Does this card need audio output? */ 273 283 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 274 - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 284 + p_dev->config_flags |= CONF_ENABLE_SPKR; 275 285 276 286 /* Do we need to allocate an interrupt? */ 277 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; 287 + p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; 278 288 279 289 /* IO window settings */ 280 290 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 321 331 the I/O windows and the interrupt mapping, and putting the 322 332 card and host interface into "Memory and IO" mode. 323 333 */ 324 - ret = pcmcia_request_configuration(link, &link->conf); 334 + p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; 335 + ret = pcmcia_enable_device(link); 325 336 if (ret) 326 337 goto failed; 327 338 328 339 /* Finally, report what we've done */ 329 340 dev_info(&link->dev, "index 0x%02x", link->config_index); 330 - if (link->conf.Attributes & CONF_ENABLE_IRQ) 331 - printk(", irq %d", link->irq); 341 + printk(", irq %d", link->irq); 332 342 if (link->resource[0]) 333 343 printk(" & %pR", link->resource[0]); 334 344 if (link->resource[1])
+2 -3
drivers/staging/comedi/drivers/ni_mio_cs.c
··· 48 48 #include "ni_stc.h" 49 49 #include "8255.h" 50 50 51 - #include <pcmcia/cs.h> 52 51 #include <pcmcia/cistpl.h> 53 52 #include <pcmcia/ds.h> 54 53 ··· 264 265 { 265 266 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; 266 267 link->resource[0]->end = 16; 267 - link->conf.Attributes = CONF_ENABLE_IRQ; 268 + link->config_flags |= CONF_ENABLE_IRQ; 268 269 269 270 cur_dev = link; 270 271 ··· 335 336 if (!link->irq) 336 337 dev_info(&link->dev, "no IRQ available\n"); 337 338 338 - ret = pcmcia_request_configuration(link, &link->conf); 339 + ret = pcmcia_enable_device(link); 339 340 } 340 341 341 342 static int mio_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it)
+3 -14
drivers/staging/comedi/drivers/quatech_daqp_cs.c
··· 50 50 #include "../comedidev.h" 51 51 #include <linux/semaphore.h> 52 52 53 - #include <pcmcia/cs.h> 54 53 #include <pcmcia/cistpl.h> 55 54 #include <pcmcia/cisreg.h> 56 55 #include <pcmcia/ds.h> ··· 1030 1031 local->link = link; 1031 1032 link->priv = local; 1032 1033 1033 - /* 1034 - General socket configuration defaults can go here. In this 1035 - client, we assume very little, and rely on the CIS for almost 1036 - everything. In most clients, many details (i.e., number, sizes, 1037 - and attributes of IO windows) are fixed by the nature of the 1038 - device, and can be hard-wired here. 1039 - */ 1040 - link->conf.Attributes = 0; 1041 - 1042 1034 daqp_cs_config(link); 1043 1035 1044 1036 return 0; ··· 1078 1088 return -ENODEV; 1079 1089 1080 1090 /* Do we need to allocate an interrupt? */ 1081 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 1091 + p_dev->config_flags |= CONF_ENABLE_IRQ; 1082 1092 1083 1093 /* IO window settings */ 1084 1094 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 1122 1132 the I/O windows and the interrupt mapping, and putting the 1123 1133 card and host interface into "Memory and IO" mode. 1124 1134 */ 1125 - ret = pcmcia_request_configuration(link, &link->conf); 1135 + ret = pcmcia_enable_device(link); 1126 1136 if (ret) 1127 1137 goto failed; 1128 1138 1129 1139 /* Finally, report what we've done */ 1130 1140 dev_info(&link->dev, "index 0x%02x", link->config_index); 1131 - if (link->conf.Attributes & CONF_ENABLE_IRQ) 1132 - printk(", irq %u", link->irq); 1141 + printk(", irq %u", link->irq); 1133 1142 if (link->resource[0]) 1134 1143 printk(" & %pR", link->resource[0]); 1135 1144 if (link->resource[1])
+3 -4
drivers/staging/wlags49_h2/wl_cs.c
··· 83 83 #include <linux/if_arp.h> 84 84 #include <linux/ioport.h> 85 85 86 - #include <pcmcia/cs.h> 87 86 #include <pcmcia/cistpl.h> 88 87 #include <pcmcia/cisreg.h> 89 88 #include <pcmcia/ciscode.h> ··· 146 147 147 148 link->resource[0]->end = HCF_NUM_IO_PORTS; 148 149 link->resource[0]->flags= IO_DATA_PATH_WIDTH_16; 149 - link->conf.Attributes = CONF_ENABLE_IRQ; 150 + link->config_flags |= CONF_ENABLE_IRQ; 150 151 link->config_index = 5; 151 152 link->config_regs = PRESENT_OPTION; 152 153 ··· 300 301 dev = link->priv; 301 302 302 303 /* Do we need to allocate an interrupt? */ 303 - link->conf.Attributes |= CONF_ENABLE_IRQ; 304 + link->config_flags |= CONF_ENABLE_IRQ; 304 305 link->io_lines = 6; 305 306 306 307 ret = pcmcia_request_io(link); ··· 311 312 if (ret != 0) 312 313 goto failed; 313 314 314 - ret = pcmcia_request_configuration(link, &link->conf); 315 + ret = pcmcia_enable_device(link); 315 316 if (ret != 0) 316 317 goto failed; 317 318
-1
drivers/staging/wlags49_h2/wl_internal.h
··· 69 69 ******************************************************************************/ 70 70 #include <linux/version.h> 71 71 #ifdef BUS_PCMCIA 72 - #include <pcmcia/cs.h> 73 72 #include <pcmcia/cistpl.h> 74 73 #include <pcmcia/cisreg.h> 75 74 #include <pcmcia/ciscode.h>
+1 -2
drivers/telephony/ixj_pcmcia.c
··· 8 8 #include <linux/errno.h> /* error codes */ 9 9 #include <linux/slab.h> 10 10 11 - #include <pcmcia/cs.h> 12 11 #include <pcmcia/cistpl.h> 13 12 #include <pcmcia/ds.h> 14 13 ··· 142 143 if (pcmcia_loop_config(link, ixj_config_check, &dflt)) 143 144 goto failed; 144 145 145 - if (pcmcia_request_configuration(link, &link->conf)) 146 + if (pcmcia_enable_device(link)) 146 147 goto failed; 147 148 148 149 /*
+2 -5
drivers/usb/host/sl811_cs.c
··· 20 20 #include <linux/ioport.h> 21 21 #include <linux/platform_device.h> 22 22 23 - #include <pcmcia/cs.h> 24 23 #include <pcmcia/cistpl.h> 25 24 #include <pcmcia/cisreg.h> 26 25 #include <pcmcia/ds.h> ··· 158 159 dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; 159 160 160 161 /* we need an interrupt */ 161 - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 162 + p_dev->config_flags |= CONF_ENABLE_IRQ; 162 163 163 164 /* IO window settings */ 164 165 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; ··· 194 195 if (!link->irq) 195 196 goto failed; 196 197 197 - ret = pcmcia_request_configuration(link, &link->conf); 198 + ret = pcmcia_enable_device(link); 198 199 if (ret) 199 200 goto failed; 200 201 ··· 225 226 return -ENOMEM; 226 227 local->p_dev = link; 227 228 link->priv = local; 228 - 229 - link->conf.Attributes = 0; 230 229 231 230 return sl811_cs_config(link); 232 231 }
-35
include/pcmcia/cs.h
··· 1 - /* 2 - * cs.h 3 - * 4 - * This program is free software; you can redistribute it and/or modify 5 - * it under the terms of the GNU General Public License version 2 as 6 - * published by the Free Software Foundation. 7 - * 8 - * The initial developer of the original code is David A. Hinds 9 - * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds 10 - * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. 11 - * 12 - * (C) 1999 David A. Hinds 13 - */ 14 - 15 - #ifndef _LINUX_CS_H 16 - #define _LINUX_CS_H 17 - 18 - #ifdef __KERNEL__ 19 - #include <linux/interrupt.h> 20 - #endif 21 - 22 - /* For RequestConfiguration */ 23 - typedef struct config_req_t { 24 - u_int Attributes; 25 - } config_req_t; 26 - 27 - /* Attributes for RequestConfiguration */ 28 - #define CONF_ENABLE_IRQ 0x01 29 - #define CONF_ENABLE_DMA 0x02 30 - #define CONF_ENABLE_SPKR 0x04 31 - #define CONF_ENABLE_PULSE_IRQ 0x08 32 - #define CONF_ENABLE_ESR 0x10 33 - #define CONF_VALID_CLIENT 0x100 34 - 35 - #endif /* _LINUX_CS_H */
+11 -6
include/pcmcia/ds.h
··· 24 24 25 25 #ifdef __KERNEL__ 26 26 #include <linux/device.h> 27 + #include <linux/interrupt.h> 27 28 #include <pcmcia/ss.h> 28 29 #include <asm/atomic.h> 30 + 29 31 30 32 /* 31 33 * PCMCIA device drivers (16-bit cards only; 32-bit cards require CardBus ··· 90 88 91 89 struct list_head socket_device_list; 92 90 93 - /* deprecated, will be cleaned up soon */ 94 - config_req_t conf; 95 - 96 91 /* device setup */ 97 92 unsigned int irq; 98 93 struct resource *resource[PCMCIA_NUM_RESOURCES]; 99 94 unsigned int vpp; 100 95 101 - unsigned int io_lines; /* number of I/O lines */ 96 + unsigned int config_flags; /* CONF_ENABLE_ flags below */ 102 97 unsigned int config_base; 103 98 unsigned int config_index; 104 99 unsigned int config_regs; /* PRESENT_ flags below */ 100 + unsigned int io_lines; /* number of I/O lines */ 105 101 106 102 /* Is the device suspended? */ 107 103 u16 suspended:1; ··· 207 207 int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev, 208 208 irq_handler_t handler); 209 209 210 - int pcmcia_request_configuration(struct pcmcia_device *p_dev, 211 - config_req_t *req); 210 + int pcmcia_enable_device(struct pcmcia_device *p_dev); 212 211 213 212 int pcmcia_request_window(struct pcmcia_device *p_dev, struct resource *res, 214 213 unsigned int speed); ··· 263 264 #define PRESENT_IOBASE_2 0x080 264 265 #define PRESENT_IOBASE_3 0x100 265 266 #define PRESENT_IOSIZE 0x200 267 + 268 + /* flags to be passed to pcmcia_enable_device() */ 269 + #define CONF_ENABLE_IRQ 0x01 270 + #define CONF_ENABLE_SPKR 0x02 271 + #define CONF_ENABLE_PULSE_IRQ 0x04 272 + #define CONF_ENABLE_ESR 0x08 266 273 267 274 #endif /* __KERNEL__ */ 268 275
-1
include/pcmcia/ss.h
··· 19 19 #include <linux/sched.h> /* task_struct, completion */ 20 20 #include <linux/mutex.h> 21 21 22 - #include <pcmcia/cs.h> 23 22 #ifdef CONFIG_CARDBUS 24 23 #include <linux/pci.h> 25 24 #endif
+3 -2
sound/pcmcia/pdaudiocf/pdaudiocf.c
··· 142 142 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 143 143 link->resource[0]->end = 16; 144 144 145 - link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; 145 + link->config_flags = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; 146 146 link->config_index = 1; 147 147 link->config_regs = PRESENT_OPTION; 148 148 ··· 217 217 218 218 snd_printdd(KERN_DEBUG "pdacf_config called\n"); 219 219 link->config_index = 0x5; 220 + link->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; 220 221 221 222 ret = pcmcia_request_io(link); 222 223 if (ret) ··· 227 226 if (ret) 228 227 goto failed; 229 228 230 - ret = pcmcia_request_configuration(link, &link->conf); 229 + ret = pcmcia_enable_device(link); 231 230 if (ret) 232 231 goto failed; 233 232
-1
sound/pcmcia/pdaudiocf/pdaudiocf.h
··· 24 24 #include <sound/pcm.h> 25 25 #include <asm/io.h> 26 26 #include <linux/interrupt.h> 27 - #include <pcmcia/cs.h> 28 27 #include <pcmcia/cistpl.h> 29 28 #include <pcmcia/ds.h> 30 29
+3 -3
sound/pcmcia/vx/vxpocket.c
··· 2 2 * Driver for Digigram VXpocket V2/440 soundcards 3 3 * 4 4 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de> 5 - * 5 + 6 6 * This program is free software; you can redistribute it and/or modify 7 7 * it under the terms of the GNU General Public License as published by 8 8 * the Free Software Foundation; either version 2 of the License, or ··· 162 162 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 163 163 link->resource[0]->end = 16; 164 164 165 - link->conf.Attributes = CONF_ENABLE_IRQ; 165 + link->config_flags |= CONF_ENABLE_IRQ; 166 166 link->config_index = 1; 167 167 link->config_regs = PRESENT_OPTION; 168 168 ··· 233 233 if (ret) 234 234 goto failed; 235 235 236 - ret = pcmcia_request_configuration(link, &link->conf); 236 + ret = pcmcia_enable_device(link); 237 237 if (ret) 238 238 goto failed; 239 239
-1
sound/pcmcia/vx/vxpocket.h
··· 23 23 24 24 #include <sound/vx_core.h> 25 25 26 - #include <pcmcia/cs.h> 27 26 #include <pcmcia/cistpl.h> 28 27 #include <pcmcia/ds.h> 29 28