diff mbox

[3/3] i2c: designware-pci: drop superfluous {get|put}_device

Message ID 1366305218-22817-4-git-send-email-wsa@the-dreams.de
State Accepted
Headers show

Commit Message

Wolfram Sang April 18, 2013, 5:13 p.m. UTC
Driver core already takes care of refcounting, no need to do this on
driver level again.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/i2c/busses/i2c-designware-pcidrv.c |    4 ----
 1 file changed, 4 deletions(-)

Comments

Mika Westerberg April 19, 2013, 9:47 a.m. UTC | #1
On Thu, Apr 18, 2013 at 07:13:38PM +0200, Wolfram Sang wrote:
> Driver core already takes care of refcounting, no need to do this on
> driver level again.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index c8797e2..f6ed06c 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -288,9 +288,6 @@  static int i2c_dw_pci_probe(struct pci_dev *pdev,
 		return r;
 	}
 
-	/* Increase reference counter */
-	get_device(&pdev->dev);
-
 	pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
 	pm_runtime_use_autosuspend(&pdev->dev);
 	pm_runtime_allow(&pdev->dev);
@@ -307,7 +304,6 @@  static void i2c_dw_pci_remove(struct pci_dev *pdev)
 	pm_runtime_get_noresume(&pdev->dev);
 
 	i2c_del_adapter(&dev->adapter);
-	put_device(&pdev->dev);
 }
 
 /* work with hotplug and coldplug */