diff options
Diffstat (limited to 'drivers/bluetooth/dtl1_cs.c')
-rw-r--r-- | drivers/bluetooth/dtl1_cs.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index cbe9e44a42e9..db7c8db695fc 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/system.h> | 41 | #include <asm/system.h> |
42 | #include <asm/io.h> | 42 | #include <asm/io.h> |
43 | 43 | ||
44 | #include <pcmcia/cs_types.h> | ||
45 | #include <pcmcia/cs.h> | 44 | #include <pcmcia/cs.h> |
46 | #include <pcmcia/cistpl.h> | 45 | #include <pcmcia/cistpl.h> |
47 | #include <pcmcia/ciscode.h> | 46 | #include <pcmcia/ciscode.h> |
@@ -150,7 +149,7 @@ static void dtl1_write_wakeup(dtl1_info_t *info) | |||
150 | } | 149 | } |
151 | 150 | ||
152 | do { | 151 | do { |
153 | register unsigned int iobase = info->p_dev->io.BasePort1; | 152 | register unsigned int iobase = info->p_dev->resource[0]->start; |
154 | register struct sk_buff *skb; | 153 | register struct sk_buff *skb; |
155 | register int len; | 154 | register int len; |
156 | 155 | ||
@@ -215,7 +214,7 @@ static void dtl1_receive(dtl1_info_t *info) | |||
215 | return; | 214 | return; |
216 | } | 215 | } |
217 | 216 | ||
218 | iobase = info->p_dev->io.BasePort1; | 217 | iobase = info->p_dev->resource[0]->start; |
219 | 218 | ||
220 | do { | 219 | do { |
221 | info->hdev->stat.byte_rx++; | 220 | info->hdev->stat.byte_rx++; |
@@ -302,7 +301,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst) | |||
302 | /* our irq handler is shared */ | 301 | /* our irq handler is shared */ |
303 | return IRQ_NONE; | 302 | return IRQ_NONE; |
304 | 303 | ||
305 | iobase = info->p_dev->io.BasePort1; | 304 | iobase = info->p_dev->resource[0]->start; |
306 | 305 | ||
307 | spin_lock(&(info->lock)); | 306 | spin_lock(&(info->lock)); |
308 | 307 | ||
@@ -462,7 +461,7 @@ static int dtl1_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long | |||
462 | static int dtl1_open(dtl1_info_t *info) | 461 | static int dtl1_open(dtl1_info_t *info) |
463 | { | 462 | { |
464 | unsigned long flags; | 463 | unsigned long flags; |
465 | unsigned int iobase = info->p_dev->io.BasePort1; | 464 | unsigned int iobase = info->p_dev->resource[0]->start; |
466 | struct hci_dev *hdev; | 465 | struct hci_dev *hdev; |
467 | 466 | ||
468 | spin_lock_init(&(info->lock)); | 467 | spin_lock_init(&(info->lock)); |
@@ -509,7 +508,8 @@ static int dtl1_open(dtl1_info_t *info) | |||
509 | outb(UART_LCR_WLEN8, iobase + UART_LCR); /* Reset DLAB */ | 508 | outb(UART_LCR_WLEN8, iobase + UART_LCR); /* Reset DLAB */ |
510 | 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); |
511 | 510 | ||
512 | 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; | ||
513 | 513 | ||
514 | /* Turn on interrupts */ | 514 | /* Turn on interrupts */ |
515 | 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); |
@@ -534,7 +534,7 @@ static int dtl1_open(dtl1_info_t *info) | |||
534 | static int dtl1_close(dtl1_info_t *info) | 534 | static int dtl1_close(dtl1_info_t *info) |
535 | { | 535 | { |
536 | unsigned long flags; | 536 | unsigned long flags; |
537 | unsigned int iobase = info->p_dev->io.BasePort1; | 537 | unsigned int iobase = info->p_dev->resource[0]->start; |
538 | struct hci_dev *hdev = info->hdev; | 538 | struct hci_dev *hdev = info->hdev; |
539 | 539 | ||
540 | if (!hdev) | 540 | if (!hdev) |
@@ -572,8 +572,8 @@ static int dtl1_probe(struct pcmcia_device *link) | |||
572 | info->p_dev = link; | 572 | info->p_dev = link; |
573 | link->priv = info; | 573 | link->priv = info; |
574 | 574 | ||
575 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 575 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; |
576 | link->io.NumPorts1 = 8; | 576 | link->resource[0]->end = 8; |
577 | 577 | ||
578 | link->conf.Attributes = CONF_ENABLE_IRQ; | 578 | link->conf.Attributes = CONF_ENABLE_IRQ; |
579 | link->conf.IntType = INT_MEMORY_AND_IO; | 579 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -597,14 +597,13 @@ static int dtl1_confcheck(struct pcmcia_device *p_dev, | |||
597 | unsigned int vcc, | 597 | unsigned int vcc, |
598 | void *priv_data) | 598 | void *priv_data) |
599 | { | 599 | { |
600 | if ((cf->io.nwin == 1) && (cf->io.win[0].len > 8)) { | 600 | if ((cf->io.nwin != 1) || (cf->io.win[0].len <= 8)) |
601 | p_dev->io.BasePort1 = cf->io.win[0].base; | 601 | return -ENODEV; |
602 | p_dev->io.NumPorts1 = cf->io.win[0].len; /*yo */ | 602 | |
603 | p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK; | 603 | p_dev->resource[0]->start = cf->io.win[0].base; |
604 | if (!pcmcia_request_io(p_dev, &p_dev->io)) | 604 | p_dev->resource[0]->end = cf->io.win[0].len; /*yo */ |
605 | return 0; | 605 | p_dev->io_lines = cf->io.flags & CISTPL_IO_LINES_MASK; |
606 | } | 606 | return pcmcia_request_io(p_dev); |
607 | return -ENODEV; | ||
608 | } | 607 | } |
609 | 608 | ||
610 | static int dtl1_config(struct pcmcia_device *link) | 609 | static int dtl1_config(struct pcmcia_device *link) |
@@ -613,7 +612,7 @@ static int dtl1_config(struct pcmcia_device *link) | |||
613 | int i; | 612 | int i; |
614 | 613 | ||
615 | /* Look for a generic full-sized window */ | 614 | /* Look for a generic full-sized window */ |
616 | link->io.NumPorts1 = 8; | 615 | link->resource[0]->end = 8; |
617 | if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0) | 616 | if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0) |
618 | goto failed; | 617 | goto failed; |
619 | 618 | ||