Skip to content

Commit

Permalink
i2c: designware-plat: drop superfluous {get|put}_device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wolfram Sang committed Apr 19, 2013
1 parent c4df500 commit be7fbe6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/i2c/busses/i2c-designware-platdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ static int dw_i2c_probe(struct platform_device *pdev)
of_i2c_register_devices(adap);
acpi_i2c_register_devices(adap);

/* Increase reference counter */
get_device(&pdev->dev);

pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_set_active(&pdev->dev);
Expand All @@ -188,7 +185,6 @@ static int dw_i2c_remove(struct platform_device *pdev)
pm_runtime_get_sync(&pdev->dev);

i2c_del_adapter(&dev->adapter);
put_device(&pdev->dev);

i2c_dw_disable(dev);

Expand Down

0 comments on commit be7fbe6

Please sign in to comment.