diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-24 11:23:51 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-08-03 03:04:11 -0400 |
commit | 90abdc3b973229bae98dd96649d9f7106cc177a4 (patch) | |
tree | 5c1a7a131b65560dd73b5103118d8c7631bd76a4 /drivers/bluetooth/bt3c_cs.c | |
parent | 9a017a910346afd88ec2e065989903bf211a7d37 (diff) |
pcmcia: do not use io_req_t when calling pcmcia_request_io()
Instead of io_req_t, drivers are now requested to fill out
struct pcmcia_device *p_dev->resource[0,1] for up to two ioport
ranges. After a call to pcmcia_request_io(), the ports found there
are reserved, after calling pcmcia_request_configuration(), they may
be used.
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-ide@vger.kernel.org
CC: linux-usb@vger.kernel.org
CC: laforge@gnumonks.org
CC: linux-mtd@lists.infradead.org
CC: alsa-devel@alsa-project.org
CC: linux-serial@vger.kernel.org
CC: Michael Buesch <mb@bu3sch.de>
Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/)
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/bluetooth/bt3c_cs.c')
-rw-r--r-- | drivers/bluetooth/bt3c_cs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 8ab494c0c17f..7ab8f29d5e0d 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -657,8 +657,8 @@ static int bt3c_probe(struct pcmcia_device *link) | |||
657 | info->p_dev = link; | 657 | info->p_dev = link; |
658 | link->priv = info; | 658 | link->priv = info; |
659 | 659 | ||
660 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 660 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; |
661 | link->io.NumPorts1 = 8; | 661 | link->resource[0]->end = 8; |
662 | 662 | ||
663 | link->conf.Attributes = CONF_ENABLE_IRQ; | 663 | link->conf.Attributes = CONF_ENABLE_IRQ; |
664 | link->conf.IntType = INT_MEMORY_AND_IO; | 664 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -683,14 +683,14 @@ static int bt3c_check_config(struct pcmcia_device *p_dev, | |||
683 | { | 683 | { |
684 | unsigned long try = (unsigned long) priv_data; | 684 | unsigned long try = (unsigned long) priv_data; |
685 | 685 | ||
686 | p_dev->io_lines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK; | ||
687 | |||
686 | if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM)) | 688 | if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM)) |
687 | p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; | 689 | p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; |
688 | if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && | 690 | if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && |
689 | (cf->io.win[0].base != 0)) { | 691 | (cf->io.win[0].base != 0)) { |
690 | p_dev->io.BasePort1 = cf->io.win[0].base; | 692 | p_dev->resource[0]->start = cf->io.win[0].base; |
691 | p_dev->io.IOAddrLines = (try == 0) ? 16 : | 693 | if (!pcmcia_request_io(p_dev)) |
692 | cf->io.flags & CISTPL_IO_LINES_MASK; | ||
693 | if (!pcmcia_request_io(p_dev, &p_dev->io)) | ||
694 | return 0; | 694 | return 0; |
695 | } | 695 | } |
696 | return -ENODEV; | 696 | return -ENODEV; |
@@ -707,9 +707,9 @@ static int bt3c_check_config_notpicky(struct pcmcia_device *p_dev, | |||
707 | 707 | ||
708 | if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { | 708 | if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { |
709 | for (j = 0; j < 5; j++) { | 709 | for (j = 0; j < 5; j++) { |
710 | p_dev->io.BasePort1 = base[j]; | 710 | p_dev->resource[0]->start = base[j]; |
711 | p_dev->io.IOAddrLines = base[j] ? 16 : 3; | 711 | p_dev->io_lines = base[j] ? 16 : 3; |
712 | if (!pcmcia_request_io(p_dev, &p_dev->io)) | 712 | if (!pcmcia_request_io(p_dev)) |
713 | return 0; | 713 | return 0; |
714 | } | 714 | } |
715 | } | 715 | } |