|
@@ -95,6 +95,13 @@ static int ish_init(struct ishtp_device *dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static const struct pci_device_id ish_invalid_pci_ids[] = {
|
|
|
+ /* Mehlow platform special pci ids */
|
|
|
+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xA309)},
|
|
|
+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xA30A)},
|
|
|
+ {}
|
|
|
+};
|
|
|
+
|
|
|
/**
|
|
|
* ish_probe() - PCI driver probe callback
|
|
|
* @pdev: pci device
|
|
@@ -110,6 +117,10 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
struct ish_hw *hw;
|
|
|
int ret;
|
|
|
|
|
|
+ /* Check for invalid platforms for ISH support */
|
|
|
+ if (pci_dev_present(ish_invalid_pci_ids))
|
|
|
+ return -ENODEV;
|
|
|
+
|
|
|
/* enable pci dev */
|
|
|
ret = pci_enable_device(pdev);
|
|
|
if (ret) {
|
|
@@ -172,7 +183,6 @@ free_irq:
|
|
|
free_irq(pdev->irq, dev);
|
|
|
free_device:
|
|
|
pci_iounmap(pdev, hw->mem_addr);
|
|
|
- kfree(dev);
|
|
|
release_regions:
|
|
|
pci_release_regions(pdev);
|
|
|
disable_device:
|
|
@@ -202,7 +212,6 @@ static void ish_remove(struct pci_dev *pdev)
|
|
|
pci_release_regions(pdev);
|
|
|
pci_clear_master(pdev);
|
|
|
pci_disable_device(pdev);
|
|
|
- kfree(ishtp_dev);
|
|
|
}
|
|
|
|
|
|
static struct device __maybe_unused *ish_resume_device;
|