From patchwork Mon Jan 8 13:28:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 123720 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2730292qgn; Mon, 8 Jan 2018 05:32:27 -0800 (PST) X-Google-Smtp-Source: ACJfBovZonIzbPxPNSykOA5vGyFBn6ReCwL7NisFNZgY5XX31MLeCffuGB03xWPCfdNb//wVgkXV X-Received: by 10.98.155.203 with SMTP id e72mr6561108pfk.170.1515418347050; Mon, 08 Jan 2018 05:32:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515418347; cv=none; d=google.com; s=arc-20160816; b=p6rjWM0+hdIOl/oWOog22Cy4/K7AMnoTv6t3aKvl8125+cy594pHIzAIqBeTop1NJu J5LpUqFvRpeXE6Hc0AP33szyubcluCYmcdM98zppKBtqB0cGCsGyzw1mFsA10OSEGBMU sqMnu01Nh0IrOQpIcUBcMztNhhmgdKMDtaowrf0fcMMTA/YhVVOVpXybsXOt9VZ3ZXYF nhQmx376ejAE4CGYSpLPnaOBGYntLJ01B/Hn/k9QPstBudYhXEcVcQJhX7piYE21IfnW 10Dt3JlXHkVUp+3VXtr1ZNK2163G6wpnbOOvIkYbUwGJVV0xSDqi0muZ2EoYKCQTrDR/ MVHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=s6TxSizBqumWA/Vt79xloB5Yp2mzrmWhzusNe6bUM6k=; b=pIY/XtCRFVL1oD28NuSg21fb1OGAWGf1gDiG88nzkZMkyiUQxqb1lUW2pczXww07f5 PPmy5D6t11HDDZVQDhcic8QtPP+PLsUkRi08h1Qs0OOTt3ZAX/sjKI6bG4M1jFxZ9Qwc JXz9nzYMYOJgNMaBqlG+Sfi3H3RW0qxoyTWCx01FPhU1uwj0QEdOlPJciqvOOU47TxIj 9amxzqhbHDofQLW3/pbDrc3ZNw99sCU/yGhtrC6C8Afr/bzyBPaqj7AL1glxxu4Y9KoW XHHvjqZFQziWXivvvmKDLlRsEj6GAGrP9mzipGn6bhfxGOjD3zJSHanJNf9ZoEgs75E3 7Pyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZgO/oRMK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l15si5731640pgs.19.2018.01.08.05.32.26; Mon, 08 Jan 2018 05:32:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZgO/oRMK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933376AbeAHN3q (ORCPT + 28 others); Mon, 8 Jan 2018 08:29:46 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:40246 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933350AbeAHN3j (ORCPT ); Mon, 8 Jan 2018 08:29:39 -0500 Received: by mail-wm0-f67.google.com with SMTP id f206so14201320wmf.5 for ; Mon, 08 Jan 2018 05:29:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=s6TxSizBqumWA/Vt79xloB5Yp2mzrmWhzusNe6bUM6k=; b=ZgO/oRMKUg/0a1Fg2uETJhiEUwgNQ16GiVtGXu96bbgU9NcOGzJIt6zCug1gYmO2Rj eKS0xJ0k1udLCoySk6Sb4XV/hx3YSSswsp6cZTVSL1A8+LVm6kcBfuw/n217LVcBMBnP 1SmgcPBm2PoWYwoikiiiKNnmJ1UrHqP8W77ew= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=s6TxSizBqumWA/Vt79xloB5Yp2mzrmWhzusNe6bUM6k=; b=l+FEo6Pjjagn7rW2VNySLnNeMXFutgB+xqOZGHPXC1b2bPGcQrPLa1fpMrQgehBl+Q 2/KZTV2YS5kVtgpm0To1v2ZEpA1YDJ2rPBo4svUUGi1omyUnIJx+fD3JFSpE/fXg7z6e lSmTvEHgvwI/Iq6K3wBJB9BPopGEegzapjXPbrBZI+V4y++skoxQw9ZCABLnsaXmWN34 EwPP4IU9MjZHISJqZimLP+3ezG6joIuuyLj62wi1UZmT2wxlh342SS4k8D6uc1lSGePl 4p78J5S0W7yjf9t3E6PlUqzrzVKf/aqy7zfD3On62DnhqTYmuFc7iqDegmJPkmHwgTzH jy4A== X-Gm-Message-State: AKGB3mL6Dn5XzW337JkVwlWe0ekIrU+PYWprequ209loWxlfb9ozcqmt OcKjLFpKG3h202mzw3nqcJIAtEY/WOg= X-Received: by 10.28.9.77 with SMTP id 74mr8575988wmj.107.1515418178633; Mon, 08 Jan 2018 05:29:38 -0800 (PST) Received: from mai.lan ([2001:41d0:fe90:b800:312a:53a5:1bef:6622]) by smtp.gmail.com with ESMTPSA id q196sm14354222wmb.22.2018.01.08.05.29.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Jan 2018 05:29:38 -0800 (PST) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH 09/20] clocksource/drivers/timer-of: Store the device node pointer Date: Mon, 8 Jan 2018 14:28:48 +0100 Message-Id: <1515418139-23276-9-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515418139-23276-1-git-send-email-daniel.lezcano@linaro.org> References: <1bbaef2e-4080-3f54-7db3-a8989acfd691@free.fr> <1515418139-23276-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Under certain circumstances, some specific operations must be done with the device node pointer, that 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. Signed-off-by: Daniel Lezcano Tested-by: Benjamin Gaignard Acked-by: Benjamin Gaignard --- drivers/clocksource/timer-of.c | 3 +++ drivers/clocksource/timer-of.h | 1 + 2 files changed, 4 insertions(+) -- 2.7.4 diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index 2af8b8a..2ae348b 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c @@ -201,6 +201,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;