msm: mdss: send idle_time notification only if positive

User-land program can configure idle_time as zero when they want to
disable idle_time notifications. In the current implementation, driver
does not modify current idle timer if idle_time is zero but it may still
send the notification if the previous timer expires. Prevent this
notification if idle_time is set as zero.

Change-Id: Ib35b71a1f6c7f13f3efc28cf48a8c6bd6aaa0fa2
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
This commit is contained in:
Ujwal Patel 2015-02-13 12:38:24 -08:00 committed by David Keitel
parent 8d2a693f40
commit 35589945c5

View file

@ -460,7 +460,8 @@ static void __mdss_fb_idle_notify_work(struct work_struct *work)
/* Notify idle-ness here */
pr_debug("Idle timeout %dms expired!\n", mfd->idle_time);
sysfs_notify(&mfd->fbi->dev->kobj, NULL, "idle_notify");
if (mfd->idle_time)
sysfs_notify(&mfd->fbi->dev->kobj, NULL, "idle_notify");
}
static ssize_t mdss_fb_get_idle_time(struct device *dev,