From patchwork Mon Jun 18 14:41:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 138981 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4036038lji; Mon, 18 Jun 2018 07:42:39 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLiaCYiIRvZusTqCPKlrNMrINUA4kx79J9QsAOmTEJcyJSrA490DD5mhSXUVzMgcJjOAIRa X-Received: by 2002:a62:444c:: with SMTP id r73-v6mr13830322pfa.255.1529332959240; Mon, 18 Jun 2018 07:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529332959; cv=none; d=google.com; s=arc-20160816; b=iJp4fRcyRE5UoiyvHmYotuCLVOG+7VFT1LcyxQ/QQzDpFjNdqB0Lv9Dq2TBml0v8jG CWzv2+CAazO2krJc4USteZyE6k1XYDy5aZzem+KGlyluWwY24LsHjxUKV5j9t3P0p1f6 z75BocDomIorLb0C1nqIcZpCkleVUwtJxZ/jMz6NBQF99F6CBEoMW+JODGGaXHowrYGb YriPtSCASOLSO8FCPazOUkgcX18oBRbmdFMTJjv6vgKHs14uYkg09D+HoGuuKw7GNZN5 YmrlrVFFaGvOqwoVphWXAuBRYX50CLXHmn7q3ChHHba5hszE3nxLkpuEuV1uH1Bu+Ovd qNUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=LB2m5S8Sof5fq5m5xFLGXFR8Jj+YLmQ27a+jncXMxDc=; b=lCE3v/81Qj/d28gqfl8skcYvLYRxA2oPUof6qvdpG9p8E3fwte3+b6PKyM5S3Yd3rF Y2R8ewpxiEaKcuNShMSAj0iUxVbBB5B/LoXmTy0wnLFfDS8x70SGUW7dCAoyp89VMfQS uz3ZbtAkeL1ersITAS5Omoz6ra+GuvMhKacAIjId0rqAu9qY2pXm/ZP69Xm21GsFLddp lprVhbyHuUfUfoR+m+N6HlkUBj9dVutBHBVKCnotIPjs+O5xTHTjZ07Cb0XjfaccMJ16 Ep5LfDSyRzNBqdYecVW94g1OKr8gkBv39uFXR7B1G2T37eeS0JA8t87C0jty9EzYZpKN h2gA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a16-v6si13890315pff.43.2018.06.18.07.42.39; Mon, 18 Jun 2018 07:42:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934731AbeFROmi (ORCPT + 1 other); Mon, 18 Jun 2018 10:42:38 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:55119 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934109AbeFROmh (ORCPT ); Mon, 18 Jun 2018 10:42:37 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0LjODj-1g4GZn3bKx-00daJU; Mon, 18 Jun 2018 16:42:12 +0200 From: Arnd Bergmann To: Jacek Anaszewski , Pavel Machek Cc: y2038@lists.linaro.org, Arnd Bergmann , Kees Cook , Willy Tarreau , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] leds: ledtrig-activity: use ktime_get_boot_ns() Date: Mon, 18 Jun 2018 16:41:44 +0200 Message-Id: <20180618144210.72367-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:9A33qaBXXy9tzEbZfQ8vgBxKsvDiV+++sRqTUvligdOlcDdsdyp rABB29DQycDJYKEI1flmQmZHqxgbSdBuGNALJCLeOETamVM1KkACA6mI/NV1zq3wsCcD3u4 1NZMZVARx7wiG1g3CuJE3HgM8dqhBFoxFRKlGMFFFZj6Tx7fjFo+ozlsbRJRmH4EwiAq2Ft yCc5q2jGbOGbyaP2nO5QA== X-UI-Out-Filterresults: notjunk:1; V01:K0:G150xayh6Os=:SdW/y1z+8HAjiVBnQoPwAP MUZ7jUtGIYE8lafnpo/UG127x38CzNmN9hzIVxjJuBExw+zu8oWpjz0TUxlXGvy7O0sM7hjX0 VzrkyMM4O+bN8zqemnB+oA4wLM2pgZbTe8HFzeVonKkYA6F/HatAWR1L8Br6vgulTkthOQWoj c74wCm7m2SXQ2IXsoWBoT12wCcOzsbIu/JgCMfFlQOoZkjbBTx5IQHYBXhFx4eUYqzYVZ53O2 nbq6gMPnUFIPYbwjOZyA0vDyP2A3zvIPaHMcW0yuZlYLNTrsaWwDJDgd4fB049FQmbLIA55zB AlYgtaNe9KE3KkXVNEnu3VSGFD01mHHK6BX4Z4aHARfSwtSq5MVzuNYuISwwbqEx43VKAnPNT m3XPDpwmRFBD0tJC/HgiQaK3tmm7Yq5DGB3WxRt+kqKZCxipqakxY98vxRrEOPNo0Cb9e1+Lp R+qLqTFscchEwtBMPlRDF8DLZchrJUnm9tpJgMMdSKQjVklu6dRp1lY3S4wa4BlnnOcsPUrxX pUQb94zYwTMmxHicdVXX7rmwVmHF9eLYYC0KBnxL0hslP4P5EvJvYx3g5BKaDp12LK1+vE1xP ZZi+kQx7XPLUEYo8OHTBa+W8ZIZbZVd7tU8ShJ5n4ddhmMSdiYq8mAwUQA5hAbFP5/IR/4iaN 5N0bQqZ3R2zJhdB2rhPduu7Wy4xgGl20hBq/oJZj+eObcxciJQiI+8S+x8UTuYdzDkDc= Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org get_monotonic_boottime() is deprecated, so let's convert this to the simpler ktime_get_boot_ns(). Signed-off-by: Arnd Bergmann --- drivers/leds/trigger/ledtrig-activity.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.9.0 diff --git a/drivers/leds/trigger/ledtrig-activity.c b/drivers/leds/trigger/ledtrig-activity.c index 5081894082bd..589c1bc4d0b9 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,7 +56,7 @@ static void led_activity_function(struct timer_list *t) return; } - get_monotonic_boottime(&boot_time); + curr_boot = ktime_get_boot_ns(); cpus = 0; curr_used = 0; @@ -76,7 +75,6 @@ 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; diff_boot = (curr_boot - activity_data->last_boot) >> 16; diff_used = (curr_used - activity_data->last_used) >> 16; activity_data->last_boot = curr_boot;