aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/cafe_nand.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-10-06 14:44:12 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2007-10-06 14:44:12 -0400
commit06ed24e5773346eb13579a4ae9599502bc78e4f7 (patch)
treecf935fed19b9542c5cb45de68822141d8dd20197 /drivers/mtd/nand/cafe_nand.c
parent39fd179a7bfca026a269724a1f4ee5eb3f10419a (diff)
[MTD] [NAND] Fix PCI ident table for CAFÉ NAND controller.
It was only the very early prototypes which made the mistake of using the same device ident for all three functions on the device -- don't bother trying to express that in the PCI match table, since the tools don't cope. We can check in the probe routine instead, just in case. Also remember to terminate the table. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/nand/cafe_nand.c')
-rw-r--r--drivers/mtd/nand/cafe_nand.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
index cff969d05d4a..0b3f840b6cbe 100644
--- a/drivers/mtd/nand/cafe_nand.c
+++ b/drivers/mtd/nand/cafe_nand.c
@@ -623,6 +623,11 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
623 uint32_t ctrl; 623 uint32_t ctrl;
624 int err = 0; 624 int err = 0;
625 625
626 /* Very old versions shared the same PCI ident for all three
627 functions on the chip. Verify the class too... */
628 if ((pdev->class >> 8) != PCI_CLASS_MEMORY_FLASH)
629 return -ENODEV;
630
626 err = pci_enable_device(pdev); 631 err = pci_enable_device(pdev);
627 if (err) 632 if (err)
628 return err; 633 return err;
@@ -816,7 +821,8 @@ static void __devexit cafe_nand_remove(struct pci_dev *pdev)
816} 821}
817 822
818static struct pci_device_id cafe_nand_tbl[] = { 823static struct pci_device_id cafe_nand_tbl[] = {
819 { 0x11ab, 0x4100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MEMORY_FLASH << 8, 0xFFFF0 } 824 { 0x11ab, 0x4100, PCI_ANY_ID, PCI_ANY_ID },
825 { }
820}; 826};
821 827
822MODULE_DEVICE_TABLE(pci, cafe_nand_tbl); 828MODULE_DEVICE_TABLE(pci, cafe_nand_tbl);