Skip to content

Commit

Permalink
pcmcia: do not load the pd6729 driver if io_base is NULL
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Komuro authored and Dominik Brodowski committed Oct 24, 2009
1 parent 5f78433 commit 94efb72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/pcmcia/pd6729.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 94efb72

Please sign in to comment.