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

pcmcia: move config_{base,index,regs} to struct pcmcia_device

Several drivers prefer to explicitly set config_{base,index,regs},
formerly known as ConfigBase, ConfigIndex and Present. Instead of
passing these values inside config_req_t, store it in struct
pcmcia_device.

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>

+107 -112
+1 -1
drivers/bluetooth/bluecard_cs.c
··· 885 885 bluecard_info_t *info = link->priv; 886 886 int i, n; 887 887 888 - link->conf.ConfigIndex = 0x20; 888 + link->config_index = 0x20; 889 889 890 890 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 891 891 link->resource[0]->end = 64;
+1 -1
drivers/char/pcmcia/ipwireless/main.c
··· 92 92 93 93 /* 0x40 causes it to generate level mode interrupts. */ 94 94 /* 0x04 enables IREQ pin. */ 95 - p_dev->conf.ConfigIndex = cfg->index | 0x44; 95 + p_dev->config_index = cfg->index | 0x44; 96 96 p_dev->io_lines = 16; 97 97 ret = pcmcia_request_io(p_dev); 98 98 if (ret)
+1 -2
drivers/ide/ide-cs.c
··· 227 227 if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { 228 228 cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; 229 229 pdev->io_lines = io->flags & CISTPL_IO_LINES_MASK; 230 - 231 - pdev->conf.ConfigIndex = cfg->index; 230 + pdev->config_index = cfg->index; 232 231 pdev->resource[0]->start = io->win[0].base; 233 232 if (!(io->flags & CISTPL_IO_16BIT)) { 234 233 pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
+2 -2
drivers/isdn/hardware/avm/avm_cs.c
··· 80 80 81 81 /* General socket configuration */ 82 82 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 83 - p_dev->conf.ConfigIndex = 1; 84 - p_dev->conf.Present = PRESENT_OPTION; 83 + p_dev->config_index = 1; 84 + p_dev->config_regs = PRESENT_OPTION; 85 85 86 86 return avmcs_config(p_dev); 87 87 } /* avmcs_attach */
+2 -2
drivers/isdn/hisax/avma1_cs.c
··· 85 85 86 86 /* General socket configuration */ 87 87 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 88 - p_dev->conf.ConfigIndex = 1; 89 - p_dev->conf.Present = PRESENT_OPTION; 88 + p_dev->config_index = 1; 89 + p_dev->config_regs = PRESENT_OPTION; 90 90 91 91 return avma1cs_config(p_dev); 92 92 } /* avma1cs_attach */
+1 -1
drivers/isdn/hisax/elsa_cs.c
··· 211 211 212 212 /* Finally, report what we've done */ 213 213 dev_info(&link->dev, "index 0x%02x: ", 214 - link->conf.ConfigIndex); 214 + link->config_index); 215 215 if (link->conf.Attributes & CONF_ENABLE_IRQ) 216 216 printk(", irq %d", link->irq); 217 217 if (link->resource[0])
+1 -1
drivers/isdn/hisax/sedlbauer_cs.c
··· 253 253 254 254 /* Finally, report what we've done */ 255 255 dev_info(&link->dev, "index 0x%02x:", 256 - link->conf.ConfigIndex); 256 + link->config_index); 257 257 if (link->vpp) 258 258 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); 259 259 if (link->conf.Attributes & CONF_ENABLE_IRQ)
+1 -1
drivers/isdn/hisax/teles_cs.c
··· 191 191 192 192 /* Finally, report what we've done */ 193 193 dev_info(&link->dev, "index 0x%02x:", 194 - link->conf.ConfigIndex); 194 + link->config_index); 195 195 if (link->conf.Attributes & CONF_ENABLE_IRQ) 196 196 printk(", irq %d", link->irq); 197 197 if (link->resource[0])
+1 -1
drivers/mtd/maps/pcmciamtd.c
··· 575 575 link->vpp = 0; 576 576 } 577 577 578 - link->conf.ConfigIndex = 0; 578 + link->config_index = 0; 579 579 DEBUG(2, "Setting Configuration"); 580 580 ret = pcmcia_request_configuration(link, &link->conf); 581 581 if (ret != 0) {
+1 -1
drivers/net/pcmcia/3c574_cs.c
··· 281 281 link->resource[0]->end = 32; 282 282 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; 283 283 link->conf.Attributes = CONF_ENABLE_IRQ; 284 - link->conf.ConfigIndex = 1; 284 + link->config_index = 1; 285 285 286 286 dev->netdev_ops = &el3_netdev_ops; 287 287 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
+1 -1
drivers/net/pcmcia/3c589_cs.c
··· 217 217 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; 218 218 219 219 link->conf.Attributes = CONF_ENABLE_IRQ; 220 - link->conf.ConfigIndex = 1; 220 + link->config_index = 1; 221 221 222 222 dev->netdev_ops = &el3_netdev_ops; 223 223 dev->watchdog_timeo = TX_TIMEOUT;
+3 -3
drivers/net/pcmcia/axnet_cs.c
··· 230 230 }; 231 231 232 232 /* Not much of a test, but the alternatives are messy */ 233 - if (link->conf.ConfigBase != 0x03c0) 233 + if (link->config_base != 0x03c0) 234 234 return 0; 235 235 236 236 axnet_reset_8390(dev); ··· 297 297 if (cfg->index == 0 || cfg->io.nwin == 0) 298 298 return -ENODEV; 299 299 300 - p_dev->conf.ConfigIndex = 0x05; 300 + p_dev->config_index = 0x05; 301 301 /* For multifunction cards, by convention, we configure the 302 302 network function with window 0, and serial with window 1 */ 303 303 if (io->nwin > 1) { ··· 325 325 dev_dbg(&link->dev, "axnet_config(0x%p)\n", link); 326 326 327 327 /* don't trust the CIS on this; Linksys got it wrong */ 328 - link->conf.Present = 0x63; 328 + link->config_regs = 0x63; 329 329 ret = pcmcia_loop_config(link, axnet_configcheck, NULL); 330 330 if (ret != 0) 331 331 goto failed;
+11 -11
drivers/net/pcmcia/fmvj18x_cs.c
··· 312 312 ret = pcmcia_request_io(link); 313 313 if (ret == 0) { 314 314 /* calculate ConfigIndex value */ 315 - link->conf.ConfigIndex = 315 + link->config_index = 316 316 ((link->resource[0]->start & 0x0f0) >> 3) | 0x22; 317 317 return ret; 318 318 } ··· 361 361 link->card_id == PRODID_TDK_NP9610 || 362 362 link->card_id == PRODID_TDK_MN3200) { 363 363 /* MultiFunction Card */ 364 - link->conf.ConfigBase = 0x800; 365 - link->conf.ConfigIndex = 0x47; 364 + link->config_base = 0x800; 365 + link->config_index = 0x47; 366 366 link->resource[1]->end = 8; 367 367 } 368 368 break; 369 369 case MANFID_NEC: 370 370 cardtype = NEC; /* MultiFunction Card */ 371 - link->conf.ConfigBase = 0x800; 372 - link->conf.ConfigIndex = 0x47; 371 + link->config_base = 0x800; 372 + link->config_index = 0x47; 373 373 link->resource[1]->end = 8; 374 374 break; 375 375 case MANFID_KME: 376 376 cardtype = KME; /* MultiFunction Card */ 377 - link->conf.ConfigBase = 0x800; 378 - link->conf.ConfigIndex = 0x47; 377 + link->config_base = 0x800; 378 + link->config_index = 0x47; 379 379 link->resource[1]->end = 8; 380 380 break; 381 381 case MANFID_CONTEC: 382 382 cardtype = CONTEC; 383 383 break; 384 384 case MANFID_FUJITSU: 385 - if (link->conf.ConfigBase == 0x0fe0) 385 + if (link->config_base == 0x0fe0) 386 386 cardtype = MBH10302; 387 387 else if (link->card_id == PRODID_FUJITSU_MBH10302) 388 388 /* RATOC REX-5588/9822/4886's PRODID are 0004(=MBH10302), ··· 402 402 case MANFID_FUJITSU: 403 403 if (link->card_id == PRODID_FUJITSU_MBH10304) { 404 404 cardtype = XXX10304; /* MBH10304 with buggy CIS */ 405 - link->conf.ConfigIndex = 0x20; 405 + link->config_index = 0x20; 406 406 } else { 407 407 cardtype = MBH10302; /* NextCom NC5310, etc. */ 408 - link->conf.ConfigIndex = 1; 408 + link->config_index = 1; 409 409 } 410 410 break; 411 411 case MANFID_UNGERMANN: ··· 413 413 break; 414 414 default: 415 415 cardtype = MBH10302; 416 - link->conf.ConfigIndex = 1; 416 + link->config_index = 1; 417 417 } 418 418 } 419 419
+2 -2
drivers/net/pcmcia/ibmtr_cs.c
··· 153 153 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 154 154 link->resource[0]->end = 4; 155 155 link->conf.Attributes = CONF_ENABLE_IRQ; 156 - link->conf.Present = PRESENT_OPTION; 156 + link->config_regs = PRESENT_OPTION; 157 157 158 158 info->dev = dev; 159 159 ··· 212 212 213 213 dev_dbg(&link->dev, "ibmtr_config\n"); 214 214 215 - link->conf.ConfigIndex = 0x61; 216 215 link->io_lines = 16; 216 + link->config_index = 0x61; 217 217 218 218 /* Determine if this is PRIMARY or ALTERNATE. */ 219 219
+2 -2
drivers/net/pcmcia/nmclan_cs.c
··· 461 461 link->resource[0]->end = 32; 462 462 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 463 463 link->conf.Attributes = CONF_ENABLE_IRQ; 464 - link->conf.ConfigIndex = 1; 465 - link->conf.Present = PRESENT_OPTION; 464 + link->config_index = 1; 465 + link->config_regs = PRESENT_OPTION; 466 466 467 467 lp->tx_free_frames=AM2150_MAX_TX_FRAMES; 468 468
+3 -3
drivers/net/pcmcia/pcnet_cs.c
··· 420 420 int i, j; 421 421 422 422 /* Not much of a test, but the alternatives are messy */ 423 - if (link->conf.ConfigBase != 0x03c0) 423 + if (link->config_base != 0x03c0) 424 424 return NULL; 425 425 426 426 outb_p(0x01, ioaddr + EN0_DCFG); /* Set word-wide access. */ ··· 564 564 565 565 if ((link->manf_id == MANFID_IBM) && 566 566 (link->card_id == PRODID_IBM_HOME_AND_AWAY)) 567 - link->conf.ConfigIndex |= 0x10; 567 + link->config_index |= 0x10; 568 568 569 569 ret = pcmcia_request_configuration(link, &link->conf); 570 570 if (ret) ··· 581 581 } else 582 582 dev->if_port = 0; 583 583 584 - if ((link->conf.ConfigBase == 0x03c0) && 584 + if ((link->config_base == 0x03c0) && 585 585 (link->manf_id == 0x149) && (link->card_id == 0xc1ab)) { 586 586 dev_info(&link->dev, 587 587 "this is an AX88190 card - use axnet_cs instead.\n");
+5 -5
drivers/net/pcmcia/smc91c92_cs.c
··· 411 411 mdelay(200); 412 412 413 413 /* Now read and write the COR... */ 414 - tmp = readb(smc->base + link->conf.ConfigBase + CISREG_COR); 414 + tmp = readb(smc->base + link->config_base + CISREG_COR); 415 415 udelay(5); 416 - writeb(tmp, smc->base + link->conf.ConfigBase + CISREG_COR); 416 + writeb(tmp, smc->base + link->config_base + CISREG_COR); 417 417 418 418 return 0; 419 419 } ··· 464 464 465 465 smc->base = ioremap(link->resource[2]->start, 466 466 resource_size(link->resource[2])); 467 - offset = (smc->manfid == MANFID_MOTOROLA) ? link->conf.ConfigBase : 0; 467 + offset = (smc->manfid == MANFID_MOTOROLA) ? link->config_base : 0; 468 468 i = pcmcia_map_mem_page(link, link->resource[2], offset); 469 469 if ((i == 0) && 470 470 (smc->manfid == MANFID_MEGAHERTZ) && ··· 643 643 link->resource[1]->end = 8; 644 644 645 645 /* Enable Hard Decode, LAN, Modem */ 646 - link->conf.ConfigIndex = 0x23; 647 646 link->io_lines = 16; 647 + link->config_index = 0x23; 648 648 649 649 for (i = j = 0; j < 4; j++) { 650 650 link->resource[1]->start = com[j]; ··· 654 654 } 655 655 if (i != 0) { 656 656 /* Fallback: turn off hard decode */ 657 - link->conf.ConfigIndex = 0x03; 657 + link->config_index = 0x03; 658 658 link->resource[1]->end = 0; 659 659 i = pcmcia_request_io(link); 660 660 }
+1 -1
drivers/net/pcmcia/xirc2ps_cs.c
··· 530 530 531 531 /* General socket configuration */ 532 532 link->conf.Attributes = CONF_ENABLE_IRQ; 533 - link->conf.ConfigIndex = 1; 533 + link->config_index = 1; 534 534 535 535 /* Fill in card specific entries */ 536 536 dev->netdev_ops = &netdev_ops;
+1 -1
drivers/net/wireless/airo_cs.c
··· 240 240 241 241 /* Finally, report what we've done */ 242 242 dev_info(&link->dev, "index 0x%02x: ", 243 - link->conf.ConfigIndex); 243 + link->config_index); 244 244 if (link->vpp) 245 245 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); 246 246 printk(", irq %d", link->irq);
+1 -1
drivers/net/wireless/hostap/hostap_cs.c
··· 601 601 602 602 /* Finally, report what we've done */ 603 603 printk(KERN_INFO "%s: index 0x%02x: ", 604 - dev_info, link->conf.ConfigIndex); 604 + dev_info, link->config_index); 605 605 if (link->vpp) 606 606 printk(", Vpp %d.%d", link->vpp / 10, 607 607 link->vpp % 10);
+1 -1
drivers/net/wireless/ray_cs.c
··· 319 319 320 320 /* General socket configuration */ 321 321 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 322 - p_dev->conf.ConfigIndex = 1; 322 + p_dev->config_index = 1; 323 323 324 324 p_dev->priv = dev; 325 325
+1 -1
drivers/net/wireless/wl3501_cs.c
··· 1889 1889 1890 1890 /* General socket configuration */ 1891 1891 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 1892 - p_dev->conf.ConfigIndex = 1; 1892 + p_dev->config_index = 1; 1893 1893 1894 1894 dev = alloc_etherdev(sizeof(struct wl3501_card)); 1895 1895 if (!dev)
+1 -1
drivers/parport/parport_cs.c
··· 144 144 cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; 145 145 p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; 146 146 if (epp_mode) 147 - p_dev->conf.ConfigIndex |= FORCE_EPP_MODE; 147 + p_dev->config_index |= FORCE_EPP_MODE; 148 148 p_dev->resource[0]->start = io->win[0].base; 149 149 p_dev->resource[0]->end = io->win[0].len; 150 150 if (io->nwin == 2) {
-3
drivers/pcmcia/cs_internal.h
··· 34 34 struct kref ref; 35 35 unsigned int state; 36 36 unsigned int Attributes; 37 - unsigned int ConfigBase; 38 - unsigned char Option; 39 - unsigned int CardValues; 40 37 41 38 struct resource io[MAX_IO_WIN]; /* io ports */ 42 39 struct resource mem[MAX_WIN]; /* mem areas */
+4 -4
drivers/pcmcia/ds.c
··· 276 276 ret = pccard_read_tuple(p_dev->socket, p_dev->func, CISTPL_CONFIG, 277 277 &cis_config); 278 278 if (!ret) { 279 - p_dev->conf.ConfigBase = cis_config.base; 280 - p_dev->conf.Present = cis_config.rmask[0]; 279 + p_dev->config_base = cis_config.base; 280 + p_dev->config_regs = cis_config.rmask[0]; 281 281 } else { 282 282 dev_printk(KERN_INFO, dev, 283 283 "pcmcia: could not parse base and rmask0 of CIS\n"); 284 - p_dev->conf.ConfigBase = 0; 285 - p_dev->conf.Present = 0; 284 + p_dev->config_base = 0; 285 + p_dev->config_regs = 0; 286 286 } 287 287 288 288 ret = p_drv->probe(p_dev);
+1 -1
drivers/pcmcia/pcmcia_cis.c
··· 151 151 struct pcmcia_cfg_mem *cfg_mem = priv; 152 152 153 153 /* default values */ 154 - cfg_mem->p_dev->conf.ConfigIndex = cfg->index; 154 + cfg_mem->p_dev->config_index = cfg->index; 155 155 if (cfg->flags & CISTPL_CFTABLE_DEFAULT) 156 156 cfg_mem->dflt = *cfg; 157 157
+19 -19
drivers/pcmcia/pcmcia_resource.c
··· 168 168 return -EACCES; 169 169 } 170 170 171 - addr = (c->ConfigBase + where) >> 1; 171 + addr = (p_dev->config_base + where) >> 1; 172 172 173 173 ret = accessf(s, 1, addr, 1, val); 174 174 ··· 443 443 pccard_io_map iomap; 444 444 unsigned char status = 0; 445 445 unsigned char ext_status = 0; 446 + unsigned char option = 0; 446 447 447 448 if (!(s->state & SOCKET_PRESENT)) 448 449 return -ENODEV; ··· 474 473 if (req->Attributes & CONF_ENABLE_SPKR) { 475 474 s->socket.flags |= SS_SPKR_ENA; 476 475 status = CCSR_AUDIO_ENA; 477 - if (!(req->Present & PRESENT_STATUS)) 476 + if (!(p_dev->config_regs & PRESENT_STATUS)) 478 477 dev_warn(&p_dev->dev, "speaker requested, but " 479 478 "PRESENT_STATUS not set!\n"); 480 479 } ··· 483 482 else 484 483 s->socket.io_irq = 0; 485 484 if (req->Attributes & CONF_ENABLE_ESR) { 486 - req->Present |= PRESENT_EXT_STATUS; 485 + p_dev->config_regs |= PRESENT_EXT_STATUS; 487 486 ext_status = ESR_REQ_ATTN_ENA; 488 487 } 489 488 s->ops->set_socket(s, &s->socket); 490 489 s->lock_count++; 491 490 492 491 /* Set up CIS configuration registers */ 493 - base = c->ConfigBase = req->ConfigBase; 494 - c->CardValues = req->Present; 495 - if (req->Present & PRESENT_COPY) { 492 + base = p_dev->config_base; 493 + if (p_dev->config_regs & PRESENT_COPY) { 496 494 u16 tmp = 0; 497 495 dev_dbg(&p_dev->dev, "clearing CISREG_SCR\n"); 498 496 pcmcia_write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &tmp); 499 497 } 500 - if (req->Present & PRESENT_PIN_REPLACE) { 498 + if (p_dev->config_regs & PRESENT_PIN_REPLACE) { 501 499 u16 tmp = 0; 502 500 dev_dbg(&p_dev->dev, "clearing CISREG_PRR\n"); 503 501 pcmcia_write_cis_mem(s, 1, (base + CISREG_PRR)>>1, 1, &tmp); 504 502 } 505 - if (req->Present & PRESENT_OPTION) { 503 + if (p_dev->config_regs & PRESENT_OPTION) { 506 504 if (s->functions == 1) { 507 - c->Option = req->ConfigIndex & COR_CONFIG_MASK; 505 + option = p_dev->config_index & COR_CONFIG_MASK; 508 506 } else { 509 - c->Option = req->ConfigIndex & COR_MFC_CONFIG_MASK; 510 - c->Option |= COR_FUNC_ENA|COR_IREQ_ENA; 511 - if (req->Present & PRESENT_IOBASE_0) 512 - c->Option |= COR_ADDR_DECODE; 507 + option = p_dev->config_index & COR_MFC_CONFIG_MASK; 508 + option |= COR_FUNC_ENA|COR_IREQ_ENA; 509 + if (p_dev->config_regs & PRESENT_IOBASE_0) 510 + option |= COR_ADDR_DECODE; 513 511 } 514 512 if ((req->Attributes & CONF_ENABLE_IRQ) && 515 513 !(req->Attributes & CONF_ENABLE_PULSE_IRQ)) 516 - c->Option |= COR_LEVEL_REQ; 517 - pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &c->Option); 514 + option |= COR_LEVEL_REQ; 515 + pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &option); 518 516 mdelay(40); 519 517 } 520 - if (req->Present & PRESENT_STATUS) 518 + if (p_dev->config_regs & PRESENT_STATUS) 521 519 pcmcia_write_cis_mem(s, 1, (base + CISREG_CCSR)>>1, 1, &status); 522 520 523 - if (req->Present & PRESENT_EXT_STATUS) 521 + if (p_dev->config_regs & PRESENT_EXT_STATUS) 524 522 pcmcia_write_cis_mem(s, 1, (base + CISREG_ESR)>>1, 1, 525 523 &ext_status); 526 524 527 - if (req->Present & PRESENT_IOBASE_0) { 525 + if (p_dev->config_regs & PRESENT_IOBASE_0) { 528 526 u8 b = c->io[0].start & 0xff; 529 527 pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_0)>>1, 1, &b); 530 528 b = (c->io[0].start >> 8) & 0xff; 531 529 pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_1)>>1, 1, &b); 532 530 } 533 - if (req->Present & PRESENT_IOSIZE) { 531 + if (p_dev->config_regs & PRESENT_IOSIZE) { 534 532 u8 b = resource_size(&c->io[0]) + resource_size(&c->io[1]) - 1; 535 533 pcmcia_write_cis_mem(s, 1, (base + CISREG_IOSIZE)>>1, 1, &b); 536 534 }
+1 -1
drivers/scsi/pcmcia/aha152x_stub.c
··· 103 103 link->resource[0]->end = 0x20; 104 104 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 105 105 link->conf.Attributes = CONF_ENABLE_IRQ; 106 - link->conf.Present = PRESENT_OPTION; 106 + link->config_regs = PRESENT_OPTION; 107 107 108 108 return aha152x_config_cs(link); 109 109 } /* aha152x_attach */
+1 -1
drivers/scsi/pcmcia/fdomain_stub.c
··· 86 86 link->resource[0]->end = 0x10; 87 87 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 88 88 link->conf.Attributes = CONF_ENABLE_IRQ; 89 - link->conf.Present = PRESENT_OPTION; 89 + link->config_regs = PRESENT_OPTION; 90 90 91 91 return fdomain_config(link); 92 92 } /* fdomain_attach */
+1 -1
drivers/scsi/pcmcia/nsp_cs.c
··· 1745 1745 1746 1746 /* Finally, report what we've done */ 1747 1747 printk(KERN_INFO "nsp_cs: index 0x%02x: ", 1748 - link->conf.ConfigIndex); 1748 + link->config_index); 1749 1749 if (link->vpp) { 1750 1750 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); 1751 1751 }
+1 -1
drivers/scsi/pcmcia/qlogic_stub.c
··· 159 159 link->resource[0]->end = 16; 160 160 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 161 161 link->conf.Attributes = CONF_ENABLE_IRQ; 162 - link->conf.Present = PRESENT_OPTION; 162 + link->config_regs = PRESENT_OPTION; 163 163 164 164 return qlogic_config(link); 165 165 } /* qlogic_attach */
+3 -3
drivers/serial/serial_cs.c
··· 495 495 496 496 found_port: 497 497 if (info->multi && (info->manfid == MANFID_3COM)) 498 - link->conf.ConfigIndex &= ~(0x08); 498 + link->config_index &= ~(0x08); 499 499 500 500 /* 501 501 * Apply any configuration quirks. ··· 591 591 info->prodid == PRODID_POSSIO_GCC)) { 592 592 int err; 593 593 594 - if (link->conf.ConfigIndex == 1 || 595 - link->conf.ConfigIndex == 3) { 594 + if (link->config_index == 1 || 595 + link->config_index == 3) { 596 596 err = setup_serial(link, info, base2, 597 597 link->irq); 598 598 base2 = link->resource[0]->start;;
+1 -1
drivers/staging/comedi/drivers/cb_das16_cs.c
··· 772 772 goto failed; 773 773 774 774 /* Finally, report what we've done */ 775 - dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); 775 + dev_info(&link->dev, "index 0x%02x", link->config_index); 776 776 if (link->conf.Attributes & CONF_ENABLE_IRQ) 777 777 printk(", irq %u", link->irq); 778 778 if (link->resource[0])
+1 -1
drivers/staging/comedi/drivers/das08_cs.c
··· 268 268 goto failed; 269 269 270 270 /* Finally, report what we've done */ 271 - dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); 271 + dev_info(&link->dev, "index 0x%02x", link->config_index); 272 272 if (link->conf.Attributes & CONF_ENABLE_IRQ) 273 273 printk(", irq %u", link->irq); 274 274 if (link->resource[0])
+1 -1
drivers/staging/comedi/drivers/ni_daq_700.c
··· 607 607 goto failed; 608 608 609 609 /* Finally, report what we've done */ 610 - dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); 610 + dev_info(&link->dev, "index 0x%02x", link->config_index); 611 611 if (link->conf.Attributes & CONF_ENABLE_IRQ) 612 612 printk(", irq %d", link->irq); 613 613 if (link->resource[0])
+1 -1
drivers/staging/comedi/drivers/ni_daq_dio24.c
··· 358 358 goto failed; 359 359 360 360 /* Finally, report what we've done */ 361 - dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); 361 + dev_info(&link->dev, "index 0x%02x", link->config_index); 362 362 if (link->conf.Attributes & CONF_ENABLE_IRQ) 363 363 printk(", irq %d", link->irq); 364 364 if (link->resource[0])
+1 -1
drivers/staging/comedi/drivers/ni_labpc_cs.c
··· 336 336 goto failed; 337 337 338 338 /* Finally, report what we've done */ 339 - dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); 339 + dev_info(&link->dev, "index 0x%02x", link->config_index); 340 340 if (link->conf.Attributes & CONF_ENABLE_IRQ) 341 341 printk(", irq %d", link->irq); 342 342 if (link->resource[0])
+1 -1
drivers/staging/comedi/drivers/quatech_daqp_cs.c
··· 1137 1137 goto failed; 1138 1138 1139 1139 /* Finally, report what we've done */ 1140 - dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); 1140 + dev_info(&link->dev, "index 0x%02x", link->config_index); 1141 1141 if (link->conf.Attributes & CONF_ENABLE_IRQ) 1142 1142 printk(", irq %u", link->irq); 1143 1143 if (link->resource[0])
+2 -2
drivers/staging/wlags49_h2/wl_cs.c
··· 148 148 link->resource[0]->end = HCF_NUM_IO_PORTS; 149 149 link->resource[0]->flags= IO_DATA_PATH_WIDTH_16; 150 150 link->conf.Attributes = CONF_ENABLE_IRQ; 151 - link->conf.ConfigIndex = 5; 152 - link->conf.Present = PRESENT_OPTION; 151 + link->config_index = 5; 152 + link->config_regs = PRESENT_OPTION; 153 153 154 154 link->priv = dev; 155 155 lp = wl_priv(dev);
+1 -1
drivers/usb/host/sl811_cs.c
··· 200 200 goto failed; 201 201 202 202 dev_info(&link->dev, "index 0x%02x: ", 203 - link->conf.ConfigIndex); 203 + link->config_index); 204 204 if (link->vpp) 205 205 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); 206 206 printk(", irq %d", link->irq);
-15
include/pcmcia/cs.h
··· 22 22 /* For RequestConfiguration */ 23 23 typedef struct config_req_t { 24 24 u_int Attributes; 25 - u_int ConfigBase; 26 - u_char ConfigIndex; 27 - u_int Present; 28 25 } config_req_t; 29 26 30 27 /* Attributes for RequestConfiguration */ ··· 31 34 #define CONF_ENABLE_PULSE_IRQ 0x08 32 35 #define CONF_ENABLE_ESR 0x10 33 36 #define CONF_VALID_CLIENT 0x100 34 - 35 - /* Configuration registers present */ 36 - #define PRESENT_OPTION 0x001 37 - #define PRESENT_STATUS 0x002 38 - #define PRESENT_PIN_REPLACE 0x004 39 - #define PRESENT_COPY 0x008 40 - #define PRESENT_EXT_STATUS 0x010 41 - #define PRESENT_IOBASE_0 0x020 42 - #define PRESENT_IOBASE_1 0x040 43 - #define PRESENT_IOBASE_2 0x080 44 - #define PRESENT_IOBASE_3 0x100 45 - #define PRESENT_IOSIZE 0x200 46 37 47 38 #endif /* _LINUX_CS_H */
+14
include/pcmcia/ds.h
··· 97 97 unsigned int vpp; 98 98 99 99 unsigned int io_lines; /* number of I/O lines */ 100 + unsigned int config_base; 101 + unsigned int config_index; 102 + unsigned int config_regs; /* PRESENT_ flags below */ 100 103 101 104 /* Is the device suspended? */ 102 105 u16 suspended:1; ··· 253 250 0x0c -> 2 254 251 0x10 -> 3 */ 255 252 253 + /* config_reg{ister}s present for this PCMCIA device */ 254 + #define PRESENT_OPTION 0x001 255 + #define PRESENT_STATUS 0x002 256 + #define PRESENT_PIN_REPLACE 0x004 257 + #define PRESENT_COPY 0x008 258 + #define PRESENT_EXT_STATUS 0x010 259 + #define PRESENT_IOBASE_0 0x020 260 + #define PRESENT_IOBASE_1 0x040 261 + #define PRESENT_IOBASE_2 0x080 262 + #define PRESENT_IOBASE_3 0x100 263 + #define PRESENT_IOSIZE 0x200 256 264 257 265 #endif /* __KERNEL__ */ 258 266
+3 -3
sound/pcmcia/pdaudiocf/pdaudiocf.c
··· 143 143 link->resource[0]->end = 16; 144 144 145 145 link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; 146 - link->conf.ConfigIndex = 1; 147 - link->conf.Present = PRESENT_OPTION; 146 + link->config_index = 1; 147 + link->config_regs = PRESENT_OPTION; 148 148 149 149 return pdacf_config(link); 150 150 } ··· 216 216 int ret; 217 217 218 218 snd_printdd(KERN_DEBUG "pdacf_config called\n"); 219 - link->conf.ConfigIndex = 0x5; 219 + link->config_index = 0x5; 220 220 221 221 ret = pcmcia_request_io(link); 222 222 if (ret)
+2 -2
sound/pcmcia/vx/vxpocket.c
··· 163 163 link->resource[0]->end = 16; 164 164 165 165 link->conf.Attributes = CONF_ENABLE_IRQ; 166 - link->conf.ConfigIndex = 1; 167 - link->conf.Present = PRESENT_OPTION; 166 + link->config_index = 1; 167 + link->config_regs = PRESENT_OPTION; 168 168 169 169 *chip_ret = vxp; 170 170 return 0;