From 4ad96db6ccdd8b777cff5fd4aa74ec1e86f1afce Mon Sep 17 00:00:00 2001 From: Tomas Winkler Date: Mon, 29 Sep 2014 16:31:45 +0300 Subject: mei: push pci cfg structure me hw Device specific configurations are currently only needed by me hw so we can remove it from txe Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/hw-txe.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'drivers/misc/mei/hw-txe.c') diff --git a/drivers/misc/mei/hw-txe.c b/drivers/misc/mei/hw-txe.c index 6eef6766f0a5..f33fbcbcdf63 100644 --- a/drivers/misc/mei/hw-txe.c +++ b/drivers/misc/mei/hw-txe.c @@ -573,6 +573,11 @@ static int mei_txe_readiness_wait(struct mei_device *dev) return 0; } +const struct mei_fw_status mei_txe_fw_sts = { + .count = 2, + .status[0] = PCI_CFG_TXE_FW_STS0, + .status[1] = PCI_CFG_TXE_FW_STS1 +}; /** * mei_txe_fw_status - read fw status register from pci config space @@ -583,7 +588,7 @@ static int mei_txe_readiness_wait(struct mei_device *dev) static int mei_txe_fw_status(struct mei_device *dev, struct mei_fw_status *fw_status) { - const struct mei_fw_status *fw_src = &dev->cfg->fw_status; + const struct mei_fw_status *fw_src = &mei_txe_fw_sts; struct pci_dev *pdev = to_pci_dev(dev->dev); int ret; int i; @@ -1120,27 +1125,15 @@ static const struct mei_hw_ops mei_txe_hw_ops = { }; -#define MEI_CFG_TXE_FW_STS \ - .fw_status.count = 2, \ - .fw_status.status[0] = PCI_CFG_TXE_FW_STS0, \ - .fw_status.status[1] = PCI_CFG_TXE_FW_STS1 - -const struct mei_cfg mei_txe_cfg = { - MEI_CFG_TXE_FW_STS, -}; - - /** * mei_txe_dev_init - allocates and initializes txe hardware specific structure * * @pdev - pci device - * @cfg - per device generation config * * returns struct mei_device * on success or NULL; * */ -struct mei_device *mei_txe_dev_init(struct pci_dev *pdev, - const struct mei_cfg *cfg) +struct mei_device *mei_txe_dev_init(struct pci_dev *pdev) { struct mei_device *dev; struct mei_txe_hw *hw; @@ -1156,7 +1149,6 @@ struct mei_device *mei_txe_dev_init(struct pci_dev *pdev, init_waitqueue_head(&hw->wait_aliveness_resp); - dev->cfg = cfg; return dev; } -- cgit v1.2.1