diff options
51 files changed, 223 insertions, 240 deletions
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 3dcb2b1b60e9..1fcd0659b3f2 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
| @@ -210,13 +210,13 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, | |||
| 210 | pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1; | 210 | pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1; |
| 211 | if (pcmcia_request_io(pdev, &pdev->io) != 0) | 211 | if (pcmcia_request_io(pdev, &pdev->io) != 0) |
| 212 | return -ENODEV; | 212 | return -ENODEV; |
| 213 | stk->ctl_base = pdev->io.BasePort2; | 213 | stk->ctl_base = pdev->resource[1]->start; |
| 214 | } else if ((io->nwin == 1) && (io->win[0].len >= 16)) { | 214 | } else if ((io->nwin == 1) && (io->win[0].len >= 16)) { |
| 215 | pdev->io.NumPorts1 = io->win[0].len; | 215 | pdev->io.NumPorts1 = io->win[0].len; |
| 216 | pdev->io.NumPorts2 = 0; | 216 | pdev->io.NumPorts2 = 0; |
| 217 | if (pcmcia_request_io(pdev, &pdev->io) != 0) | 217 | if (pcmcia_request_io(pdev, &pdev->io) != 0) |
| 218 | return -ENODEV; | 218 | return -ENODEV; |
| 219 | stk->ctl_base = pdev->io.BasePort1 + 0x0e; | 219 | stk->ctl_base = pdev->resource[0]->start + 0x0e; |
| 220 | } else | 220 | } else |
| 221 | return -ENODEV; | 221 | return -ENODEV; |
| 222 | /* If we've got this far, we're done */ | 222 | /* If we've got this far, we're done */ |
| @@ -270,7 +270,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
| 270 | if (pcmcia_loop_config(pdev, pcmcia_check_one_config, stk)) | 270 | if (pcmcia_loop_config(pdev, pcmcia_check_one_config, stk)) |
| 271 | goto failed; /* No suitable config found */ | 271 | goto failed; /* No suitable config found */ |
| 272 | } | 272 | } |
| 273 | io_base = pdev->io.BasePort1; | 273 | io_base = pdev->resource[0]->start; |
| 274 | ctl_base = stk->ctl_base; | 274 | ctl_base = stk->ctl_base; |
| 275 | if (!pdev->irq) | 275 | if (!pdev->irq) |
| 276 | goto failed; | 276 | goto failed; |
| @@ -293,7 +293,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
| 293 | 293 | ||
| 294 | /* FIXME: Could be more ports at base + 0x10 but we only deal with | 294 | /* FIXME: Could be more ports at base + 0x10 but we only deal with |
| 295 | one right now */ | 295 | one right now */ |
| 296 | if (pdev->io.NumPorts1 >= 0x20) | 296 | if (resource_size(pdev->resource[0]) >= 0x20) |
| 297 | n_ports = 2; | 297 | n_ports = 2; |
| 298 | 298 | ||
| 299 | if (pdev->manf_id == 0x0097 && pdev->card_id == 0x1620) | 299 | if (pdev->manf_id == 0x0097 && pdev->card_id == 0x1620) |
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index eb085de16713..24d2007139e8 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
| @@ -159,7 +159,7 @@ static void bluecard_detach(struct pcmcia_device *p_dev); | |||
| 159 | static void bluecard_activity_led_timeout(u_long arg) | 159 | static void bluecard_activity_led_timeout(u_long arg) |
| 160 | { | 160 | { |
| 161 | bluecard_info_t *info = (bluecard_info_t *)arg; | 161 | bluecard_info_t *info = (bluecard_info_t *)arg; |
| 162 | unsigned int iobase = info->p_dev->io.BasePort1; | 162 | unsigned int iobase = info->p_dev->resource[0]->start; |
| 163 | 163 | ||
| 164 | if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) | 164 | if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) |
| 165 | return; | 165 | return; |
| @@ -176,7 +176,7 @@ static void bluecard_activity_led_timeout(u_long arg) | |||
| 176 | 176 | ||
| 177 | static void bluecard_enable_activity_led(bluecard_info_t *info) | 177 | static void bluecard_enable_activity_led(bluecard_info_t *info) |
| 178 | { | 178 | { |
| 179 | unsigned int iobase = info->p_dev->io.BasePort1; | 179 | unsigned int iobase = info->p_dev->resource[0]->start; |
| 180 | 180 | ||
| 181 | if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) | 181 | if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) |
| 182 | return; | 182 | return; |
| @@ -232,7 +232,7 @@ static void bluecard_write_wakeup(bluecard_info_t *info) | |||
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | do { | 234 | do { |
| 235 | register unsigned int iobase = info->p_dev->io.BasePort1; | 235 | register unsigned int iobase = info->p_dev->resource[0]->start; |
| 236 | register unsigned int offset; | 236 | register unsigned int offset; |
| 237 | register unsigned char command; | 237 | register unsigned char command; |
| 238 | register unsigned long ready_bit; | 238 | register unsigned long ready_bit; |
| @@ -379,7 +379,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset) | |||
| 379 | return; | 379 | return; |
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | iobase = info->p_dev->io.BasePort1; | 382 | iobase = info->p_dev->resource[0]->start; |
| 383 | 383 | ||
| 384 | if (test_bit(XMIT_SENDING_READY, &(info->tx_state))) | 384 | if (test_bit(XMIT_SENDING_READY, &(info->tx_state))) |
| 385 | bluecard_enable_activity_led(info); | 385 | bluecard_enable_activity_led(info); |
| @@ -508,7 +508,7 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst) | |||
| 508 | if (!test_bit(CARD_READY, &(info->hw_state))) | 508 | if (!test_bit(CARD_READY, &(info->hw_state))) |
| 509 | return IRQ_HANDLED; | 509 | return IRQ_HANDLED; |
| 510 | 510 | ||
| 511 | iobase = info->p_dev->io.BasePort1; | 511 | iobase = info->p_dev->resource[0]->start; |
| 512 | 512 | ||
| 513 | spin_lock(&(info->lock)); | 513 | spin_lock(&(info->lock)); |
| 514 | 514 | ||
| @@ -622,7 +622,7 @@ static int bluecard_hci_flush(struct hci_dev *hdev) | |||
| 622 | static int bluecard_hci_open(struct hci_dev *hdev) | 622 | static int bluecard_hci_open(struct hci_dev *hdev) |
| 623 | { | 623 | { |
| 624 | bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data); | 624 | bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data); |
| 625 | unsigned int iobase = info->p_dev->io.BasePort1; | 625 | unsigned int iobase = info->p_dev->resource[0]->start; |
| 626 | 626 | ||
| 627 | if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) | 627 | if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) |
| 628 | bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE); | 628 | bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE); |
| @@ -642,7 +642,7 @@ static int bluecard_hci_open(struct hci_dev *hdev) | |||
| 642 | static int bluecard_hci_close(struct hci_dev *hdev) | 642 | static int bluecard_hci_close(struct hci_dev *hdev) |
| 643 | { | 643 | { |
| 644 | bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data); | 644 | bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data); |
| 645 | unsigned int iobase = info->p_dev->io.BasePort1; | 645 | unsigned int iobase = info->p_dev->resource[0]->start; |
| 646 | 646 | ||
| 647 | if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags))) | 647 | if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags))) |
| 648 | return 0; | 648 | return 0; |
| @@ -709,7 +709,7 @@ static int bluecard_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned l | |||
| 709 | 709 | ||
| 710 | static int bluecard_open(bluecard_info_t *info) | 710 | static int bluecard_open(bluecard_info_t *info) |
| 711 | { | 711 | { |
| 712 | unsigned int iobase = info->p_dev->io.BasePort1; | 712 | unsigned int iobase = info->p_dev->resource[0]->start; |
| 713 | struct hci_dev *hdev; | 713 | struct hci_dev *hdev; |
| 714 | unsigned char id; | 714 | unsigned char id; |
| 715 | 715 | ||
| @@ -828,7 +828,7 @@ static int bluecard_open(bluecard_info_t *info) | |||
| 828 | 828 | ||
| 829 | static int bluecard_close(bluecard_info_t *info) | 829 | static int bluecard_close(bluecard_info_t *info) |
| 830 | { | 830 | { |
| 831 | unsigned int iobase = info->p_dev->io.BasePort1; | 831 | unsigned int iobase = info->p_dev->resource[0]->start; |
| 832 | struct hci_dev *hdev = info->hdev; | 832 | struct hci_dev *hdev = info->hdev; |
| 833 | 833 | ||
| 834 | if (!hdev) | 834 | if (!hdev) |
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 457b603f8678..8ab494c0c17f 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
| @@ -188,7 +188,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info) | |||
| 188 | return; | 188 | return; |
| 189 | 189 | ||
| 190 | do { | 190 | do { |
| 191 | register unsigned int iobase = info->p_dev->io.BasePort1; | 191 | register unsigned int iobase = info->p_dev->resource[0]->start; |
| 192 | register struct sk_buff *skb; | 192 | register struct sk_buff *skb; |
| 193 | register int len; | 193 | register int len; |
| 194 | 194 | ||
| @@ -226,7 +226,7 @@ static void bt3c_receive(bt3c_info_t *info) | |||
| 226 | return; | 226 | return; |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | iobase = info->p_dev->io.BasePort1; | 229 | iobase = info->p_dev->resource[0]->start; |
| 230 | 230 | ||
| 231 | avail = bt3c_read(iobase, 0x7006); | 231 | avail = bt3c_read(iobase, 0x7006); |
| 232 | //printk("bt3c_cs: receiving %d bytes\n", avail); | 232 | //printk("bt3c_cs: receiving %d bytes\n", avail); |
| @@ -347,7 +347,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst) | |||
| 347 | /* our irq handler is shared */ | 347 | /* our irq handler is shared */ |
| 348 | return IRQ_NONE; | 348 | return IRQ_NONE; |
| 349 | 349 | ||
| 350 | iobase = info->p_dev->io.BasePort1; | 350 | iobase = info->p_dev->resource[0]->start; |
| 351 | 351 | ||
| 352 | spin_lock(&(info->lock)); | 352 | spin_lock(&(info->lock)); |
| 353 | 353 | ||
| @@ -480,7 +480,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware, | |||
| 480 | unsigned int iobase, size, addr, fcs, tmp; | 480 | unsigned int iobase, size, addr, fcs, tmp; |
| 481 | int i, err = 0; | 481 | int i, err = 0; |
| 482 | 482 | ||
| 483 | iobase = info->p_dev->io.BasePort1; | 483 | iobase = info->p_dev->resource[0]->start; |
| 484 | 484 | ||
| 485 | /* Reset */ | 485 | /* Reset */ |
| 486 | bt3c_io_write(iobase, 0x8040, 0x0404); | 486 | bt3c_io_write(iobase, 0x8040, 0x0404); |
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index e7e0a17aecc2..7e770d40368d 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c | |||
| @@ -142,7 +142,7 @@ static void btuart_write_wakeup(btuart_info_t *info) | |||
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | do { | 144 | do { |
| 145 | register unsigned int iobase = info->p_dev->io.BasePort1; | 145 | register unsigned int iobase = info->p_dev->resource[0]->start; |
| 146 | register struct sk_buff *skb; | 146 | register struct sk_buff *skb; |
| 147 | register int len; | 147 | register int len; |
| 148 | 148 | ||
| @@ -183,7 +183,7 @@ static void btuart_receive(btuart_info_t *info) | |||
| 183 | return; | 183 | return; |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | iobase = info->p_dev->io.BasePort1; | 186 | iobase = info->p_dev->resource[0]->start; |
| 187 | 187 | ||
| 188 | do { | 188 | do { |
| 189 | info->hdev->stat.byte_rx++; | 189 | info->hdev->stat.byte_rx++; |
| @@ -297,7 +297,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst) | |||
| 297 | /* our irq handler is shared */ | 297 | /* our irq handler is shared */ |
| 298 | return IRQ_NONE; | 298 | return IRQ_NONE; |
| 299 | 299 | ||
| 300 | iobase = info->p_dev->io.BasePort1; | 300 | iobase = info->p_dev->resource[0]->start; |
| 301 | 301 | ||
| 302 | spin_lock(&(info->lock)); | 302 | spin_lock(&(info->lock)); |
| 303 | 303 | ||
| @@ -354,7 +354,7 @@ static void btuart_change_speed(btuart_info_t *info, unsigned int speed) | |||
| 354 | return; | 354 | return; |
| 355 | } | 355 | } |
| 356 | 356 | ||
| 357 | iobase = info->p_dev->io.BasePort1; | 357 | iobase = info->p_dev->resource[0]->start; |
| 358 | 358 | ||
| 359 | spin_lock_irqsave(&(info->lock), flags); | 359 | spin_lock_irqsave(&(info->lock), flags); |
| 360 | 360 | ||
| @@ -478,7 +478,7 @@ static int btuart_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned lon | |||
| 478 | static int btuart_open(btuart_info_t *info) | 478 | static int btuart_open(btuart_info_t *info) |
| 479 | { | 479 | { |
| 480 | unsigned long flags; | 480 | unsigned long flags; |
| 481 | unsigned int iobase = info->p_dev->io.BasePort1; | 481 | unsigned int iobase = info->p_dev->resource[0]->start; |
| 482 | struct hci_dev *hdev; | 482 | struct hci_dev *hdev; |
| 483 | 483 | ||
| 484 | spin_lock_init(&(info->lock)); | 484 | spin_lock_init(&(info->lock)); |
| @@ -548,7 +548,7 @@ static int btuart_open(btuart_info_t *info) | |||
| 548 | static int btuart_close(btuart_info_t *info) | 548 | static int btuart_close(btuart_info_t *info) |
| 549 | { | 549 | { |
| 550 | unsigned long flags; | 550 | unsigned long flags; |
| 551 | unsigned int iobase = info->p_dev->io.BasePort1; | 551 | unsigned int iobase = info->p_dev->resource[0]->start; |
| 552 | struct hci_dev *hdev = info->hdev; | 552 | struct hci_dev *hdev = info->hdev; |
| 553 | 553 | ||
| 554 | if (!hdev) | 554 | if (!hdev) |
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 7c94aad0b791..bfe9313516fb 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
| @@ -149,7 +149,7 @@ static void dtl1_write_wakeup(dtl1_info_t *info) | |||
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | do { | 151 | do { |
| 152 | register unsigned int iobase = info->p_dev->io.BasePort1; | 152 | register unsigned int iobase = info->p_dev->resource[0]->start; |
| 153 | register struct sk_buff *skb; | 153 | register struct sk_buff *skb; |
| 154 | register int len; | 154 | register int len; |
| 155 | 155 | ||
| @@ -214,7 +214,7 @@ static void dtl1_receive(dtl1_info_t *info) | |||
| 214 | return; | 214 | return; |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | iobase = info->p_dev->io.BasePort1; | 217 | iobase = info->p_dev->resource[0]->start; |
| 218 | 218 | ||
| 219 | do { | 219 | do { |
| 220 | info->hdev->stat.byte_rx++; | 220 | info->hdev->stat.byte_rx++; |
| @@ -301,7 +301,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst) | |||
| 301 | /* our irq handler is shared */ | 301 | /* our irq handler is shared */ |
| 302 | return IRQ_NONE; | 302 | return IRQ_NONE; |
| 303 | 303 | ||
| 304 | iobase = info->p_dev->io.BasePort1; | 304 | iobase = info->p_dev->resource[0]->start; |
| 305 | 305 | ||
| 306 | spin_lock(&(info->lock)); | 306 | spin_lock(&(info->lock)); |
| 307 | 307 | ||
| @@ -461,7 +461,7 @@ static int dtl1_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long | |||
| 461 | static int dtl1_open(dtl1_info_t *info) | 461 | static int dtl1_open(dtl1_info_t *info) |
| 462 | { | 462 | { |
| 463 | unsigned long flags; | 463 | unsigned long flags; |
| 464 | unsigned int iobase = info->p_dev->io.BasePort1; | 464 | unsigned int iobase = info->p_dev->resource[0]->start; |
| 465 | struct hci_dev *hdev; | 465 | struct hci_dev *hdev; |
| 466 | 466 | ||
| 467 | spin_lock_init(&(info->lock)); | 467 | spin_lock_init(&(info->lock)); |
| @@ -508,7 +508,8 @@ static int dtl1_open(dtl1_info_t *info) | |||
| 508 | outb(UART_LCR_WLEN8, iobase + UART_LCR); /* Reset DLAB */ | 508 | outb(UART_LCR_WLEN8, iobase + UART_LCR); /* Reset DLAB */ |
| 509 | outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase + UART_MCR); | 509 | outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase + UART_MCR); |
| 510 | 510 | ||
| 511 | info->ri_latch = inb(info->p_dev->io.BasePort1 + UART_MSR) & UART_MSR_RI; | 511 | info->ri_latch = inb(info->p_dev->resource[0]->start + UART_MSR) |
| 512 | & UART_MSR_RI; | ||
| 512 | 513 | ||
| 513 | /* Turn on interrupts */ | 514 | /* Turn on interrupts */ |
| 514 | outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER); | 515 | outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER); |
| @@ -533,7 +534,7 @@ static int dtl1_open(dtl1_info_t *info) | |||
| 533 | static int dtl1_close(dtl1_info_t *info) | 534 | static int dtl1_close(dtl1_info_t *info) |
| 534 | { | 535 | { |
| 535 | unsigned long flags; | 536 | unsigned long flags; |
| 536 | unsigned int iobase = info->p_dev->io.BasePort1; | 537 | unsigned int iobase = info->p_dev->resource[0]->start; |
| 537 | struct hci_dev *hdev = info->hdev; | 538 | struct hci_dev *hdev = info->hdev; |
| 538 | 539 | ||
| 539 | if (!hdev) | 540 | if (!hdev) |
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index a8be2a7906e0..18484edc1259 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
| @@ -421,7 +421,7 @@ static struct card_fixup card_fixups[] = { | |||
| 421 | static void set_cardparameter(struct cm4000_dev *dev) | 421 | static void set_cardparameter(struct cm4000_dev *dev) |
| 422 | { | 422 | { |
| 423 | int i; | 423 | int i; |
| 424 | unsigned int iobase = dev->p_dev->io.BasePort1; | 424 | unsigned int iobase = dev->p_dev->resource[0]->start; |
| 425 | u_int8_t stopbits = 0x02; /* ISO default */ | 425 | u_int8_t stopbits = 0x02; /* ISO default */ |
| 426 | 426 | ||
| 427 | DEBUGP(3, dev, "-> set_cardparameter\n"); | 427 | DEBUGP(3, dev, "-> set_cardparameter\n"); |
| @@ -454,7 +454,7 @@ static int set_protocol(struct cm4000_dev *dev, struct ptsreq *ptsreq) | |||
| 454 | unsigned short num_bytes_read; | 454 | unsigned short num_bytes_read; |
| 455 | unsigned char pts_reply[4]; | 455 | unsigned char pts_reply[4]; |
| 456 | ssize_t rc; | 456 | ssize_t rc; |
| 457 | unsigned int iobase = dev->p_dev->io.BasePort1; | 457 | unsigned int iobase = dev->p_dev->resource[0]->start; |
| 458 | 458 | ||
| 459 | rc = 0; | 459 | rc = 0; |
| 460 | 460 | ||
| @@ -663,7 +663,7 @@ static void terminate_monitor(struct cm4000_dev *dev) | |||
| 663 | static void monitor_card(unsigned long p) | 663 | static void monitor_card(unsigned long p) |
| 664 | { | 664 | { |
| 665 | struct cm4000_dev *dev = (struct cm4000_dev *) p; | 665 | struct cm4000_dev *dev = (struct cm4000_dev *) p; |
| 666 | unsigned int iobase = dev->p_dev->io.BasePort1; | 666 | unsigned int iobase = dev->p_dev->resource[0]->start; |
| 667 | unsigned short s; | 667 | unsigned short s; |
| 668 | struct ptsreq ptsreq; | 668 | struct ptsreq ptsreq; |
| 669 | int i, atrc; | 669 | int i, atrc; |
| @@ -924,7 +924,7 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count, | |||
| 924 | loff_t *ppos) | 924 | loff_t *ppos) |
| 925 | { | 925 | { |
| 926 | struct cm4000_dev *dev = filp->private_data; | 926 | struct cm4000_dev *dev = filp->private_data; |
| 927 | unsigned int iobase = dev->p_dev->io.BasePort1; | 927 | unsigned int iobase = dev->p_dev->resource[0]->start; |
| 928 | ssize_t rc; | 928 | ssize_t rc; |
| 929 | int i, j, k; | 929 | int i, j, k; |
| 930 | 930 | ||
| @@ -1047,7 +1047,7 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf, | |||
| 1047 | size_t count, loff_t *ppos) | 1047 | size_t count, loff_t *ppos) |
| 1048 | { | 1048 | { |
| 1049 | struct cm4000_dev *dev = filp->private_data; | 1049 | struct cm4000_dev *dev = filp->private_data; |
| 1050 | unsigned int iobase = dev->p_dev->io.BasePort1; | 1050 | unsigned int iobase = dev->p_dev->resource[0]->start; |
| 1051 | unsigned short s; | 1051 | unsigned short s; |
| 1052 | unsigned char tmp; | 1052 | unsigned char tmp; |
| 1053 | unsigned char infolen; | 1053 | unsigned char infolen; |
| @@ -1400,7 +1400,7 @@ static void stop_monitor(struct cm4000_dev *dev) | |||
| 1400 | static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | 1400 | static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
| 1401 | { | 1401 | { |
| 1402 | struct cm4000_dev *dev = filp->private_data; | 1402 | struct cm4000_dev *dev = filp->private_data; |
| 1403 | unsigned int iobase = dev->p_dev->io.BasePort1; | 1403 | unsigned int iobase = dev->p_dev->resource[0]->start; |
| 1404 | struct inode *inode = filp->f_path.dentry->d_inode; | 1404 | struct inode *inode = filp->f_path.dentry->d_inode; |
| 1405 | struct pcmcia_device *link; | 1405 | struct pcmcia_device *link; |
| 1406 | int size; | 1406 | int size; |
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index 44adae98c576..a6bbf199dde9 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c | |||
| @@ -109,7 +109,7 @@ static inline unsigned char xinb(unsigned short port) | |||
| 109 | static void cm4040_do_poll(unsigned long dummy) | 109 | static void cm4040_do_poll(unsigned long dummy) |
| 110 | { | 110 | { |
| 111 | struct reader_dev *dev = (struct reader_dev *) dummy; | 111 | struct reader_dev *dev = (struct reader_dev *) dummy; |
| 112 | unsigned int obs = xinb(dev->p_dev->io.BasePort1 | 112 | unsigned int obs = xinb(dev->p_dev->resource[0]->start |
| 113 | + REG_OFFSET_BUFFER_STATUS); | 113 | + REG_OFFSET_BUFFER_STATUS); |
| 114 | 114 | ||
| 115 | if ((obs & BSR_BULK_IN_FULL)) { | 115 | if ((obs & BSR_BULK_IN_FULL)) { |
| @@ -140,7 +140,7 @@ static void cm4040_stop_poll(struct reader_dev *dev) | |||
| 140 | static int wait_for_bulk_out_ready(struct reader_dev *dev) | 140 | static int wait_for_bulk_out_ready(struct reader_dev *dev) |
| 141 | { | 141 | { |
| 142 | int i, rc; | 142 | int i, rc; |
| 143 | int iobase = dev->p_dev->io.BasePort1; | 143 | int iobase = dev->p_dev->resource[0]->start; |
| 144 | 144 | ||
| 145 | for (i = 0; i < POLL_LOOP_COUNT; i++) { | 145 | for (i = 0; i < POLL_LOOP_COUNT; i++) { |
| 146 | if ((xinb(iobase + REG_OFFSET_BUFFER_STATUS) | 146 | if ((xinb(iobase + REG_OFFSET_BUFFER_STATUS) |
| @@ -170,7 +170,7 @@ static int wait_for_bulk_out_ready(struct reader_dev *dev) | |||
| 170 | /* Write to Sync Control Register */ | 170 | /* Write to Sync Control Register */ |
| 171 | static int write_sync_reg(unsigned char val, struct reader_dev *dev) | 171 | static int write_sync_reg(unsigned char val, struct reader_dev *dev) |
| 172 | { | 172 | { |
| 173 | int iobase = dev->p_dev->io.BasePort1; | 173 | int iobase = dev->p_dev->resource[0]->start; |
| 174 | int rc; | 174 | int rc; |
| 175 | 175 | ||
| 176 | rc = wait_for_bulk_out_ready(dev); | 176 | rc = wait_for_bulk_out_ready(dev); |
| @@ -188,7 +188,7 @@ static int write_sync_reg(unsigned char val, struct reader_dev *dev) | |||
| 188 | static int wait_for_bulk_in_ready(struct reader_dev *dev) | 188 | static int wait_for_bulk_in_ready(struct reader_dev *dev) |
| 189 | { | 189 | { |
| 190 | int i, rc; | 190 | int i, rc; |
| 191 | int iobase = dev->p_dev->io.BasePort1; | 191 | int iobase = dev->p_dev->resource[0]->start; |
| 192 | 192 | ||
| 193 | for (i = 0; i < POLL_LOOP_COUNT; i++) { | 193 | for (i = 0; i < POLL_LOOP_COUNT; i++) { |
| 194 | if ((xinb(iobase + REG_OFFSET_BUFFER_STATUS) | 194 | if ((xinb(iobase + REG_OFFSET_BUFFER_STATUS) |
| @@ -218,7 +218,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf, | |||
| 218 | size_t count, loff_t *ppos) | 218 | size_t count, loff_t *ppos) |
| 219 | { | 219 | { |
| 220 | struct reader_dev *dev = filp->private_data; | 220 | struct reader_dev *dev = filp->private_data; |
| 221 | int iobase = dev->p_dev->io.BasePort1; | 221 | int iobase = dev->p_dev->resource[0]->start; |
| 222 | size_t bytes_to_read; | 222 | size_t bytes_to_read; |
| 223 | unsigned long i; | 223 | unsigned long i; |
| 224 | size_t min_bytes_to_read; | 224 | size_t min_bytes_to_read; |
| @@ -320,7 +320,7 @@ static ssize_t cm4040_write(struct file *filp, const char __user *buf, | |||
| 320 | size_t count, loff_t *ppos) | 320 | size_t count, loff_t *ppos) |
| 321 | { | 321 | { |
| 322 | struct reader_dev *dev = filp->private_data; | 322 | struct reader_dev *dev = filp->private_data; |
| 323 | int iobase = dev->p_dev->io.BasePort1; | 323 | int iobase = dev->p_dev->resource[0]->start; |
| 324 | ssize_t rc; | 324 | ssize_t rc; |
| 325 | int i; | 325 | int i; |
| 326 | unsigned int bytes_to_write; | 326 | unsigned int bytes_to_write; |
| @@ -567,8 +567,8 @@ static int reader_config(struct pcmcia_device *link, int devno) | |||
| 567 | 567 | ||
| 568 | dev = link->priv; | 568 | dev = link->priv; |
| 569 | 569 | ||
| 570 | DEBUGP(2, dev, "device " DEVICE_NAME "%d at 0x%.4x-0x%.4x\n", devno, | 570 | DEBUGP(2, dev, "device " DEVICE_NAME "%d at %pR\n", devno, |
| 571 | link->io.BasePort1, link->io.BasePort1+link->io.NumPorts1); | 571 | link->resource[0]); |
| 572 | DEBUGP(2, dev, "<- reader_config (succ)\n"); | 572 | DEBUGP(2, dev, "<- reader_config (succ)\n"); |
| 573 | 573 | ||
| 574 | return 0; | 574 | return 0; |
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c index 63c32e3f23ba..9467994d556f 100644 --- a/drivers/char/pcmcia/ipwireless/main.c +++ b/drivers/char/pcmcia/ipwireless/main.c | |||
| @@ -100,7 +100,8 @@ static int ipwireless_probe(struct pcmcia_device *p_dev, | |||
| 100 | if (ret) | 100 | if (ret) |
| 101 | return ret; | 101 | return ret; |
| 102 | 102 | ||
| 103 | io_resource = request_region(p_dev->io.BasePort1, p_dev->io.NumPorts1, | 103 | io_resource = request_region(p_dev->resource[0]->start, |
| 104 | resource_size(p_dev->resource[0]), | ||
| 104 | IPWIRELESS_PCCARD_NAME); | 105 | IPWIRELESS_PCCARD_NAME); |
| 105 | 106 | ||
| 106 | if (cfg->mem.nwin == 0) | 107 | if (cfg->mem.nwin == 0) |
| @@ -197,7 +198,7 @@ static int config_ipwireless(struct ipw_dev *ipw) | |||
| 197 | 198 | ||
| 198 | INIT_WORK(&ipw->work_reboot, signalled_reboot_work); | 199 | INIT_WORK(&ipw->work_reboot, signalled_reboot_work); |
| 199 | 200 | ||
| 200 | ipwireless_init_hardware_v1(ipw->hardware, link->io.BasePort1, | 201 | ipwireless_init_hardware_v1(ipw->hardware, link->resource[0]->start, |
| 201 | ipw->attr_memory, ipw->common_memory, | 202 | ipw->attr_memory, ipw->common_memory, |
| 202 | ipw->is_v2_card, signalled_reboot_callback, | 203 | ipw->is_v2_card, signalled_reboot_callback, |
| 203 | ipw); | 204 | ipw); |
| @@ -209,10 +210,7 @@ static int config_ipwireless(struct ipw_dev *ipw) | |||
| 209 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME ": Card type %s\n", | 210 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME ": Card type %s\n", |
| 210 | ipw->is_v2_card ? "V2/V3" : "V1"); | 211 | ipw->is_v2_card ? "V2/V3" : "V1"); |
| 211 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME | 212 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME |
| 212 | ": I/O ports 0x%04x-0x%04x, irq %d\n", | 213 | ": I/O ports %pR, irq %d\n", link->resource[0], |
| 213 | (unsigned int) link->io.BasePort1, | ||
| 214 | (unsigned int) (link->io.BasePort1 + | ||
| 215 | link->io.NumPorts1 - 1), | ||
| 216 | (unsigned int) link->irq); | 214 | (unsigned int) link->irq); |
| 217 | if (ipw->attr_memory && ipw->common_memory) | 215 | if (ipw->attr_memory && ipw->common_memory) |
| 218 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME | 216 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME |
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 522992ed6e49..8ded9b02b9b9 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
| @@ -609,16 +609,15 @@ static int mgslpc_config(struct pcmcia_device *link) | |||
| 609 | if (ret) | 609 | if (ret) |
| 610 | goto failed; | 610 | goto failed; |
| 611 | 611 | ||
| 612 | info->io_base = link->io.BasePort1; | 612 | info->io_base = link->resource[0]->start; |
| 613 | info->irq_level = link->irq; | 613 | info->irq_level = link->irq; |
| 614 | 614 | ||
| 615 | dev_info(&link->dev, "index 0x%02x:", | 615 | dev_info(&link->dev, "index 0x%02x:", |
| 616 | link->conf.ConfigIndex); | 616 | link->conf.ConfigIndex); |
| 617 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 617 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 618 | printk(", irq %d", link->irq); | 618 | printk(", irq %d", link->irq); |
| 619 | if (link->io.NumPorts1) | 619 | if (link->resource[0]) |
| 620 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 620 | printk(", io %pR", link->resource[0]); |
| 621 | link->io.BasePort1+link->io.NumPorts1-1); | ||
| 622 | printk("\n"); | 621 | printk("\n"); |
| 623 | return 0; | 622 | return 0; |
| 624 | 623 | ||
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index 27dbab84142c..6be0e5f108b5 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c | |||
| @@ -239,13 +239,13 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, | |||
| 239 | pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1; | 239 | pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1; |
| 240 | if (pcmcia_request_io(pdev, &pdev->io) != 0) | 240 | if (pcmcia_request_io(pdev, &pdev->io) != 0) |
| 241 | return -ENODEV; | 241 | return -ENODEV; |
| 242 | stk->ctl_base = pdev->io.BasePort2; | 242 | stk->ctl_base = pdev->resource[1]->start; |
| 243 | } else if ((io->nwin == 1) && (io->win[0].len >= 16)) { | 243 | } else if ((io->nwin == 1) && (io->win[0].len >= 16)) { |
| 244 | pdev->io.NumPorts1 = io->win[0].len; | 244 | pdev->io.NumPorts1 = io->win[0].len; |
| 245 | pdev->io.NumPorts2 = 0; | 245 | pdev->io.NumPorts2 = 0; |
| 246 | if (pcmcia_request_io(pdev, &pdev->io) != 0) | 246 | if (pcmcia_request_io(pdev, &pdev->io) != 0) |
| 247 | return -ENODEV; | 247 | return -ENODEV; |
| 248 | stk->ctl_base = pdev->io.BasePort1 + 0x0e; | 248 | stk->ctl_base = pdev->resource[0]->start + 0x0e; |
| 249 | } else | 249 | } else |
| 250 | return -ENODEV; | 250 | return -ENODEV; |
| 251 | /* If we've got this far, we're done */ | 251 | /* If we've got this far, we're done */ |
| @@ -279,7 +279,7 @@ static int ide_config(struct pcmcia_device *link) | |||
| 279 | if (pcmcia_loop_config(link, pcmcia_check_one_config, stk)) | 279 | if (pcmcia_loop_config(link, pcmcia_check_one_config, stk)) |
| 280 | goto failed; /* No suitable config found */ | 280 | goto failed; /* No suitable config found */ |
| 281 | } | 281 | } |
| 282 | io_base = link->io.BasePort1; | 282 | io_base = link->resource[0]->start; |
| 283 | ctl_base = stk->ctl_base; | 283 | ctl_base = stk->ctl_base; |
| 284 | 284 | ||
| 285 | if (!link->irq) | 285 | if (!link->irq) |
| @@ -296,7 +296,7 @@ static int ide_config(struct pcmcia_device *link) | |||
| 296 | outb(0x81, ctl_base+1); | 296 | outb(0x81, ctl_base+1); |
| 297 | 297 | ||
| 298 | host = idecs_register(io_base, ctl_base, link->irq, link); | 298 | host = idecs_register(io_base, ctl_base, link->irq, link); |
| 299 | if (host == NULL && link->io.NumPorts1 == 0x20) { | 299 | if (host == NULL && resource_size(link->resource[0]) == 0x20) { |
| 300 | outb(0x02, ctl_base + 0x10); | 300 | outb(0x02, ctl_base + 0x10); |
| 301 | host = idecs_register(io_base + 0x10, ctl_base + 0x10, | 301 | host = idecs_register(io_base + 0x10, ctl_base + 0x10, |
| 302 | link->irq, link); | 302 | link->irq, link); |
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c index e804a01ecdfb..7c8c51f22003 100644 --- a/drivers/isdn/hardware/avm/avm_cs.c +++ b/drivers/isdn/hardware/avm/avm_cs.c | |||
| @@ -191,9 +191,10 @@ static int avmcs_config(struct pcmcia_device *link) | |||
| 191 | default: | 191 | default: |
| 192 | case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break; | 192 | case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break; |
| 193 | } | 193 | } |
| 194 | if ((i = (*addcard)(link->io.BasePort1, link->irq)) < 0) { | 194 | if ((i = (*addcard)(link->resource[0]->start, link->irq)) < 0) { |
| 195 | dev_err(&link->dev, "avm_cs: failed to add AVM-Controller at i/o %#x, irq %d\n", | 195 | dev_err(&link->dev, |
| 196 | link->io.BasePort1, link->irq); | 196 | "avm_cs: failed to add AVM-Controller at i/o %#x, irq %d\n", |
| 197 | (unsigned int) link->resource[0]->start, link->irq); | ||
| 197 | avmcs_release(link); | 198 | avmcs_release(link); |
| 198 | return -ENODEV; | 199 | return -ENODEV; |
| 199 | } | 200 | } |
| @@ -211,7 +212,7 @@ static int avmcs_config(struct pcmcia_device *link) | |||
| 211 | 212 | ||
| 212 | static void avmcs_release(struct pcmcia_device *link) | 213 | static void avmcs_release(struct pcmcia_device *link) |
| 213 | { | 214 | { |
| 214 | b1pcmcia_delcard(link->io.BasePort1, link->irq); | 215 | b1pcmcia_delcard(link->resource[0]->start, link->irq); |
| 215 | pcmcia_disable_device(link); | 216 | pcmcia_disable_device(link); |
| 216 | } /* avmcs_release */ | 217 | } /* avmcs_release */ |
| 217 | 218 | ||
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c index 49e141e49aaf..88899638f835 100644 --- a/drivers/isdn/hisax/avma1_cs.c +++ b/drivers/isdn/hisax/avma1_cs.c | |||
| @@ -180,16 +180,18 @@ static int __devinit avma1cs_config(struct pcmcia_device *link) | |||
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n", | 182 | printk(KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n", |
| 183 | link->io.BasePort1, link->irq); | 183 | (unsigned int) link->resource[0]->start, link->irq); |
| 184 | 184 | ||
| 185 | icard.para[0] = link->irq; | 185 | icard.para[0] = link->irq; |
| 186 | icard.para[1] = link->io.BasePort1; | 186 | icard.para[1] = link->resource[0]->start; |
| 187 | icard.protocol = isdnprot; | 187 | icard.protocol = isdnprot; |
| 188 | icard.typ = ISDN_CTYPE_A1_PCMCIA; | 188 | icard.typ = ISDN_CTYPE_A1_PCMCIA; |
| 189 | 189 | ||
| 190 | i = hisax_init_pcmcia(link, &busy, &icard); | 190 | i = hisax_init_pcmcia(link, &busy, &icard); |
| 191 | if (i < 0) { | 191 | if (i < 0) { |
| 192 | printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 PCMCIA %d at i/o %#x\n", i, link->io.BasePort1); | 192 | printk(KERN_ERR "avma1_cs: failed to initialize AVM A1 " |
| 193 | "PCMCIA %d at i/o %#x\n", i, | ||
| 194 | (unsigned int) link->resource[0]->start); | ||
| 193 | avma1cs_release(link); | 195 | avma1cs_release(link); |
| 194 | return -ENODEV; | 196 | return -ENODEV; |
| 195 | } | 197 | } |
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c index 425deea1dd69..c10bfd3f4588 100644 --- a/drivers/isdn/hisax/elsa_cs.c +++ b/drivers/isdn/hisax/elsa_cs.c | |||
| @@ -214,23 +214,21 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link) | |||
| 214 | link->conf.ConfigIndex); | 214 | link->conf.ConfigIndex); |
| 215 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 215 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 216 | printk(", irq %d", link->irq); | 216 | printk(", irq %d", link->irq); |
| 217 | if (link->io.NumPorts1) | 217 | if (link->resource[0]) |
| 218 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 218 | printk(" & %pR", link->resource[0]); |
| 219 | link->io.BasePort1+link->io.NumPorts1-1); | 219 | if (link->resource[1]) |
| 220 | if (link->io.NumPorts2) | 220 | printk(" & %pR", link->resource[1]); |
| 221 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 222 | link->io.BasePort2+link->io.NumPorts2-1); | ||
| 223 | printk("\n"); | 221 | printk("\n"); |
| 224 | 222 | ||
| 225 | icard.para[0] = link->irq; | 223 | icard.para[0] = link->irq; |
| 226 | icard.para[1] = link->io.BasePort1; | 224 | icard.para[1] = link->resource[0]->start; |
| 227 | icard.protocol = protocol; | 225 | icard.protocol = protocol; |
| 228 | icard.typ = ISDN_CTYPE_ELSA_PCMCIA; | 226 | icard.typ = ISDN_CTYPE_ELSA_PCMCIA; |
| 229 | 227 | ||
| 230 | i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard); | 228 | i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard); |
| 231 | if (i < 0) { | 229 | if (i < 0) { |
| 232 | printk(KERN_ERR "elsa_cs: failed to initialize Elsa PCMCIA %d at i/o %#x\n", | 230 | printk(KERN_ERR "elsa_cs: failed to initialize Elsa " |
| 233 | i, link->io.BasePort1); | 231 | "PCMCIA %d with %pR\n", i, link->resource[0]); |
| 234 | elsa_cs_release(link); | 232 | elsa_cs_release(link); |
| 235 | } else | 233 | } else |
| 236 | ((local_info_t*)link->priv)->cardnr = i; | 234 | ((local_info_t*)link->priv)->cardnr = i; |
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c index 5dbad966a29e..cecb35ab9d3d 100644 --- a/drivers/isdn/hisax/sedlbauer_cs.c +++ b/drivers/isdn/hisax/sedlbauer_cs.c | |||
| @@ -296,27 +296,25 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link) | |||
| 296 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); | 296 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); |
| 297 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 297 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 298 | printk(", irq %d", link->irq); | 298 | printk(", irq %d", link->irq); |
| 299 | if (link->io.NumPorts1) | 299 | if (link->resource[0]) |
| 300 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 300 | printk(" & %pR", link->resource[0]); |
| 301 | link->io.BasePort1+link->io.NumPorts1-1); | 301 | if (link->resource[1]) |
| 302 | if (link->io.NumPorts2) | 302 | printk(" & %pR", link->resource[1]); |
| 303 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 304 | link->io.BasePort2+link->io.NumPorts2-1); | ||
| 305 | if (link->win) | 303 | if (link->win) |
| 306 | printk(", mem 0x%06lx-0x%06lx", req->Base, | 304 | printk(", mem 0x%06lx-0x%06lx", req->Base, |
| 307 | req->Base+req->Size-1); | 305 | req->Base+req->Size-1); |
| 308 | printk("\n"); | 306 | printk("\n"); |
| 309 | 307 | ||
| 310 | icard.para[0] = link->irq; | 308 | icard.para[0] = link->irq; |
| 311 | icard.para[1] = link->io.BasePort1; | 309 | icard.para[1] = link->resource[0]->start; |
| 312 | icard.protocol = protocol; | 310 | icard.protocol = protocol; |
| 313 | icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA; | 311 | icard.typ = ISDN_CTYPE_SEDLBAUER_PCMCIA; |
| 314 | 312 | ||
| 315 | ret = hisax_init_pcmcia(link, | 313 | ret = hisax_init_pcmcia(link, |
| 316 | &(((local_info_t *)link->priv)->stop), &icard); | 314 | &(((local_info_t *)link->priv)->stop), &icard); |
| 317 | if (ret < 0) { | 315 | if (ret < 0) { |
| 318 | printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d at i/o %#x\n", | 316 | printk(KERN_ERR "sedlbauer_cs: failed to initialize SEDLBAUER PCMCIA %d with %pR\n", |
| 319 | ret, link->io.BasePort1); | 317 | ret, link->resource[0]); |
| 320 | sedlbauer_release(link); | 318 | sedlbauer_release(link); |
| 321 | return -ENODEV; | 319 | return -ENODEV; |
| 322 | } else | 320 | } else |
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index d3fb1b716800..3787fc70cf8f 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
| @@ -194,23 +194,21 @@ static int __devinit teles_cs_config(struct pcmcia_device *link) | |||
| 194 | link->conf.ConfigIndex); | 194 | link->conf.ConfigIndex); |
| 195 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 195 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 196 | printk(", irq %d", link->irq); | 196 | printk(", irq %d", link->irq); |
| 197 | if (link->io.NumPorts1) | 197 | if (link->resource[0]) |
| 198 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 198 | printk(" & %pR", link->resource[0]); |
| 199 | link->io.BasePort1+link->io.NumPorts1-1); | 199 | if (link->resource[1]) |
| 200 | if (link->io.NumPorts2) | 200 | printk(" & %pR", link->resource[1]); |
| 201 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 202 | link->io.BasePort2+link->io.NumPorts2-1); | ||
| 203 | printk("\n"); | 201 | printk("\n"); |
| 204 | 202 | ||
| 205 | icard.para[0] = link->irq; | 203 | icard.para[0] = link->irq; |
| 206 | icard.para[1] = link->io.BasePort1; | 204 | icard.para[1] = link->resource[0]->start; |
| 207 | icard.protocol = protocol; | 205 | icard.protocol = protocol; |
| 208 | icard.typ = ISDN_CTYPE_TELESPCMCIA; | 206 | icard.typ = ISDN_CTYPE_TELESPCMCIA; |
| 209 | 207 | ||
| 210 | i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard); | 208 | i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard); |
| 211 | if (i < 0) { | 209 | if (i < 0) { |
| 212 | printk(KERN_ERR "teles_cs: failed to initialize Teles PCMCIA %d at i/o %#x\n", | 210 | printk(KERN_ERR "teles_cs: failed to initialize Teles PCMCIA %d at i/o %#x\n", |
| 213 | i, link->io.BasePort1); | 211 | i, (unsigned int) link->resource[0]->start); |
| 214 | teles_cs_release(link); | 212 | teles_cs_release(link); |
| 215 | return -ENODEV; | 213 | return -ENODEV; |
| 216 | } | 214 | } |
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index e249b898075c..b5ea9b8cfd76 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
| @@ -356,7 +356,7 @@ static int tc574_config(struct pcmcia_device *link) | |||
| 356 | goto failed; | 356 | goto failed; |
| 357 | 357 | ||
| 358 | dev->irq = link->irq; | 358 | dev->irq = link->irq; |
| 359 | dev->base_addr = link->io.BasePort1; | 359 | dev->base_addr = link->resource[0]->start; |
| 360 | 360 | ||
| 361 | ioaddr = dev->base_addr; | 361 | ioaddr = dev->base_addr; |
| 362 | 362 | ||
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index b0772df31057..122ef4a9488c 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
| @@ -298,7 +298,7 @@ static int tc589_config(struct pcmcia_device *link) | |||
| 298 | goto failed; | 298 | goto failed; |
| 299 | 299 | ||
| 300 | dev->irq = link->irq; | 300 | dev->irq = link->irq; |
| 301 | dev->base_addr = link->io.BasePort1; | 301 | dev->base_addr = link->resource[0]->start; |
| 302 | ioaddr = dev->base_addr; | 302 | ioaddr = dev->base_addr; |
| 303 | EL3WINDOW(0); | 303 | EL3WINDOW(0); |
| 304 | 304 | ||
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index ee0a6d036f94..c52fdf31cbfe 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
| @@ -332,7 +332,7 @@ static int axnet_config(struct pcmcia_device *link) | |||
| 332 | if (!link->irq) | 332 | if (!link->irq) |
| 333 | goto failed; | 333 | goto failed; |
| 334 | 334 | ||
| 335 | if (link->io.NumPorts2 == 8) { | 335 | if (resource_size(link->resource[1]) == 8) { |
| 336 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 336 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
| 337 | link->conf.Status = CCSR_AUDIO_ENA; | 337 | link->conf.Status = CCSR_AUDIO_ENA; |
| 338 | } | 338 | } |
| @@ -342,7 +342,7 @@ static int axnet_config(struct pcmcia_device *link) | |||
| 342 | goto failed; | 342 | goto failed; |
| 343 | 343 | ||
| 344 | dev->irq = link->irq; | 344 | dev->irq = link->irq; |
| 345 | dev->base_addr = link->io.BasePort1; | 345 | dev->base_addr = link->resource[0]->start; |
| 346 | 346 | ||
| 347 | if (!get_prom(link)) { | 347 | if (!get_prom(link)) { |
| 348 | printk(KERN_NOTICE "axnet_cs: this is not an AX88190 card!\n"); | 348 | printk(KERN_NOTICE "axnet_cs: this is not an AX88190 card!\n"); |
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index 99957af40329..3b53818e3eef 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c | |||
| @@ -266,7 +266,7 @@ static int com20020_config(struct pcmcia_device *link) | |||
| 266 | goto failed; | 266 | goto failed; |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | ioaddr = dev->base_addr = link->io.BasePort1; | 269 | ioaddr = dev->base_addr = link->resource[0]->start; |
| 270 | dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr); | 270 | dev_dbg(&link->dev, "got ioaddr %Xh\n", ioaddr); |
| 271 | 271 | ||
| 272 | dev_dbg(&link->dev, "request IRQ %d\n", | 272 | dev_dbg(&link->dev, "request IRQ %d\n", |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index 95a991beaa30..bba6369a028e 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
| @@ -315,7 +315,7 @@ static int ungermann_try_io_port(struct pcmcia_device *link) | |||
| 315 | if (ret == 0) { | 315 | if (ret == 0) { |
| 316 | /* calculate ConfigIndex value */ | 316 | /* calculate ConfigIndex value */ |
| 317 | link->conf.ConfigIndex = | 317 | link->conf.ConfigIndex = |
| 318 | ((link->io.BasePort1 & 0x0f0) >> 3) | 0x22; | 318 | ((link->resource[0]->start & 0x0f0) >> 3) | 0x22; |
| 319 | return ret; | 319 | return ret; |
| 320 | } | 320 | } |
| 321 | } | 321 | } |
| @@ -436,9 +436,9 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
| 436 | goto failed; | 436 | goto failed; |
| 437 | 437 | ||
| 438 | dev->irq = link->irq; | 438 | dev->irq = link->irq; |
| 439 | dev->base_addr = link->io.BasePort1; | 439 | dev->base_addr = link->resource[0]->start; |
| 440 | 440 | ||
| 441 | if (link->io.BasePort2 != 0) { | 441 | if (resource_size(link->resource[1]) != 0) { |
| 442 | ret = fmvj18x_setup_mfc(link); | 442 | ret = fmvj18x_setup_mfc(link); |
| 443 | if (ret != 0) goto failed; | 443 | if (ret != 0) goto failed; |
| 444 | } | 444 | } |
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c index c36dcd14ec45..e99abaa92be5 100644 --- a/drivers/net/pcmcia/ibmtr_cs.c +++ b/drivers/net/pcmcia/ibmtr_cs.c | |||
| @@ -231,7 +231,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link) | |||
| 231 | if (ret) | 231 | if (ret) |
| 232 | goto failed; | 232 | goto failed; |
| 233 | } | 233 | } |
| 234 | dev->base_addr = link->io.BasePort1; | 234 | dev->base_addr = link->resource[0]->start; |
| 235 | 235 | ||
| 236 | ret = pcmcia_request_exclusive_irq(link, ibmtr_interrupt); | 236 | ret = pcmcia_request_exclusive_irq(link, ibmtr_interrupt); |
| 237 | if (ret) | 237 | if (ret) |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index c0d85af3e942..9980cbb81d34 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
| @@ -655,7 +655,7 @@ static int nmclan_config(struct pcmcia_device *link) | |||
| 655 | goto failed; | 655 | goto failed; |
| 656 | 656 | ||
| 657 | dev->irq = link->irq; | 657 | dev->irq = link->irq; |
| 658 | dev->base_addr = link->io.BasePort1; | 658 | dev->base_addr = link->resource[0]->start; |
| 659 | 659 | ||
| 660 | ioaddr = dev->base_addr; | 660 | ioaddr = dev->base_addr; |
| 661 | 661 | ||
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index db6dbdabb702..c9cd2377ef91 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
| @@ -554,7 +554,7 @@ static int pcnet_config(struct pcmcia_device *link) | |||
| 554 | if (!link->irq) | 554 | if (!link->irq) |
| 555 | goto failed; | 555 | goto failed; |
| 556 | 556 | ||
| 557 | if (link->io.NumPorts2 == 8) { | 557 | if (resource_size(link->resource[1]) == 8) { |
| 558 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 558 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
| 559 | link->conf.Status = CCSR_AUDIO_ENA; | 559 | link->conf.Status = CCSR_AUDIO_ENA; |
| 560 | } | 560 | } |
| @@ -566,7 +566,7 @@ static int pcnet_config(struct pcmcia_device *link) | |||
| 566 | if (ret) | 566 | if (ret) |
| 567 | goto failed; | 567 | goto failed; |
| 568 | dev->irq = link->irq; | 568 | dev->irq = link->irq; |
| 569 | dev->base_addr = link->io.BasePort1; | 569 | dev->base_addr = link->resource[0]->start; |
| 570 | if (info->flags & HAS_MISC_REG) { | 570 | if (info->flags & HAS_MISC_REG) { |
| 571 | if ((if_port == 1) || (if_port == 2)) | 571 | if ((if_port == 1) || (if_port == 2)) |
| 572 | dev->if_port = if_port; | 572 | dev->if_port = if_port; |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 88f503a80a8e..1b0b3230dd71 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
| @@ -457,7 +457,7 @@ static int mhz_mfc_config(struct pcmcia_device *link) | |||
| 457 | if (pcmcia_loop_config(link, mhz_mfc_config_check, NULL)) | 457 | if (pcmcia_loop_config(link, mhz_mfc_config_check, NULL)) |
| 458 | return -ENODEV; | 458 | return -ENODEV; |
| 459 | 459 | ||
| 460 | dev->base_addr = link->io.BasePort1; | 460 | dev->base_addr = link->resource[0]->start; |
| 461 | 461 | ||
| 462 | /* Allocate a memory window, for accessing the ISR */ | 462 | /* Allocate a memory window, for accessing the ISR */ |
| 463 | req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE; | 463 | req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE; |
| @@ -545,7 +545,7 @@ static void mot_config(struct pcmcia_device *link) | |||
| 545 | struct net_device *dev = link->priv; | 545 | struct net_device *dev = link->priv; |
| 546 | struct smc_private *smc = netdev_priv(dev); | 546 | struct smc_private *smc = netdev_priv(dev); |
| 547 | unsigned int ioaddr = dev->base_addr; | 547 | unsigned int ioaddr = dev->base_addr; |
| 548 | unsigned int iouart = link->io.BasePort2; | 548 | unsigned int iouart = link->resource[1]->start; |
| 549 | 549 | ||
| 550 | /* Set UART base address and force map with COR bit 1 */ | 550 | /* Set UART base address and force map with COR bit 1 */ |
| 551 | writeb(iouart & 0xff, smc->base + MOT_UART + CISREG_IOBASE_0); | 551 | writeb(iouart & 0xff, smc->base + MOT_UART + CISREG_IOBASE_0); |
| @@ -614,7 +614,7 @@ static int smc_config(struct pcmcia_device *link) | |||
| 614 | link->io.NumPorts1 = 16; | 614 | link->io.NumPorts1 = 16; |
| 615 | i = pcmcia_loop_config(link, smc_configcheck, NULL); | 615 | i = pcmcia_loop_config(link, smc_configcheck, NULL); |
| 616 | if (!i) | 616 | if (!i) |
| 617 | dev->base_addr = link->io.BasePort1; | 617 | dev->base_addr = link->resource[0]->start; |
| 618 | 618 | ||
| 619 | return i; | 619 | return i; |
| 620 | } | 620 | } |
| @@ -666,7 +666,7 @@ static int osi_config(struct pcmcia_device *link) | |||
| 666 | link->io.NumPorts2 = 0; | 666 | link->io.NumPorts2 = 0; |
| 667 | i = pcmcia_request_io(link, &link->io); | 667 | i = pcmcia_request_io(link, &link->io); |
| 668 | } | 668 | } |
| 669 | dev->base_addr = link->io.BasePort1 + 0x10; | 669 | dev->base_addr = link->resource[0]->start + 0x10; |
| 670 | return i; | 670 | return i; |
| 671 | } | 671 | } |
| 672 | 672 | ||
| @@ -683,7 +683,7 @@ static int osi_load_firmware(struct pcmcia_device *link) | |||
| 683 | 683 | ||
| 684 | /* Download the Seven of Diamonds firmware */ | 684 | /* Download the Seven of Diamonds firmware */ |
| 685 | for (i = 0; i < fw->size; i++) { | 685 | for (i = 0; i < fw->size; i++) { |
| 686 | outb(fw->data[i], link->io.BasePort1 + 2); | 686 | outb(fw->data[i], link->resource[0]->start + 2); |
| 687 | udelay(50); | 687 | udelay(50); |
| 688 | } | 688 | } |
| 689 | release_firmware(fw); | 689 | release_firmware(fw); |
| @@ -725,12 +725,12 @@ static int osi_setup(struct pcmcia_device *link, u_short manfid, u_short cardid) | |||
| 725 | return rc; | 725 | return rc; |
| 726 | } else if (manfid == MANFID_OSITECH) { | 726 | } else if (manfid == MANFID_OSITECH) { |
| 727 | /* Make sure both functions are powered up */ | 727 | /* Make sure both functions are powered up */ |
| 728 | set_bits(0x300, link->io.BasePort1 + OSITECH_AUI_PWR); | 728 | set_bits(0x300, link->resource[0]->start + OSITECH_AUI_PWR); |
| 729 | /* Now, turn on the interrupt for both card functions */ | 729 | /* Now, turn on the interrupt for both card functions */ |
| 730 | set_bits(0x300, link->io.BasePort1 + OSITECH_RESET_ISR); | 730 | set_bits(0x300, link->resource[0]->start + OSITECH_RESET_ISR); |
| 731 | dev_dbg(&link->dev, "AUI/PWR: %4.4x RESET/ISR: %4.4x\n", | 731 | dev_dbg(&link->dev, "AUI/PWR: %4.4x RESET/ISR: %4.4x\n", |
| 732 | inw(link->io.BasePort1 + OSITECH_AUI_PWR), | 732 | inw(link->resource[0]->start + OSITECH_AUI_PWR), |
| 733 | inw(link->io.BasePort1 + OSITECH_RESET_ISR)); | 733 | inw(link->resource[0]->start + OSITECH_RESET_ISR)); |
| 734 | } | 734 | } |
| 735 | return 0; | 735 | return 0; |
| 736 | } | 736 | } |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index e3a85ce89880..034920b459d1 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
| @@ -877,13 +877,13 @@ xirc2ps_config(struct pcmcia_device * link) | |||
| 877 | * the base address of the ethernet port (BasePort1) is written | 877 | * the base address of the ethernet port (BasePort1) is written |
| 878 | * to the BAR registers of the modem. | 878 | * to the BAR registers of the modem. |
| 879 | */ | 879 | */ |
| 880 | err = pcmcia_write_config_byte(link, CISREG_IOBASE_0, | 880 | err = pcmcia_write_config_byte(link, CISREG_IOBASE_0, (u8) |
| 881 | link->io.BasePort2 & 0xff); | 881 | link->resource[1]->start & 0xff); |
| 882 | if (err) | 882 | if (err) |
| 883 | goto config_error; | 883 | goto config_error; |
| 884 | 884 | ||
| 885 | err = pcmcia_write_config_byte(link, CISREG_IOBASE_1, | 885 | err = pcmcia_write_config_byte(link, CISREG_IOBASE_1, |
| 886 | (link->io.BasePort2 >> 8) & 0xff); | 886 | (link->resource[1]->start >> 8) & 0xff); |
| 887 | if (err) | 887 | if (err) |
| 888 | goto config_error; | 888 | goto config_error; |
| 889 | 889 | ||
| @@ -907,7 +907,7 @@ xirc2ps_config(struct pcmcia_device * link) | |||
| 907 | * part. | 907 | * part. |
| 908 | */ | 908 | */ |
| 909 | writeb(0x47, local->dingo_ccr + CISREG_COR); | 909 | writeb(0x47, local->dingo_ccr + CISREG_COR); |
| 910 | ioaddr = link->io.BasePort1; | 910 | ioaddr = link->resource[0]->start; |
| 911 | writeb(ioaddr & 0xff , local->dingo_ccr + CISREG_IOBASE_0); | 911 | writeb(ioaddr & 0xff , local->dingo_ccr + CISREG_IOBASE_0); |
| 912 | writeb((ioaddr >> 8)&0xff , local->dingo_ccr + CISREG_IOBASE_1); | 912 | writeb((ioaddr >> 8)&0xff , local->dingo_ccr + CISREG_IOBASE_1); |
| 913 | 913 | ||
| @@ -954,7 +954,7 @@ xirc2ps_config(struct pcmcia_device * link) | |||
| 954 | 954 | ||
| 955 | /* we can now register the device with the net subsystem */ | 955 | /* we can now register the device with the net subsystem */ |
| 956 | dev->irq = link->irq; | 956 | dev->irq = link->irq; |
| 957 | dev->base_addr = link->io.BasePort1; | 957 | dev->base_addr = link->resource[0]->start; |
| 958 | 958 | ||
| 959 | if (local->dingo) | 959 | if (local->dingo) |
| 960 | do_reset(dev, 1); /* a kludge to make the cem56 work */ | 960 | do_reset(dev, 1); /* a kludge to make the cem56 work */ |
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index 9389ba004fb9..b7e7f5054e44 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
| @@ -271,7 +271,7 @@ static int airo_config(struct pcmcia_device *link) | |||
| 271 | goto failed; | 271 | goto failed; |
| 272 | ((local_info_t *)link->priv)->eth_dev = | 272 | ((local_info_t *)link->priv)->eth_dev = |
| 273 | init_airo_card(link->irq, | 273 | init_airo_card(link->irq, |
| 274 | link->io.BasePort1, 1, &link->dev); | 274 | link->resource[0]->start, 1, &link->dev); |
| 275 | if (!((local_info_t *)link->priv)->eth_dev) | 275 | if (!((local_info_t *)link->priv)->eth_dev) |
| 276 | goto failed; | 276 | goto failed; |
| 277 | 277 | ||
| @@ -281,12 +281,10 @@ static int airo_config(struct pcmcia_device *link) | |||
| 281 | if (link->conf.Vpp) | 281 | if (link->conf.Vpp) |
| 282 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); | 282 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); |
| 283 | printk(", irq %d", link->irq); | 283 | printk(", irq %d", link->irq); |
| 284 | if (link->io.NumPorts1) | 284 | if (link->resource[0]) |
| 285 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 285 | printk(" & %pR", link->resource[0]); |
| 286 | link->io.BasePort1+link->io.NumPorts1-1); | 286 | if (link->resource[1]) |
| 287 | if (link->io.NumPorts2) | 287 | printk(" & %pR", link->resource[1]); |
| 288 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 289 | link->io.BasePort2+link->io.NumPorts2-1); | ||
| 290 | if (link->win) | 288 | if (link->win) |
| 291 | printk(", mem 0x%06lx-0x%06lx", req->Base, | 289 | printk(", mem 0x%06lx-0x%06lx", req->Base, |
| 292 | req->Base+req->Size-1); | 290 | req->Base+req->Size-1); |
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 91ee74a8801e..65b3aed49e58 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
| @@ -253,7 +253,7 @@ static int atmel_config(struct pcmcia_device *link) | |||
| 253 | 253 | ||
| 254 | ((local_info_t*)link->priv)->eth_dev = | 254 | ((local_info_t*)link->priv)->eth_dev = |
| 255 | init_atmel_card(link->irq, | 255 | init_atmel_card(link->irq, |
| 256 | link->io.BasePort1, | 256 | link->resource[0]->start, |
| 257 | did ? did->driver_info : ATMEL_FW_TYPE_NONE, | 257 | did ? did->driver_info : ATMEL_FW_TYPE_NONE, |
| 258 | &link->dev, | 258 | &link->dev, |
| 259 | card_present, | 259 | card_present, |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 691293675a93..4e13cedb8235 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
| @@ -227,7 +227,7 @@ static void sandisk_set_iobase(local_info_t *local) | |||
| 227 | struct hostap_cs_priv *hw_priv = local->hw_priv; | 227 | struct hostap_cs_priv *hw_priv = local->hw_priv; |
| 228 | 228 | ||
| 229 | res = pcmcia_write_config_byte(hw_priv->link, 0x10, | 229 | res = pcmcia_write_config_byte(hw_priv->link, 0x10, |
| 230 | hw_priv->link->io.BasePort1 & 0x00ff); | 230 | hw_priv->link->resource[0]->start & 0x00ff); |
| 231 | if (res != 0) { | 231 | if (res != 0) { |
| 232 | printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -" | 232 | printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -" |
| 233 | " res=%d\n", res); | 233 | " res=%d\n", res); |
| @@ -235,7 +235,7 @@ static void sandisk_set_iobase(local_info_t *local) | |||
| 235 | udelay(10); | 235 | udelay(10); |
| 236 | 236 | ||
| 237 | res = pcmcia_write_config_byte(hw_priv->link, 0x12, | 237 | res = pcmcia_write_config_byte(hw_priv->link, 0x12, |
| 238 | (hw_priv->link->io.BasePort1 >> 8) & 0x00ff); | 238 | (hw_priv->link->resource[0]->start >> 8) & 0x00ff); |
| 239 | if (res != 0) { | 239 | if (res != 0) { |
| 240 | printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -" | 240 | printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -" |
| 241 | " res=%d\n", res); | 241 | " res=%d\n", res); |
| @@ -265,7 +265,7 @@ static int sandisk_enable_wireless(struct net_device *dev) | |||
| 265 | local_info_t *local = iface->local; | 265 | local_info_t *local = iface->local; |
| 266 | struct hostap_cs_priv *hw_priv = local->hw_priv; | 266 | struct hostap_cs_priv *hw_priv = local->hw_priv; |
| 267 | 267 | ||
| 268 | if (hw_priv->link->io.NumPorts1 < 0x42) { | 268 | if (resource_size(hw_priv->link->resource[0]) < 0x42) { |
| 269 | /* Not enough ports to be SanDisk multi-function card */ | 269 | /* Not enough ports to be SanDisk multi-function card */ |
| 270 | ret = -ENODEV; | 270 | ret = -ENODEV; |
| 271 | goto done; | 271 | goto done; |
| @@ -604,7 +604,7 @@ static int prism2_config(struct pcmcia_device *link) | |||
| 604 | goto failed_unlock; | 604 | goto failed_unlock; |
| 605 | 605 | ||
| 606 | dev->irq = link->irq; | 606 | dev->irq = link->irq; |
| 607 | dev->base_addr = link->io.BasePort1; | 607 | dev->base_addr = link->resource[0]->start; |
| 608 | 608 | ||
| 609 | spin_unlock_irqrestore(&local->irq_init_lock, flags); | 609 | spin_unlock_irqrestore(&local->irq_init_lock, flags); |
| 610 | 610 | ||
| @@ -616,12 +616,10 @@ static int prism2_config(struct pcmcia_device *link) | |||
| 616 | link->conf.Vpp % 10); | 616 | link->conf.Vpp % 10); |
| 617 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 617 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 618 | printk(", irq %d", link->irq); | 618 | printk(", irq %d", link->irq); |
| 619 | if (link->io.NumPorts1) | 619 | if (link->resource[0]) |
| 620 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 620 | printk(" & %pR", link->resource[0]); |
| 621 | link->io.BasePort1+link->io.NumPorts1-1); | 621 | if (link->resource[1]) |
| 622 | if (link->io.NumPorts2) | 622 | printk(" & %pR", link->resource[1]); |
| 623 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 624 | link->io.BasePort2+link->io.NumPorts2-1); | ||
| 625 | printk("\n"); | 623 | printk("\n"); |
| 626 | 624 | ||
| 627 | local->shutdown = 0; | 625 | local->shutdown = 0; |
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 1d3a7e0e5f10..be4c47594b59 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
| @@ -853,7 +853,8 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
| 853 | goto out1; | 853 | goto out1; |
| 854 | 854 | ||
| 855 | /* Initialize io access */ | 855 | /* Initialize io access */ |
| 856 | card->iobase = ioport_map(p_dev->io.BasePort1, p_dev->io.NumPorts1); | 856 | card->iobase = ioport_map(p_dev->resource[0]->start, |
| 857 | resource_size(p_dev->resource[0])); | ||
| 857 | if (!card->iobase) { | 858 | if (!card->iobase) { |
| 858 | lbs_pr_err("error in ioport_map\n"); | 859 | lbs_pr_err("error in ioport_map\n"); |
| 859 | ret = -EIO; | 860 | ret = -EIO; |
| @@ -872,9 +873,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev) | |||
| 872 | } | 873 | } |
| 873 | 874 | ||
| 874 | /* Finally, report what we've done */ | 875 | /* Finally, report what we've done */ |
| 875 | lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n", | 876 | lbs_deb_cs("irq %d, io %pR", p_dev->irq, p_dev->resource[0]); |
| 876 | p_dev->irq, p_dev->io.BasePort1, | ||
| 877 | p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1); | ||
| 878 | 877 | ||
| 879 | /* | 878 | /* |
| 880 | * Most of the libertas cards can do unaligned register access, but some | 879 | * Most of the libertas cards can do unaligned register access, but some |
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c index 41ca4f1b395f..6d514b5462fd 100644 --- a/drivers/net/wireless/orinoco/orinoco_cs.c +++ b/drivers/net/wireless/orinoco/orinoco_cs.c | |||
| @@ -257,7 +257,8 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
| 257 | /* We initialize the hermes structure before completing PCMCIA | 257 | /* We initialize the hermes structure before completing PCMCIA |
| 258 | * configuration just in case the interrupt handler gets | 258 | * configuration just in case the interrupt handler gets |
| 259 | * called. */ | 259 | * called. */ |
| 260 | mem = ioport_map(link->io.BasePort1, link->io.NumPorts1); | 260 | mem = ioport_map(link->resource[0]->start, |
| 261 | resource_size(link->resource[0])); | ||
| 261 | if (!mem) | 262 | if (!mem) |
| 262 | goto failed; | 263 | goto failed; |
| 263 | 264 | ||
| @@ -279,7 +280,7 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
| 279 | } | 280 | } |
| 280 | 281 | ||
| 281 | /* Register an interface with the stack */ | 282 | /* Register an interface with the stack */ |
| 282 | if (orinoco_if_add(priv, link->io.BasePort1, | 283 | if (orinoco_if_add(priv, link->resource[0]->start, |
| 283 | link->irq, NULL) != 0) { | 284 | link->irq, NULL) != 0) { |
| 284 | printk(KERN_ERR PFX "orinoco_if_add() failed\n"); | 285 | printk(KERN_ERR PFX "orinoco_if_add() failed\n"); |
| 285 | goto failed; | 286 | goto failed; |
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c index 39399cd2e683..4f8f55eab955 100644 --- a/drivers/net/wireless/orinoco/spectrum_cs.c +++ b/drivers/net/wireless/orinoco/spectrum_cs.c | |||
| @@ -319,7 +319,8 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
| 319 | /* We initialize the hermes structure before completing PCMCIA | 319 | /* We initialize the hermes structure before completing PCMCIA |
| 320 | * configuration just in case the interrupt handler gets | 320 | * configuration just in case the interrupt handler gets |
| 321 | * called. */ | 321 | * called. */ |
| 322 | mem = ioport_map(link->io.BasePort1, link->io.NumPorts1); | 322 | mem = ioport_map(link->resource[0]->start, |
| 323 | resource_size(link->resource[0])); | ||
| 323 | if (!mem) | 324 | if (!mem) |
| 324 | goto failed; | 325 | goto failed; |
| 325 | 326 | ||
| @@ -346,7 +347,7 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
| 346 | } | 347 | } |
| 347 | 348 | ||
| 348 | /* Register an interface with the stack */ | 349 | /* Register an interface with the stack */ |
| 349 | if (orinoco_if_add(priv, link->io.BasePort1, | 350 | if (orinoco_if_add(priv, link->resource[0]->start, |
| 350 | link->irq, NULL) != 0) { | 351 | link->irq, NULL) != 0) { |
| 351 | printk(KERN_ERR PFX "orinoco_if_add() failed\n"); | 352 | printk(KERN_ERR PFX "orinoco_if_add() failed\n"); |
| 352 | goto failed; | 353 | goto failed; |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 35f431bf97d6..a32f220648c0 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
| @@ -1960,7 +1960,7 @@ static int wl3501_config(struct pcmcia_device *link) | |||
| 1960 | goto failed; | 1960 | goto failed; |
| 1961 | 1961 | ||
| 1962 | dev->irq = link->irq; | 1962 | dev->irq = link->irq; |
| 1963 | dev->base_addr = link->io.BasePort1; | 1963 | dev->base_addr = link->resource[0]->start; |
| 1964 | SET_NETDEV_DEV(dev, &link->dev); | 1964 | SET_NETDEV_DEV(dev, &link->dev); |
| 1965 | if (register_netdev(dev)) { | 1965 | if (register_netdev(dev)) { |
| 1966 | printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n"); | 1966 | printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n"); |
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c index ee56fd66d5dc..fc1639c5ada6 100644 --- a/drivers/parport/parport_cs.c +++ b/drivers/parport/parport_cs.c | |||
| @@ -177,12 +177,14 @@ static int parport_config(struct pcmcia_device *link) | |||
| 177 | if (ret) | 177 | if (ret) |
| 178 | goto failed; | 178 | goto failed; |
| 179 | 179 | ||
| 180 | p = parport_pc_probe_port(link->io.BasePort1, link->io.BasePort2, | 180 | p = parport_pc_probe_port(link->resource[0]->start, |
| 181 | link->resource[1]->start, | ||
| 181 | link->irq, PARPORT_DMA_NONE, | 182 | link->irq, PARPORT_DMA_NONE, |
| 182 | &link->dev, IRQF_SHARED); | 183 | &link->dev, IRQF_SHARED); |
| 183 | if (p == NULL) { | 184 | if (p == NULL) { |
| 184 | printk(KERN_NOTICE "parport_cs: parport_pc_probe_port() at " | 185 | printk(KERN_NOTICE "parport_cs: parport_pc_probe_port() at " |
| 185 | "0x%3x, irq %u failed\n", link->io.BasePort1, | 186 | "0x%3x, irq %u failed\n", |
| 187 | (unsigned int) link->resource[0]->start, | ||
| 186 | link->irq); | 188 | link->irq); |
| 187 | goto failed; | 189 | goto failed; |
| 188 | } | 190 | } |
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c index b07b53ef3c00..3e040f503afa 100644 --- a/drivers/scsi/pcmcia/aha152x_stub.c +++ b/drivers/scsi/pcmcia/aha152x_stub.c | |||
| @@ -167,7 +167,7 @@ static int aha152x_config_cs(struct pcmcia_device *link) | |||
| 167 | /* Set configuration options for the aha152x driver */ | 167 | /* Set configuration options for the aha152x driver */ |
| 168 | memset(&s, 0, sizeof(s)); | 168 | memset(&s, 0, sizeof(s)); |
| 169 | s.conf = "PCMCIA setup"; | 169 | s.conf = "PCMCIA setup"; |
| 170 | s.io_port = link->io.BasePort1; | 170 | s.io_port = link->resource[0]->start; |
| 171 | s.irq = link->irq; | 171 | s.irq = link->irq; |
| 172 | s.scsiid = host_id; | 172 | s.scsiid = host_id; |
| 173 | s.reconnect = reconnect; | 173 | s.reconnect = reconnect; |
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c index ee0489762539..49a9a0a60c82 100644 --- a/drivers/scsi/pcmcia/fdomain_stub.c +++ b/drivers/scsi/pcmcia/fdomain_stub.c | |||
| @@ -137,10 +137,10 @@ static int fdomain_config(struct pcmcia_device *link) | |||
| 137 | goto failed; | 137 | goto failed; |
| 138 | 138 | ||
| 139 | /* A bad hack... */ | 139 | /* A bad hack... */ |
| 140 | release_region(link->io.BasePort1, link->io.NumPorts1); | 140 | release_region(link->resource[0]->start, resource_size(link->resource[0])); |
| 141 | 141 | ||
| 142 | /* Set configuration options for the fdomain driver */ | 142 | /* Set configuration options for the fdomain driver */ |
| 143 | sprintf(str, "%d,%d", link->io.BasePort1, link->irq); | 143 | sprintf(str, "%d,%d", (unsigned int) link->resource[0]->start, link->irq); |
| 144 | fdomain_setup(str); | 144 | fdomain_setup(str); |
| 145 | 145 | ||
| 146 | host = __fdomain_16x0_detect(&fdomain_driver_template); | 146 | host = __fdomain_16x0_detect(&fdomain_driver_template); |
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index d4142075be21..d929891809ab 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
| @@ -1719,17 +1719,19 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
| 1719 | goto cs_failed; | 1719 | goto cs_failed; |
| 1720 | 1720 | ||
| 1721 | if (free_ports) { | 1721 | if (free_ports) { |
| 1722 | if (link->io.BasePort1) { | 1722 | if (link->resource[0]) { |
| 1723 | release_region(link->io.BasePort1, link->io.NumPorts1); | 1723 | release_region(link->resource[0]->start, |
| 1724 | resource_size(link->resource[0])); | ||
| 1724 | } | 1725 | } |
| 1725 | if (link->io.BasePort2) { | 1726 | if (link->resource[1]) { |
| 1726 | release_region(link->io.BasePort2, link->io.NumPorts2); | 1727 | release_region(link->resource[1]->start, |
| 1728 | resource_size(link->resource[1])); | ||
| 1727 | } | 1729 | } |
| 1728 | } | 1730 | } |
| 1729 | 1731 | ||
| 1730 | /* Set port and IRQ */ | 1732 | /* Set port and IRQ */ |
| 1731 | data->BaseAddress = link->io.BasePort1; | 1733 | data->BaseAddress = link->resource[0]->start; |
| 1732 | data->NumAddress = link->io.NumPorts1; | 1734 | data->NumAddress = resource_size(link->resource[0]); |
| 1733 | data->IrqNumber = link->irq; | 1735 | data->IrqNumber = link->irq; |
| 1734 | 1736 | ||
| 1735 | nsp_dbg(NSP_DEBUG_INIT, "I/O[0x%x+0x%x] IRQ %d", | 1737 | nsp_dbg(NSP_DEBUG_INIT, "I/O[0x%x+0x%x] IRQ %d", |
| @@ -1764,13 +1766,10 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
| 1764 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | 1766 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { |
| 1765 | printk(", irq %d", link->irq); | 1767 | printk(", irq %d", link->irq); |
| 1766 | } | 1768 | } |
| 1767 | if (link->io.NumPorts1) { | 1769 | if (link->resource[0]) |
| 1768 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 1770 | printk(", io %pR", link->resource[0]); |
| 1769 | link->io.BasePort1+link->io.NumPorts1-1); | 1771 | if (link->resource[1]) |
| 1770 | } | 1772 | printk(" & %pR", link->resource[1]); |
| 1771 | if (link->io.NumPorts2) | ||
| 1772 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 1773 | link->io.BasePort2+link->io.NumPorts2-1); | ||
| 1774 | if (link->win) | 1773 | if (link->win) |
| 1775 | printk(", mem 0x%06lx-0x%06lx", cfg_mem->req.Base, | 1774 | printk(", mem 0x%06lx-0x%06lx", cfg_mem->req.Base, |
| 1776 | cfg_mem->req.Base+cfg_mem->req.Size-1); | 1775 | cfg_mem->req.Base+cfg_mem->req.Size-1); |
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c index c1cf7f43313b..4e2b83f26232 100644 --- a/drivers/scsi/pcmcia/qlogic_stub.c +++ b/drivers/scsi/pcmcia/qlogic_stub.c | |||
| @@ -215,18 +215,18 @@ static int qlogic_config(struct pcmcia_device * link) | |||
| 215 | 215 | ||
| 216 | if ((info->manf_id == MANFID_MACNICA) || (info->manf_id == MANFID_PIONEER) || (info->manf_id == 0x0098)) { | 216 | if ((info->manf_id == MANFID_MACNICA) || (info->manf_id == MANFID_PIONEER) || (info->manf_id == 0x0098)) { |
| 217 | /* set ATAcmd */ | 217 | /* set ATAcmd */ |
| 218 | outb(0xb4, link->io.BasePort1 + 0xd); | 218 | outb(0xb4, link->resource[0]->start + 0xd); |
| 219 | outb(0x24, link->io.BasePort1 + 0x9); | 219 | outb(0x24, link->resource[0]->start + 0x9); |
| 220 | outb(0x04, link->io.BasePort1 + 0xd); | 220 | outb(0x04, link->resource[0]->start + 0xd); |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | /* The KXL-810AN has a bigger IO port window */ | 223 | /* The KXL-810AN has a bigger IO port window */ |
| 224 | if (link->io.NumPorts1 == 32) | 224 | if (resource_size(link->resource[0]) == 32) |
| 225 | host = qlogic_detect(&qlogicfas_driver_template, link, | 225 | host = qlogic_detect(&qlogicfas_driver_template, link, |
| 226 | link->io.BasePort1 + 16, link->irq); | 226 | link->resource[0]->start + 16, link->irq); |
| 227 | else | 227 | else |
| 228 | host = qlogic_detect(&qlogicfas_driver_template, link, | 228 | host = qlogic_detect(&qlogicfas_driver_template, link, |
| 229 | link->io.BasePort1, link->irq); | 229 | link->resource[0]->start, link->irq); |
| 230 | 230 | ||
| 231 | if (!host) { | 231 | if (!host) { |
| 232 | printk(KERN_INFO "%s: no SCSI devices found\n", qlogic_name); | 232 | printk(KERN_INFO "%s: no SCSI devices found\n", qlogic_name); |
| @@ -268,9 +268,9 @@ static int qlogic_resume(struct pcmcia_device *link) | |||
| 268 | if ((info->manf_id == MANFID_MACNICA) || | 268 | if ((info->manf_id == MANFID_MACNICA) || |
| 269 | (info->manf_id == MANFID_PIONEER) || | 269 | (info->manf_id == MANFID_PIONEER) || |
| 270 | (info->manf_id == 0x0098)) { | 270 | (info->manf_id == 0x0098)) { |
| 271 | outb(0x80, link->io.BasePort1 + 0xd); | 271 | outb(0x80, link->resource[0]->start + 0xd); |
| 272 | outb(0x24, link->io.BasePort1 + 0x9); | 272 | outb(0x24, link->resource[0]->start + 0x9); |
| 273 | outb(0x04, link->io.BasePort1 + 0xd); | 273 | outb(0x04, link->resource[0]->start + 0xd); |
| 274 | } | 274 | } |
| 275 | /* Ugggglllyyyy!!! */ | 275 | /* Ugggglllyyyy!!! */ |
| 276 | qlogicfas408_bus_reset(NULL); | 276 | qlogicfas408_bus_reset(NULL); |
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index bd79e45ab856..d99c0cbad2de 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c | |||
| @@ -733,9 +733,9 @@ SYM53C500_config(struct pcmcia_device *link) | |||
| 733 | (info->manf_id == MANFID_PIONEER) || | 733 | (info->manf_id == MANFID_PIONEER) || |
| 734 | (info->manf_id == 0x0098)) { | 734 | (info->manf_id == 0x0098)) { |
| 735 | /* set ATAcmd */ | 735 | /* set ATAcmd */ |
| 736 | outb(0xb4, link->io.BasePort1 + 0xd); | 736 | outb(0xb4, link->resource[0]->start + 0xd); |
| 737 | outb(0x24, link->io.BasePort1 + 0x9); | 737 | outb(0x24, link->resource[0]->start + 0x9); |
| 738 | outb(0x04, link->io.BasePort1 + 0xd); | 738 | outb(0x04, link->resource[0]->start + 0xd); |
| 739 | } | 739 | } |
| 740 | 740 | ||
| 741 | /* | 741 | /* |
| @@ -748,7 +748,7 @@ SYM53C500_config(struct pcmcia_device *link) | |||
| 748 | * 0x130, 0x230, 0x280, 0x290, | 748 | * 0x130, 0x230, 0x280, 0x290, |
| 749 | * 0x320, 0x330, 0x340, 0x350 | 749 | * 0x320, 0x330, 0x340, 0x350 |
| 750 | */ | 750 | */ |
| 751 | port_base = link->io.BasePort1; | 751 | port_base = link->resource[0]->start; |
| 752 | irq_level = link->irq; | 752 | irq_level = link->irq; |
| 753 | 753 | ||
| 754 | DEB(printk("SYM53C500: port_base=0x%x, irq=%d, fast_pio=%d\n", | 754 | DEB(printk("SYM53C500: port_base=0x%x, irq=%d, fast_pio=%d\n", |
| @@ -821,15 +821,15 @@ static int sym53c500_resume(struct pcmcia_device *link) | |||
| 821 | if ((info->manf_id == MANFID_MACNICA) || | 821 | if ((info->manf_id == MANFID_MACNICA) || |
| 822 | (info->manf_id == MANFID_PIONEER) || | 822 | (info->manf_id == MANFID_PIONEER) || |
| 823 | (info->manf_id == 0x0098)) { | 823 | (info->manf_id == 0x0098)) { |
| 824 | outb(0x80, link->io.BasePort1 + 0xd); | 824 | outb(0x80, link->resource[0]->start + 0xd); |
| 825 | outb(0x24, link->io.BasePort1 + 0x9); | 825 | outb(0x24, link->resource[0]->start + 0x9); |
| 826 | outb(0x04, link->io.BasePort1 + 0xd); | 826 | outb(0x04, link->resource[0]->start + 0xd); |
| 827 | } | 827 | } |
| 828 | /* | 828 | /* |
| 829 | * If things don't work after a "resume", | 829 | * If things don't work after a "resume", |
| 830 | * this is a good place to start looking. | 830 | * this is a good place to start looking. |
| 831 | */ | 831 | */ |
| 832 | SYM53C500_int_host_reset(link->io.BasePort1); | 832 | SYM53C500_int_host_reset(link->resource[0]->start); |
| 833 | 833 | ||
| 834 | return 0; | 834 | return 0; |
| 835 | } | 835 | } |
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 2be8b107ed51..fe7adcdfde9e 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
| @@ -463,13 +463,13 @@ static int simple_config(struct pcmcia_device *link) | |||
| 463 | /* If the card is already configured, look up the port and irq */ | 463 | /* If the card is already configured, look up the port and irq */ |
| 464 | if (link->function_config) { | 464 | if (link->function_config) { |
| 465 | unsigned int port = 0; | 465 | unsigned int port = 0; |
| 466 | if ((link->io.BasePort2 != 0) && | 466 | if ((link->resource[1]->end != 0) && |
| 467 | (link->io.NumPorts2 == 8)) { | 467 | (resource_size(link->resource[1]) == 8)) { |
| 468 | port = link->io.BasePort2; | 468 | port = link->resource[1]->end; |
| 469 | info->slave = 1; | 469 | info->slave = 1; |
| 470 | } else if ((info->manfid == MANFID_OSITECH) && | 470 | } else if ((info->manfid == MANFID_OSITECH) && |
| 471 | (link->io.NumPorts1 == 0x40)) { | 471 | (resource_size(link->resource[0]) == 0x40)) { |
| 472 | port = link->io.BasePort1 + 0x28; | 472 | port = link->resource[0]->start + 0x28; |
| 473 | info->slave = 1; | 473 | info->slave = 1; |
| 474 | } | 474 | } |
| 475 | if (info->slave) { | 475 | if (info->slave) { |
| @@ -507,7 +507,7 @@ found_port: | |||
| 507 | i = pcmcia_request_configuration(link, &link->conf); | 507 | i = pcmcia_request_configuration(link, &link->conf); |
| 508 | if (i != 0) | 508 | if (i != 0) |
| 509 | return -1; | 509 | return -1; |
| 510 | return setup_serial(link, info, link->io.BasePort1, link->irq); | 510 | return setup_serial(link, info, link->resource[0]->start, link->irq); |
| 511 | } | 511 | } |
| 512 | 512 | ||
| 513 | static int multi_config_check(struct pcmcia_device *p_dev, | 513 | static int multi_config_check(struct pcmcia_device *p_dev, |
| @@ -524,7 +524,7 @@ static int multi_config_check(struct pcmcia_device *p_dev, | |||
| 524 | p_dev->io.BasePort1 = cf->io.win[0].base; | 524 | p_dev->io.BasePort1 = cf->io.win[0].base; |
| 525 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; | 525 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; |
| 526 | if (!pcmcia_request_io(p_dev, &p_dev->io)) { | 526 | if (!pcmcia_request_io(p_dev, &p_dev->io)) { |
| 527 | *base2 = p_dev->io.BasePort1 + 8; | 527 | *base2 = p_dev->resource[0]->start + 8; |
| 528 | return 0; | 528 | return 0; |
| 529 | } | 529 | } |
| 530 | } | 530 | } |
| @@ -544,7 +544,7 @@ static int multi_config_check_notpicky(struct pcmcia_device *p_dev, | |||
| 544 | p_dev->io.BasePort2 = cf->io.win[1].base; | 544 | p_dev->io.BasePort2 = cf->io.win[1].base; |
| 545 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; | 545 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; |
| 546 | if (!pcmcia_request_io(p_dev, &p_dev->io)) { | 546 | if (!pcmcia_request_io(p_dev, &p_dev->io)) { |
| 547 | *base2 = p_dev->io.BasePort2; | 547 | *base2 = p_dev->resource[1]->start; |
| 548 | return 0; | 548 | return 0; |
| 549 | } | 549 | } |
| 550 | } | 550 | } |
| @@ -596,9 +596,9 @@ static int multi_config(struct pcmcia_device *link) | |||
| 596 | link->conf.ConfigIndex == 3) { | 596 | link->conf.ConfigIndex == 3) { |
| 597 | err = setup_serial(link, info, base2, | 597 | err = setup_serial(link, info, base2, |
| 598 | link->irq); | 598 | link->irq); |
| 599 | base2 = link->io.BasePort1; | 599 | base2 = link->resource[0]->start;; |
| 600 | } else { | 600 | } else { |
| 601 | err = setup_serial(link, info, link->io.BasePort1, | 601 | err = setup_serial(link, info, link->resource[0]->start, |
| 602 | link->irq); | 602 | link->irq); |
| 603 | } | 603 | } |
| 604 | info->c950ctrl = base2; | 604 | info->c950ctrl = base2; |
| @@ -613,7 +613,7 @@ static int multi_config(struct pcmcia_device *link) | |||
| 613 | return 0; | 613 | return 0; |
| 614 | } | 614 | } |
| 615 | 615 | ||
| 616 | setup_serial(link, info, link->io.BasePort1, link->irq); | 616 | setup_serial(link, info, link->resource[0]->start, link->irq); |
| 617 | for (i = 0; i < info->multi - 1; i++) | 617 | for (i = 0; i < info->multi - 1; i++) |
| 618 | setup_serial(link, info, base2 + (8 * i), | 618 | setup_serial(link, info, base2 + (8 * i), |
| 619 | link->irq); | 619 | link->irq); |
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index acef29ca212b..208f1b7a1312 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c | |||
| @@ -170,7 +170,7 @@ static int das16cs_attach(struct comedi_device *dev, | |||
| 170 | if (!link) | 170 | if (!link) |
| 171 | return -EIO; | 171 | return -EIO; |
| 172 | 172 | ||
| 173 | dev->iobase = link->io.BasePort1; | 173 | dev->iobase = link->resource[0]->start;; |
| 174 | printk("I/O base=0x%04lx ", dev->iobase); | 174 | printk("I/O base=0x%04lx ", dev->iobase); |
| 175 | 175 | ||
| 176 | printk("fingerprint:\n"); | 176 | printk("fingerprint:\n"); |
| @@ -787,12 +787,10 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link) | |||
| 787 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 787 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); |
| 788 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 788 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 789 | printk(", irq %u", link->irq); | 789 | printk(", irq %u", link->irq); |
| 790 | if (link->io.NumPorts1) | 790 | if (link->resource[0]) |
| 791 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 791 | printk(", io %pR", link->resource[0]); |
| 792 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 792 | if (link->resource[1]) |
| 793 | if (link->io.NumPorts2) | 793 | printk(", io %pR", link->resource[1]); |
| 794 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 795 | link->io.BasePort2 + link->io.NumPorts2 - 1); | ||
| 796 | printk("\n"); | 794 | printk("\n"); |
| 797 | 795 | ||
| 798 | return; | 796 | return; |
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index 3eddb7c4b1b0..c4cfcffc633e 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c | |||
| @@ -88,7 +88,7 @@ static int das08_cs_attach(struct comedi_device *dev, | |||
| 88 | printk(" no pcmcia cards found\n"); | 88 | printk(" no pcmcia cards found\n"); |
| 89 | return -EIO; | 89 | return -EIO; |
| 90 | } | 90 | } |
| 91 | iobase = link->io.BasePort1; | 91 | iobase = link->resource[0]->start; |
| 92 | } else { | 92 | } else { |
| 93 | printk(" bug! board does not have PCMCIA bustype\n"); | 93 | printk(" bug! board does not have PCMCIA bustype\n"); |
| 94 | return -EINVAL; | 94 | return -EINVAL; |
| @@ -283,12 +283,10 @@ static void das08_pcmcia_config(struct pcmcia_device *link) | |||
| 283 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 283 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); |
| 284 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 284 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 285 | printk(", irq %u", link->irq); | 285 | printk(", irq %u", link->irq); |
| 286 | if (link->io.NumPorts1) | 286 | if (link->resource[0]) |
| 287 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 287 | printk(", io %pR", link->resource[0]); |
| 288 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 288 | if (link->resource[1]) |
| 289 | if (link->io.NumPorts2) | 289 | printk(" & %pR", link->resource[1]); |
| 290 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 291 | link->io.BasePort2 + link->io.NumPorts2 - 1); | ||
| 292 | printk("\n"); | 290 | printk("\n"); |
| 293 | 291 | ||
| 294 | return; | 292 | return; |
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index f3c4d2f929f8..6d569579d677 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c | |||
| @@ -376,7 +376,7 @@ static int dio700_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
| 376 | link = pcmcia_cur_dev; /* XXX hack */ | 376 | link = pcmcia_cur_dev; /* XXX hack */ |
| 377 | if (!link) | 377 | if (!link) |
| 378 | return -EIO; | 378 | return -EIO; |
| 379 | iobase = link->io.BasePort1; | 379 | iobase = link->resource[0]->start; |
| 380 | #ifdef incomplete | 380 | #ifdef incomplete |
| 381 | irq = link->irq; | 381 | irq = link->irq; |
| 382 | #endif | 382 | #endif |
| @@ -644,12 +644,10 @@ static void dio700_config(struct pcmcia_device *link) | |||
| 644 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 644 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); |
| 645 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 645 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 646 | printk(", irq %d", link->irq); | 646 | printk(", irq %d", link->irq); |
| 647 | if (link->io.NumPorts1) | 647 | if (link->resource[0]) |
| 648 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 648 | printk(", io %pR", link->resource[0]); |
| 649 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 649 | if (link->resource[1]) |
| 650 | if (link->io.NumPorts2) | 650 | printk(" & %pR", link->resource[1]); |
| 651 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 652 | link->io.BasePort2 + link->io.NumPorts2 - 1); | ||
| 653 | if (link->win) | 651 | if (link->win) |
| 654 | printk(", mem 0x%06lx-0x%06lx", req.Base, | 652 | printk(", mem 0x%06lx-0x%06lx", req.Base, |
| 655 | req.Base + req.Size - 1); | 653 | req.Base + req.Size - 1); |
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index f0c4367dc10b..29e1daf6a9e6 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c | |||
| @@ -128,7 +128,7 @@ static int dio24_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
| 128 | link = pcmcia_cur_dev; /* XXX hack */ | 128 | link = pcmcia_cur_dev; /* XXX hack */ |
| 129 | if (!link) | 129 | if (!link) |
| 130 | return -EIO; | 130 | return -EIO; |
| 131 | iobase = link->io.BasePort1; | 131 | iobase = link->resource[0]->start; |
| 132 | #ifdef incomplete | 132 | #ifdef incomplete |
| 133 | irq = link->irq; | 133 | irq = link->irq; |
| 134 | #endif | 134 | #endif |
| @@ -396,12 +396,10 @@ static void dio24_config(struct pcmcia_device *link) | |||
| 396 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 396 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); |
| 397 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 397 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 398 | printk(", irq %d", link->irq); | 398 | printk(", irq %d", link->irq); |
| 399 | if (link->io.NumPorts1) | 399 | if (link->resource[0]) |
| 400 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 400 | printk(" & %pR", link->resource[0]); |
| 401 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 401 | if (link->resource[1]) |
| 402 | if (link->io.NumPorts2) | 402 | printk(" & %pR", link->resource[1]); |
| 403 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 404 | link->io.BasePort2 + link->io.NumPorts2 - 1); | ||
| 405 | if (link->win) | 403 | if (link->win) |
| 406 | printk(", mem 0x%06lx-0x%06lx", req.Base, | 404 | printk(", mem 0x%06lx-0x%06lx", req.Base, |
| 407 | req.Base + req.Size - 1); | 405 | req.Base + req.Size - 1); |
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index 1ee78f806ed2..fb10987a97b2 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c | |||
| @@ -142,7 +142,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
| 142 | link = pcmcia_cur_dev; /* XXX hack */ | 142 | link = pcmcia_cur_dev; /* XXX hack */ |
| 143 | if (!link) | 143 | if (!link) |
| 144 | return -EIO; | 144 | return -EIO; |
| 145 | iobase = link->io.BasePort1; | 145 | iobase = link->resource[0]->start; |
| 146 | irq = link->irq; | 146 | irq = link->irq; |
| 147 | break; | 147 | break; |
| 148 | default: | 148 | default: |
| @@ -373,12 +373,10 @@ static void labpc_config(struct pcmcia_device *link) | |||
| 373 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 373 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); |
| 374 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 374 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 375 | printk(", irq %d", link->irq); | 375 | printk(", irq %d", link->irq); |
| 376 | if (link->io.NumPorts1) | 376 | if (link->resource[0]) |
| 377 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 377 | printk(" & %pR", link->resource[0]); |
| 378 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 378 | if (link->resource[1]) |
| 379 | if (link->io.NumPorts2) | 379 | printk(" & %pR", link->resource[1]); |
| 380 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 381 | link->io.BasePort2 + link->io.NumPorts2 - 1); | ||
| 382 | if (link->win) | 380 | if (link->win) |
| 383 | printk(", mem 0x%06lx-0x%06lx", req.Base, | 381 | printk(", mem 0x%06lx-0x%06lx", req.Base, |
| 384 | req.Base + req.Size - 1); | 382 | req.Base + req.Size - 1); |
diff --git a/drivers/staging/comedi/drivers/ni_mio_cs.c b/drivers/staging/comedi/drivers/ni_mio_cs.c index 0bce220c47b5..f37dc22b4dbc 100644 --- a/drivers/staging/comedi/drivers/ni_mio_cs.c +++ b/drivers/staging/comedi/drivers/ni_mio_cs.c | |||
| @@ -355,7 +355,7 @@ static int mio_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
| 355 | return -EIO; | 355 | return -EIO; |
| 356 | 356 | ||
| 357 | dev->driver = &driver_ni_mio_cs; | 357 | dev->driver = &driver_ni_mio_cs; |
| 358 | dev->iobase = link->io.BasePort1; | 358 | dev->iobase = link->resource[0]->start; |
| 359 | 359 | ||
| 360 | irq = link->irq; | 360 | irq = link->irq; |
| 361 | 361 | ||
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index 67c0fa6a2b06..80b8d57c6842 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c | |||
| @@ -871,7 +871,7 @@ static int daqp_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
| 871 | } | 871 | } |
| 872 | } | 872 | } |
| 873 | 873 | ||
| 874 | dev->iobase = local->link->io.BasePort1; | 874 | dev->iobase = local->link->resource[0]->start; |
| 875 | 875 | ||
| 876 | ret = alloc_subdevices(dev, 4); | 876 | ret = alloc_subdevices(dev, 4); |
| 877 | if (ret < 0) | 877 | if (ret < 0) |
| @@ -1153,12 +1153,10 @@ static void daqp_cs_config(struct pcmcia_device *link) | |||
| 1153 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 1153 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); |
| 1154 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 1154 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 1155 | printk(", irq %u", link->irq); | 1155 | printk(", irq %u", link->irq); |
| 1156 | if (link->io.NumPorts1) | 1156 | if (link->resource[0]) |
| 1157 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 1157 | printk(" & %pR", link->resource[0]); |
| 1158 | link->io.BasePort1 + link->io.NumPorts1 - 1); | 1158 | if (link->resource[1]) |
| 1159 | if (link->io.NumPorts2) | 1159 | printk(" & %pR", link->resource[1]); |
| 1160 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
| 1161 | link->io.BasePort2 + link->io.NumPorts2 - 1); | ||
| 1162 | printk("\n"); | 1160 | printk("\n"); |
| 1163 | 1161 | ||
| 1164 | return; | 1162 | return; |
diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c index afe457541172..23615378acf1 100644 --- a/drivers/staging/wlags49_h2/wl_cs.c +++ b/drivers/staging/wlags49_h2/wl_cs.c | |||
| @@ -319,7 +319,7 @@ void wl_adapter_insert( struct pcmcia_device *link ) | |||
| 319 | goto failed; | 319 | goto failed; |
| 320 | 320 | ||
| 321 | dev->irq = link->irq; | 321 | dev->irq = link->irq; |
| 322 | dev->base_addr = link->io.BasePort1; | 322 | dev->base_addr = link->resource[0]->start; |
| 323 | 323 | ||
| 324 | SET_NETDEV_DEV(dev, &link->dev); | 324 | SET_NETDEV_DEV(dev, &link->dev); |
| 325 | if (register_netdev(dev) != 0) { | 325 | if (register_netdev(dev) != 0) { |
diff --git a/drivers/telephony/ixj_pcmcia.c b/drivers/telephony/ixj_pcmcia.c index f6c7e6fd7ee1..a801036392cd 100644 --- a/drivers/telephony/ixj_pcmcia.c +++ b/drivers/telephony/ixj_pcmcia.c | |||
| @@ -150,7 +150,8 @@ static int ixj_config(struct pcmcia_device * link) | |||
| 150 | /* | 150 | /* |
| 151 | * Register the card with the core. | 151 | * Register the card with the core. |
| 152 | */ | 152 | */ |
| 153 | j = ixj_pcmcia_probe(link->io.BasePort1, link->io.BasePort1 + 0x10); | 153 | j = ixj_pcmcia_probe(link->resource[0]->start, |
| 154 | link->resource[0]->start + 0x10); | ||
| 154 | 155 | ||
| 155 | info->ndev = 1; | 156 | info->ndev = 1; |
| 156 | ixj_get_serial(link, j); | 157 | ixj_get_serial(link, j); |
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index acb7e255a837..22e04f206304 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c | |||
| @@ -189,7 +189,7 @@ static int sl811_cs_config(struct pcmcia_device *link) | |||
| 189 | goto failed; | 189 | goto failed; |
| 190 | 190 | ||
| 191 | /* require an IRQ and two registers */ | 191 | /* require an IRQ and two registers */ |
| 192 | if (!link->io.NumPorts1 || link->io.NumPorts1 < 2) | 192 | if (resource_size(link->resource[0]) < 2) |
| 193 | goto failed; | 193 | goto failed; |
| 194 | 194 | ||
| 195 | if (!link->irq) | 195 | if (!link->irq) |
| @@ -204,11 +204,10 @@ static int sl811_cs_config(struct pcmcia_device *link) | |||
| 204 | if (link->conf.Vpp) | 204 | if (link->conf.Vpp) |
| 205 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); | 205 | printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10); |
| 206 | printk(", irq %d", link->irq); | 206 | printk(", irq %d", link->irq); |
| 207 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 207 | printk(", io %pR", link->resource[0]); |
| 208 | link->io.BasePort1+link->io.NumPorts1-1); | ||
| 209 | printk("\n"); | 208 | printk("\n"); |
| 210 | 209 | ||
| 211 | if (sl811_hc_init(parent, link->io.BasePort1, link->irq) | 210 | if (sl811_hc_init(parent, link->resource[0]->start, link->irq) |
| 212 | < 0) { | 211 | < 0) { |
| 213 | failed: | 212 | failed: |
| 214 | printk(KERN_WARNING "sl811_cs_config failed\n"); | 213 | printk(KERN_WARNING "sl811_cs_config failed\n"); |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index df110df52a8b..9f897bca0615 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c | |||
| @@ -231,7 +231,8 @@ static int pdacf_config(struct pcmcia_device *link) | |||
| 231 | if (ret) | 231 | if (ret) |
| 232 | goto failed; | 232 | goto failed; |
| 233 | 233 | ||
| 234 | if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq) < 0) | 234 | if (snd_pdacf_assign_resources(pdacf, link->resource[0]->start, |
| 235 | link->irq) < 0) | ||
| 235 | goto failed; | 236 | goto failed; |
| 236 | 237 | ||
| 237 | return 0; | 238 | return 0; |
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index 624b47a85f0a..f23c235013a4 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c | |||
| @@ -241,7 +241,8 @@ static int vxpocket_config(struct pcmcia_device *link) | |||
| 241 | chip->dev = &link->dev; | 241 | chip->dev = &link->dev; |
| 242 | snd_card_set_dev(chip->card, chip->dev); | 242 | snd_card_set_dev(chip->card, chip->dev); |
| 243 | 243 | ||
| 244 | if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq) < 0) | 244 | if (snd_vxpocket_assign_resources(chip, link->resource[0]->start, |
| 245 | link->irq) < 0) | ||
| 245 | goto failed; | 246 | goto failed; |
| 246 | 247 | ||
| 247 | return 0; | 248 | return 0; |
