aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/dtl1_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/dtl1_cs.c')
-rw-r--r--drivers/bluetooth/dtl1_cs.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index db7c8db695fc..26ee0cf88d20 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.h>
45#include <pcmcia/cistpl.h> 44#include <pcmcia/cistpl.h>
46#include <pcmcia/ciscode.h> 45#include <pcmcia/ciscode.h>
47#include <pcmcia/ds.h> 46#include <pcmcia/ds.h>
@@ -572,11 +571,7 @@ static int dtl1_probe(struct pcmcia_device *link)
572 info->p_dev = link; 571 info->p_dev = link;
573 link->priv = info; 572 link->priv = info;
574 573
575 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 574 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
576 link->resource[0]->end = 8;
577
578 link->conf.Attributes = CONF_ENABLE_IRQ;
579 link->conf.IntType = INT_MEMORY_AND_IO;
580 575
581 return dtl1_config(link); 576 return dtl1_config(link);
582} 577}
@@ -591,18 +586,14 @@ static void dtl1_detach(struct pcmcia_device *link)
591 kfree(info); 586 kfree(info);
592} 587}
593 588
594static int dtl1_confcheck(struct pcmcia_device *p_dev, 589static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data)
595 cistpl_cftable_entry_t *cf,
596 cistpl_cftable_entry_t *dflt,
597 unsigned int vcc,
598 void *priv_data)
599{ 590{
600 if ((cf->io.nwin != 1) || (cf->io.win[0].len <= 8)) 591 if ((p_dev->resource[1]->end) || (p_dev->resource[1]->end < 8))
601 return -ENODEV; 592 return -ENODEV;
602 593
603 p_dev->resource[0]->start = cf->io.win[0].base; 594 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
604 p_dev->resource[0]->end = cf->io.win[0].len; /*yo */ 595 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
605 p_dev->io_lines = cf->io.flags & CISTPL_IO_LINES_MASK; 596
606 return pcmcia_request_io(p_dev); 597 return pcmcia_request_io(p_dev);
607} 598}
608 599
@@ -620,7 +611,7 @@ static int dtl1_config(struct pcmcia_device *link)
620 if (i != 0) 611 if (i != 0)
621 goto failed; 612 goto failed;
622 613
623 i = pcmcia_request_configuration(link, &link->conf); 614 i = pcmcia_enable_device(link);
624 if (i != 0) 615 if (i != 0)
625 goto failed; 616 goto failed;
626 617
@@ -656,9 +647,7 @@ MODULE_DEVICE_TABLE(pcmcia, dtl1_ids);
656 647
657static struct pcmcia_driver dtl1_driver = { 648static struct pcmcia_driver dtl1_driver = {
658 .owner = THIS_MODULE, 649 .owner = THIS_MODULE,
659 .drv = { 650 .name = "dtl1_cs",
660 .name = "dtl1_cs",
661 },
662 .probe = dtl1_probe, 651 .probe = dtl1_probe,
663 .remove = dtl1_detach, 652 .remove = dtl1_detach,
664 .id_table = dtl1_ids, 653 .id_table = dtl1_ids,