From: Komuro Date: Fri, 23 Oct 2009 23:07:39 +0000 (+0900) Subject: pcmcia: do not load the pd6729 driver if io_base is NULL X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=94efb72328afa29ea5fd93e48ed17489afcdaa12;p=deliverable%2Flinux.git pcmcia: do not load the pd6729 driver if io_base is NULL The CL-PD6729 chip in some docking station is not initialized properly under Linux. In that case, do not load the pd6729 driver. [Dominik Brodowski : spelling fixes, check for NULL not 0] Signed-off-by: Komuro Signed-off-by: Dominik Brodowski --- diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index 1c39d3438f20..70a33468bcd0 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c @@ -641,6 +641,12 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev, if ((ret = pci_enable_device(dev))) goto err_out_free_mem; + if (!pci_resource_start(dev, 0)) { + printk(KERN_INFO "pd6729: refusing to load the driver " + "as the io_base is 0.\n"); + goto err_out_free_mem; + } + printk(KERN_INFO "pd6729: Cirrus PD6729 PCI to PCMCIA Bridge " "at 0x%llx on irq %d\n", (unsigned long long)pci_resource_start(dev, 0), dev->irq);