Skip to content

Commit ae11e08

Browse files
Sakari AilusWolfram Sang
authored andcommitted
i2c: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy(). Signed-off-by: Sakari Ailus <[email protected]> Acked-by: Andi Shyti <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 3a86608 commit ae11e08

22 files changed

Lines changed: 0 additions & 41 deletions

drivers/i2c/busses/i2c-amd-mp2.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ static inline void amd_mp2_pm_runtime_get(struct amd_mp2_dev *mp2_dev)
207207

208208
static inline void amd_mp2_pm_runtime_put(struct amd_mp2_dev *mp2_dev)
209209
{
210-
pm_runtime_mark_last_busy(&mp2_dev->pci_dev->dev);
211210
pm_runtime_put_autosuspend(&mp2_dev->pci_dev->dev);
212211
}
213212

drivers/i2c/busses/i2c-at91-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ static int __maybe_unused at91_twi_resume_noirq(struct device *dev)
313313
return ret;
314314
}
315315

316-
pm_runtime_mark_last_busy(dev);
317316
pm_request_autosuspend(dev);
318317

319318
at91_init_twi_bus(twi_dev);

drivers/i2c/busses/i2c-at91-master.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,6 @@ static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num)
717717

718718
ret = (ret < 0) ? ret : num;
719719
out:
720-
pm_runtime_mark_last_busy(dev->dev);
721720
pm_runtime_put_autosuspend(dev->dev);
722721

723722
return ret;

drivers/i2c/busses/i2c-cadence.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,6 @@ static int cdns_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
11281128
cdns_i2c_set_mode(CDNS_I2C_MODE_SLAVE, id);
11291129
#endif
11301130

1131-
pm_runtime_mark_last_busy(id->dev);
11321131
pm_runtime_put_autosuspend(id->dev);
11331132
return ret;
11341133
}

drivers/i2c/busses/i2c-davinci.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,6 @@ i2c_davinci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
543543
ret = num;
544544

545545
out:
546-
pm_runtime_mark_last_busy(dev->dev);
547546
pm_runtime_put_autosuspend(dev->dev);
548547

549548
return ret;
@@ -821,7 +820,6 @@ static int davinci_i2c_probe(struct platform_device *pdev)
821820
if (r)
822821
goto err_unuse_clocks;
823822

824-
pm_runtime_mark_last_busy(dev->dev);
825823
pm_runtime_put_autosuspend(dev->dev);
826824

827825
return 0;

drivers/i2c/busses/i2c-designware-master.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,6 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
901901
i2c_dw_release_lock(dev);
902902

903903
done_nolock:
904-
pm_runtime_mark_last_busy(dev->dev);
905904
pm_runtime_put_autosuspend(dev->dev);
906905

907906
return ret;

drivers/i2c/busses/i2c-hix5hd2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ static int hix5hd2_i2c_xfer(struct i2c_adapter *adap,
373373
ret = num;
374374

375375
out:
376-
pm_runtime_mark_last_busy(priv->dev);
377376
pm_runtime_put_autosuspend(priv->dev);
378377
return ret;
379378
}

drivers/i2c/busses/i2c-i801.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,6 @@ static s32 i801_access(struct i2c_adapter *adap, u16 addr,
930930
*/
931931
iowrite8(SMBHSTSTS_INUSE_STS | STATUS_FLAGS, SMBHSTSTS(priv));
932932

933-
pm_runtime_mark_last_busy(&priv->pci_dev->dev);
934933
pm_runtime_put_autosuspend(&priv->pci_dev->dev);
935934
return ret;
936935
}

drivers/i2c/busses/i2c-img-scb.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,6 @@ static int img_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
11311131
break;
11321132
}
11331133

1134-
pm_runtime_mark_last_busy(adap->dev.parent);
11351134
pm_runtime_put_autosuspend(adap->dev.parent);
11361135

11371136
return i2c->msg_status ? i2c->msg_status : num;
@@ -1165,7 +1164,6 @@ static int img_i2c_init(struct img_i2c *i2c)
11651164
"Unknown hardware revision (%d.%d.%d.%d)\n",
11661165
(rev >> 24) & 0xff, (rev >> 16) & 0xff,
11671166
(rev >> 8) & 0xff, rev & 0xff);
1168-
pm_runtime_mark_last_busy(i2c->adap.dev.parent);
11691167
pm_runtime_put_autosuspend(i2c->adap.dev.parent);
11701168
return -EINVAL;
11711169
}
@@ -1317,7 +1315,6 @@ static int img_i2c_init(struct img_i2c *i2c)
13171315
/* Perform a synchronous sequence to reset the bus */
13181316
ret = img_i2c_reset_bus(i2c);
13191317

1320-
pm_runtime_mark_last_busy(i2c->adap.dev.parent);
13211318
pm_runtime_put_autosuspend(i2c->adap.dev.parent);
13221319

13231320
return ret;

drivers/i2c/busses/i2c-imx-lpi2c.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ static int lpi2c_imx_master_enable(struct lpi2c_imx_struct *lpi2c_imx)
363363
return 0;
364364

365365
rpm_put:
366-
pm_runtime_mark_last_busy(lpi2c_imx->adapter.dev.parent);
367366
pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
368367

369368
return ret;
@@ -377,7 +376,6 @@ static int lpi2c_imx_master_disable(struct lpi2c_imx_struct *lpi2c_imx)
377376
temp &= ~MCR_MEN;
378377
writel(temp, lpi2c_imx->base + LPI2C_MCR);
379378

380-
pm_runtime_mark_last_busy(lpi2c_imx->adapter.dev.parent);
381379
pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
382380

383381
return 0;
@@ -1462,7 +1460,6 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
14621460
if (ret)
14631461
goto rpm_disable;
14641462

1465-
pm_runtime_mark_last_busy(&pdev->dev);
14661463
pm_runtime_put_autosuspend(&pdev->dev);
14671464

14681465
dev_info(&lpi2c_imx->adapter.dev, "LPI2C adapter registered\n");
@@ -1564,7 +1561,6 @@ static int lpi2c_suspend(struct device *dev)
15641561

15651562
static int lpi2c_resume(struct device *dev)
15661563
{
1567-
pm_runtime_mark_last_busy(dev);
15681564
pm_runtime_put_autosuspend(dev);
15691565

15701566
return 0;

0 commit comments

Comments
 (0)