diff options
Diffstat (limited to 'drivers/char/pcmcia/synclink_cs.c')
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 308903ec8bf8..9ecd6bef5d3b 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -70,7 +70,6 @@ | |||
70 | #include <linux/workqueue.h> | 70 | #include <linux/workqueue.h> |
71 | #include <linux/hdlc.h> | 71 | #include <linux/hdlc.h> |
72 | 72 | ||
73 | #include <pcmcia/cs_types.h> | ||
74 | #include <pcmcia/cs.h> | 73 | #include <pcmcia/cs.h> |
75 | #include <pcmcia/cistpl.h> | 74 | #include <pcmcia/cistpl.h> |
76 | #include <pcmcia/cisreg.h> | 75 | #include <pcmcia/cisreg.h> |
@@ -572,18 +571,15 @@ static int mgslpc_ioprobe(struct pcmcia_device *p_dev, | |||
572 | unsigned int vcc, | 571 | unsigned int vcc, |
573 | void *priv_data) | 572 | void *priv_data) |
574 | { | 573 | { |
575 | if (cfg->io.nwin > 0) { | 574 | if (!cfg->io.nwin) |
576 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 575 | return -ENODEV; |
577 | if (!(cfg->io.flags & CISTPL_IO_8BIT)) | 576 | |
578 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; | 577 | p_dev->resource[0]->start = cfg->io.win[0].base; |
579 | if (!(cfg->io.flags & CISTPL_IO_16BIT)) | 578 | p_dev->resource[0]->end = cfg->io.win[0].len; |
580 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 579 | p_dev->resource[0]->flags |= pcmcia_io_cfg_data_width(cfg->io.flags); |
581 | p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK; | 580 | p_dev->io_lines = cfg->io.flags & CISTPL_IO_LINES_MASK; |
582 | p_dev->io.BasePort1 = cfg->io.win[0].base; | 581 | |
583 | p_dev->io.NumPorts1 = cfg->io.win[0].len; | 582 | return pcmcia_request_io(p_dev); |
584 | return pcmcia_request_io(p_dev, &p_dev->io); | ||
585 | } | ||
586 | return -ENODEV; | ||
587 | } | 583 | } |
588 | 584 | ||
589 | static int mgslpc_config(struct pcmcia_device *link) | 585 | static int mgslpc_config(struct pcmcia_device *link) |
@@ -610,16 +606,15 @@ static int mgslpc_config(struct pcmcia_device *link) | |||
610 | if (ret) | 606 | if (ret) |
611 | goto failed; | 607 | goto failed; |
612 | 608 | ||
613 | info->io_base = link->io.BasePort1; | 609 | info->io_base = link->resource[0]->start; |
614 | info->irq_level = link->irq; | 610 | info->irq_level = link->irq; |
615 | 611 | ||
616 | dev_info(&link->dev, "index 0x%02x:", | 612 | dev_info(&link->dev, "index 0x%02x:", |
617 | link->conf.ConfigIndex); | 613 | link->conf.ConfigIndex); |
618 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 614 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
619 | printk(", irq %d", link->irq); | 615 | printk(", irq %d", link->irq); |
620 | if (link->io.NumPorts1) | 616 | if (link->resource[0]) |
621 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 617 | printk(", io %pR", link->resource[0]); |
622 | link->io.BasePort1+link->io.NumPorts1-1); | ||
623 | printk("\n"); | 618 | printk("\n"); |
624 | return 0; | 619 | return 0; |
625 | 620 | ||