summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-06-19 10:18:56 +0200
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2018-06-19 22:38:29 +0200
commitd30c8d2031259d6dc360f8c96d362bb36665c99c (patch)
tree87b35031fafd1ecf4250e0859c43cfd8a13448ea /drivers/leds
parentce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff)
downloadlinux-rpi3-d30c8d2031259d6dc360f8c96d362bb36665c99c.tar.gz
linux-rpi3-d30c8d2031259d6dc360f8c96d362bb36665c99c.tar.bz2
linux-rpi3-d30c8d2031259d6dc360f8c96d362bb36665c99c.zip
leds: ledtrig-activity: use ktime_get_boot_ns()
get_monotonic_boottime() is deprecated, so let's convert this to the simpler ktime_get_boot_ns(). Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/trigger/ledtrig-activity.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/leds/trigger/ledtrig-activity.c b/drivers/leds/trigger/ledtrig-activity.c
index 5081894082bd..6c6f8a9b8d9a 100644
--- a/drivers/leds/trigger/ledtrig-activity.c
+++ b/drivers/leds/trigger/ledtrig-activity.c
@@ -37,7 +37,6 @@ static void led_activity_function(struct timer_list *t)
struct activity_data *activity_data = from_timer(activity_data, t,
timer);
struct led_classdev *led_cdev = activity_data->led_cdev;
- struct timespec boot_time;
unsigned int target;
unsigned int usage;
int delay;
@@ -57,8 +56,6 @@ static void led_activity_function(struct timer_list *t)
return;
}
- get_monotonic_boottime(&boot_time);
-
cpus = 0;
curr_used = 0;
@@ -76,7 +73,7 @@ static void led_activity_function(struct timer_list *t)
* down to 16us, ensuring we won't overflow 32-bit computations below
* even up to 3k CPUs, while keeping divides cheap on smaller systems.
*/
- curr_boot = timespec_to_ns(&boot_time) * cpus;
+ curr_boot = ktime_get_boot_ns() * cpus;
diff_boot = (curr_boot - activity_data->last_boot) >> 16;
diff_used = (curr_used - activity_data->last_used) >> 16;
activity_data->last_boot = curr_boot;