Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <linux@dominikbrodowski.net>: spelling fixes, check for NULL not 0]
Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>

authored by

Komuro and committed by
Dominik Brodowski
94efb723 5f784336

+6
+6
drivers/pcmcia/pd6729.c
··· 641 641 if ((ret = pci_enable_device(dev))) 642 642 goto err_out_free_mem; 643 643 644 + if (!pci_resource_start(dev, 0)) { 645 + printk(KERN_INFO "pd6729: refusing to load the driver " 646 + "as the io_base is 0.\n"); 647 + goto err_out_free_mem; 648 + } 649 + 644 650 printk(KERN_INFO "pd6729: Cirrus PD6729 PCI to PCMCIA Bridge " 645 651 "at 0x%llx on irq %d\n", 646 652 (unsigned long long)pci_resource_start(dev, 0), dev->irq);