[PATCH 6/6] pcmcia: do not load the pd6729 driver if io_base is 0

Dominik Brodowski linux at dominikbrodowski.net
Sat Oct 24 04:24:56 EDT 2009


From: Komuro <komurojun-mbn at nifty.com>

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 at dominikbrodowski.net>: spelling fixes]
Signed-off-by: Komuro <komurojun-mbn at nifty.com>
Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
---
 drivers/pcmcia/pd6729.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c
index 1c39d34..bb81f68 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 ((unsigned long long)pci_resource_start(dev, 0) == 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);
-- 
1.6.0.4




More information about the linux-pcmcia mailing list