From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754432AbeAHRdG (ORCPT + 1 other); Mon, 8 Jan 2018 12:33:06 -0500 Received: from terminus.zytor.com ([65.50.211.136]:52721 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751372AbeAHRdC (ORCPT ); Mon, 8 Jan 2018 12:33:02 -0500 Date: Mon, 8 Jan 2018 09:29:38 -0800 From: tip-bot for Daniel Lezcano Message-ID: Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, benjamin.gaignard@st.com, daniel.lezcano@linaro.org, torvalds@linux-foundation.org Reply-To: mingo@kernel.org, peterz@infradead.org, benjamin.gaignard@st.com, torvalds@linux-foundation.org, daniel.lezcano@linaro.org, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org In-Reply-To: <1515418139-23276-9-git-send-email-daniel.lezcano@linaro.org> References: <1515418139-23276-9-git-send-email-daniel.lezcano@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] clocksource/drivers/timer-of: Store the device node pointer in 'struct timer_of' Git-Commit-ID: 1c63c1c089a48e1b1821a73dc36a3997ced2f82d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Commit-ID: 1c63c1c089a48e1b1821a73dc36a3997ced2f82d Gitweb: https://git.kernel.org/tip/1c63c1c089a48e1b1821a73dc36a3997ced2f82d Author: Daniel Lezcano AuthorDate: Mon, 8 Jan 2018 14:28:48 +0100 Committer: Ingo Molnar CommitDate: Mon, 8 Jan 2018 17:57:24 +0100 clocksource/drivers/timer-of: Store the device node pointer in 'struct timer_of' Under certain circumstances, some specific operations must be done with the device node pointer, which forces the timer code to propagate the pointer to the functions which need it. In order to consolidate the function signatures in the different drivers by using the timer-of structure, let's store it in the timer-of structure as a handy pointer when it is needed. Tested-by: Benjamin Gaignard Signed-off-by: Daniel Lezcano Acked-by: Benjamin Gaignard Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1515418139-23276-9-git-send-email-daniel.lezcano@linaro.org Signed-off-by: Ingo Molnar --- drivers/clocksource/timer-of.c | 3 +++ drivers/clocksource/timer-of.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index c1045b9..25008d2 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c @@ -200,6 +200,9 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to) if (!to->clkevt.name) to->clkevt.name = np->name; + + to->np = np; + return ret; out_fail: diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer-of.h index 3f708f1..a5478f3 100644 --- a/drivers/clocksource/timer-of.h +++ b/drivers/clocksource/timer-of.h @@ -33,6 +33,7 @@ struct of_timer_clk { struct timer_of { unsigned int flags; + struct device_node *np; struct clock_event_device clkevt; struct of_timer_base of_base; struct of_timer_irq of_irq;