/* 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 */
mei_device_init(dev, &pdev->dev, &mei_me_hw_ops);
dev->cfg = cfg;
- dev->pdev = pdev;
return dev;
}
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 */
init_waitqueue_head(&hw->wait_aliveness_resp);
dev->cfg = cfg;
- dev->pdev = pdev;
return dev;
}
/**
* 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
* @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;
*/
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;
*/
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;