diff options
author | Davide Ciminaghi <ciminaghi@gnudd.com> | 2012-11-09 09:19:56 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-20 06:21:15 -0500 |
commit | 8ec86a302a190bc4864928dd69f3f22066137b68 (patch) | |
tree | 1bd7b823704cb6aa22ea5b7efe726cb8774418ea /drivers/mfd/sta2x11-mfd.c | |
parent | b18adafccd497245a6bc5b867bf9cba7e01f8729 (diff) |
mfd: sta2x11-mfd: Only add sta2x11_mfd if it hasn't already been added
The pci probe method is called twice now, so we have to call
sta2x11_mfd_add() only once to avoid a -EBUSY error.
Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/sta2x11-mfd.c')
-rw-r--r-- | drivers/mfd/sta2x11-mfd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mfd/sta2x11-mfd.c b/drivers/mfd/sta2x11-mfd.c index 8d38ef264722..b981dc4a7b3c 100644 --- a/drivers/mfd/sta2x11-mfd.c +++ b/drivers/mfd/sta2x11-mfd.c | |||
@@ -585,7 +585,8 @@ static int __devinit sta2x11_mfd_probe(struct pci_dev *pdev, | |||
585 | sta2x11_mfd_setup(pdev, setup_data); | 585 | sta2x11_mfd_setup(pdev, setup_data); |
586 | 586 | ||
587 | /* Record this pdev before mfd_add_devices: their probe looks for it */ | 587 | /* Record this pdev before mfd_add_devices: their probe looks for it */ |
588 | sta2x11_mfd_add(pdev, GFP_ATOMIC); | 588 | if (!sta2x11_mfd_find(pdev)) |
589 | sta2x11_mfd_add(pdev, GFP_ATOMIC); | ||
589 | 590 | ||
590 | /* Just 2 bars for all mfd's at present */ | 591 | /* Just 2 bars for all mfd's at present */ |
591 | for (i = 0; i < 2; i++) { | 592 | for (i = 0; i < 2; i++) { |