提交 def0c0a3 编写于 作者: V venu byravarasu 提交者: Rafael J. Wysocki

PM / Runtime: Fix runtime accounting calculation error

With delta type being int, its value is made zero
for all values of now > 0x80000000.
Hence fixing it.
Signed-off-by: Nvenu byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
上级 e9db50b8
......@@ -29,13 +29,10 @@ static int rpm_suspend(struct device *dev, int rpmflags);
void update_pm_runtime_accounting(struct device *dev)
{
unsigned long now = jiffies;
int delta;
unsigned long delta;
delta = now - dev->power.accounting_timestamp;
if (delta < 0)
delta = 0;
dev->power.accounting_timestamp = now;
if (dev->power.disable_depth > 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册