diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-08-17 02:54:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-05 16:45:56 -0400 |
commit | daed6b5e78c11f34f08cc2bc1640b7f248884cee (patch) | |
tree | 698d2a913ed16fbfa70dbef1e36503cfab7ae47c /drivers/misc | |
parent | efda0ad4aa92439d9244d77a13339e23df5e1dc1 (diff) |
mei: rename struct pci_dev *mei_device to mei_pdev
1. rename mei_device variable to mei_pdev to remove
confusion with type 'struct mei_device'
2. mei_pdev no longer need to be gloabal so make it static
and remove the declaration from the header file
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/mei/main.c | 17 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 5 |
2 files changed, 8 insertions, 14 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 9a595338ae15..d6fe278347fc 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c | |||
@@ -41,9 +41,8 @@ | |||
41 | #include <linux/mei.h> | 41 | #include <linux/mei.h> |
42 | #include "interface.h" | 42 | #include "interface.h" |
43 | 43 | ||
44 | /* The device pointer */ | 44 | /* AMT device is a singleton on the platform */ |
45 | /* Currently this driver works as long as there is only a single AMT device. */ | 45 | static struct pci_dev *mei_pdev; |
46 | struct pci_dev *mei_device; | ||
47 | 46 | ||
48 | /* mei_pci_tbl - PCI Device ID Table */ | 47 | /* mei_pci_tbl - PCI Device ID Table */ |
49 | static DEFINE_PCI_DEVICE_TABLE(mei_pci_tbl) = { | 48 | static DEFINE_PCI_DEVICE_TABLE(mei_pci_tbl) = { |
@@ -218,10 +217,10 @@ static int mei_open(struct inode *inode, struct file *file) | |||
218 | int err; | 217 | int err; |
219 | 218 | ||
220 | err = -ENODEV; | 219 | err = -ENODEV; |
221 | if (!mei_device) | 220 | if (!mei_pdev) |
222 | goto out; | 221 | goto out; |
223 | 222 | ||
224 | dev = pci_get_drvdata(mei_device); | 223 | dev = pci_get_drvdata(mei_pdev); |
225 | if (!dev) | 224 | if (!dev) |
226 | goto out; | 225 | goto out; |
227 | 226 | ||
@@ -945,7 +944,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, | |||
945 | goto end; | 944 | goto end; |
946 | } | 945 | } |
947 | 946 | ||
948 | if (mei_device) { | 947 | if (mei_pdev) { |
949 | err = -EEXIST; | 948 | err = -EEXIST; |
950 | goto end; | 949 | goto end; |
951 | } | 950 | } |
@@ -1006,7 +1005,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, | |||
1006 | if (err) | 1005 | if (err) |
1007 | goto release_irq; | 1006 | goto release_irq; |
1008 | 1007 | ||
1009 | mei_device = pdev; | 1008 | mei_pdev = pdev; |
1010 | pci_set_drvdata(pdev, dev); | 1009 | pci_set_drvdata(pdev, dev); |
1011 | 1010 | ||
1012 | 1011 | ||
@@ -1051,7 +1050,7 @@ static void __devexit mei_remove(struct pci_dev *pdev) | |||
1051 | { | 1050 | { |
1052 | struct mei_device *dev; | 1051 | struct mei_device *dev; |
1053 | 1052 | ||
1054 | if (mei_device != pdev) | 1053 | if (mei_pdev != pdev) |
1055 | return; | 1054 | return; |
1056 | 1055 | ||
1057 | dev = pci_get_drvdata(pdev); | 1056 | dev = pci_get_drvdata(pdev); |
@@ -1064,7 +1063,7 @@ static void __devexit mei_remove(struct pci_dev *pdev) | |||
1064 | 1063 | ||
1065 | mei_wd_stop(dev); | 1064 | mei_wd_stop(dev); |
1066 | 1065 | ||
1067 | mei_device = NULL; | 1066 | mei_pdev = NULL; |
1068 | 1067 | ||
1069 | if (dev->iamthif_cl.state == MEI_FILE_CONNECTED) { | 1068 | if (dev->iamthif_cl.state == MEI_FILE_CONNECTED) { |
1070 | dev->iamthif_cl.state = MEI_FILE_DISCONNECTING; | 1069 | dev->iamthif_cl.state = MEI_FILE_DISCONNECTING; |
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index c8660c0eb1c7..ad6c9d5af1e9 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -39,11 +39,6 @@ | |||
39 | 39 | ||
40 | #define MEI_RD_MSG_BUF_SIZE (128 * sizeof(u32)) | 40 | #define MEI_RD_MSG_BUF_SIZE (128 * sizeof(u32)) |
41 | 41 | ||
42 | /* | ||
43 | * MEI PCI Device object | ||
44 | */ | ||
45 | extern struct pci_dev *mei_device; | ||
46 | |||
47 | 42 | ||
48 | /* | 43 | /* |
49 | * AMTHI Client UUID | 44 | * AMTHI Client UUID |