diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2014-09-29 16:31:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-29 11:56:01 -0400 |
commit | d08b8fc0dbdbe9bf7edeb46f7a856f993630664f (patch) | |
tree | 76f472d4e146681af9e7b864a66c4846727067fe /drivers/misc/mei | |
parent | 1bd30b6a42610466bae2c133e68a8feb1004929c (diff) | |
download | blackbird-obmc-linux-d08b8fc0dbdbe9bf7edeb46f7a856f993630664f.tar.gz blackbird-obmc-linux-d08b8fc0dbdbe9bf7edeb46f7a856f993630664f.zip |
mei: remove the reference to pdev from mei_device
For purpose of adding testing HW we would like
to get rid of pci dependency in generic mei code.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r-- | drivers/misc/mei/hw-me.c | 3 | ||||
-rw-r--r-- | drivers/misc/mei/hw-txe.c | 3 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 2 | ||||
-rw-r--r-- | drivers/misc/mei/pci-me.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/pci-txe.c | 2 |
5 files changed, 4 insertions, 8 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index 678531c08c6d..da86310d7899 100644 --- a/drivers/misc/mei/hw-me.c +++ b/drivers/misc/mei/hw-me.c @@ -676,7 +676,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id) /* Ack the interrupt here * In case of MSI we don't go through the quick handler */ - if (pci_dev_msi_enabled(dev->pdev)) + if (pci_dev_msi_enabled(to_pci_dev(dev->dev))) mei_clear_interrupts(dev); /* check if ME wants a reset */ @@ -854,7 +854,6 @@ struct mei_device *mei_me_dev_init(struct pci_dev *pdev, mei_device_init(dev, &pdev->dev, &mei_me_hw_ops); dev->cfg = cfg; - dev->pdev = pdev; return dev; } diff --git a/drivers/misc/mei/hw-txe.c b/drivers/misc/mei/hw-txe.c index e4cb9dc2d198..6eef6766f0a5 100644 --- a/drivers/misc/mei/hw-txe.c +++ b/drivers/misc/mei/hw-txe.c @@ -998,7 +998,7 @@ irqreturn_t mei_txe_irq_thread_handler(int irq, void *dev_id) mutex_lock(&dev->device_lock); mei_io_list_init(&complete_list); - if (pci_dev_msi_enabled(dev->pdev)) + if (pci_dev_msi_enabled(to_pci_dev(dev->dev))) mei_txe_check_and_ack_intrs(dev, true); /* show irq events */ @@ -1157,7 +1157,6 @@ struct mei_device *mei_txe_dev_init(struct pci_dev *pdev, init_waitqueue_head(&hw->wait_aliveness_resp); dev->cfg = cfg; - dev->pdev = pdev; return dev; } diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 7080fff11595..5a16cc46f8d6 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h @@ -401,7 +401,6 @@ struct mei_cfg { /** * struct mei_device - MEI private device struct - * @pdev - pointer to pci device struct * @dev - device on a bus * @cdev - character device * @minor - minor number allocated for device @@ -420,7 +419,6 @@ struct mei_cfg { * @cfg - per device generation config and ops */ struct mei_device { - struct pci_dev *pdev; /* pointer to pci device struct */ struct device *dev; struct cdev cdev; int minor; diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c index 83e88920f738..a91071716868 100644 --- a/drivers/misc/mei/pci-me.c +++ b/drivers/misc/mei/pci-me.c @@ -430,7 +430,7 @@ static int mei_me_pm_runtime_resume(struct device *device) */ static inline void mei_me_set_pm_domain(struct mei_device *dev) { - struct pci_dev *pdev = dev->pdev; + struct pci_dev *pdev = to_pci_dev(dev->dev); if (pdev->dev.bus && pdev->dev.bus->pm) { dev->pg_domain.ops = *pdev->dev.bus->pm; diff --git a/drivers/misc/mei/pci-txe.c b/drivers/misc/mei/pci-txe.c index a1f60be873f5..cd9dda705006 100644 --- a/drivers/misc/mei/pci-txe.c +++ b/drivers/misc/mei/pci-txe.c @@ -378,7 +378,7 @@ static int mei_txe_pm_runtime_resume(struct device *device) */ static inline void mei_txe_set_pm_domain(struct mei_device *dev) { - struct pci_dev *pdev = dev->pdev; + struct pci_dev *pdev = to_pci_dev(dev->dev); if (pdev->dev.bus && pdev->dev.bus->pm) { dev->pg_domain.ops = *pdev->dev.bus->pm; |