aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-05-29 20:09:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-30 21:44:43 +0900
commitc6148f8f8ceb18fd6ae3b637c56e8327b73873eb (patch)
tree67fa4e4a3e1a94c20f2b5bea89c97fb51e87d44e /drivers/misc
parent139aacf757fc89792c43a79ba99bc2361c98ecd3 (diff)
mei: me: remove artificial singleton requirement
There is only one device on the platform drop mei_pdev and the mutex 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/pci-me.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index a727464e9c3..a2f5520f406 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -43,9 +43,6 @@
#include "hw-me.h"
#include "client.h"
-/* AMT device is a singleton on the platform */
-static struct pci_dev *mei_pdev;
-
/* mei_pci_tbl - PCI Device ID Table */
static DEFINE_PCI_DEVICE_TABLE(mei_me_pci_tbl) = {
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_82946GZ)},
@@ -88,8 +85,6 @@ static DEFINE_PCI_DEVICE_TABLE(mei_me_pci_tbl) = {
MODULE_DEVICE_TABLE(pci, mei_me_pci_tbl);
-static DEFINE_MUTEX(mei_mutex);
-
/**
* mei_quirk_probe - probe for devices that doesn't valid ME interface
*
@@ -126,17 +121,12 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
struct mei_me_hw *hw;
int err;
- mutex_lock(&mei_mutex);
if (!mei_me_quirk_probe(pdev, ent)) {
err = -ENODEV;
goto end;
}
- if (mei_pdev) {
- err = -EEXIST;
- goto end;
- }
/* enable pci dev */
err = pci_enable_device(pdev);
if (err) {
@@ -195,13 +185,10 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (err)
goto release_irq;
- mei_pdev = pdev;
pci_set_drvdata(pdev, dev);
schedule_delayed_work(&dev->timer_work, HZ);
- mutex_unlock(&mei_mutex);
-
pr_debug("initialization successful.\n");
return 0;
@@ -220,7 +207,6 @@ release_regions:
disable_device:
pci_disable_device(pdev);
end:
- mutex_unlock(&mei_mutex);
dev_err(&pdev->dev, "initialization failed.\n");
return err;
}
@@ -238,9 +224,6 @@ static void mei_me_remove(struct pci_dev *pdev)
struct mei_device *dev;
struct mei_me_hw *hw;
- if (mei_pdev != pdev)
- return;
-
dev = pci_get_drvdata(pdev);
if (!dev)
return;
@@ -251,8 +234,6 @@ static void mei_me_remove(struct pci_dev *pdev)
dev_err(&pdev->dev, "stop\n");
mei_stop(dev);
- mei_pdev = NULL;
-
/* disable interrupts */
mei_disable_interrupts(dev);