From patchwork Thu Jan 4 12:50:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 123409 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp11389327qgn; Thu, 4 Jan 2018 04:51:09 -0800 (PST) X-Google-Smtp-Source: ACJfBovDN7ZM5rvM06SR9v5SdYWIZCug7P1+BHFsyBO42Xhvkk47d49rhzM7C9vA5W875qeOKcnr X-Received: by 10.99.140.83 with SMTP id q19mr3917512pgn.230.1515070269246; Thu, 04 Jan 2018 04:51:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515070269; cv=none; d=google.com; s=arc-20160816; b=vNT7mpv0J/Om2C8Mrei9uoBmaTsCysKzw/B74RoyttREPToiTr+MpopYEVyVAeoCP2 XUt4WFl983uy/+HtTNVZq7DUi+EhqjlcbmzHFeNgH9q0UWM5igd25KEt3IGWFATjfF/S lzSmAjDGSeqvo/VopP0l+9Jw63nNKKdhtCywnkQUuNhlP/A2sNNp/VoGLX/eKsHWZ08k yr76kwtxxL9vsxhHcpGBa/MarF2V3C9YJHlGBHYK7BKrbW3UuxWlOsfp2zj6XjxvVcSK tODUjJtIoXj5BaKyNX6y8q6nJbOzLtCunnrpjezTdCxBmf0GottkdtyQqsR7k2ZfxFAE W3Ew== 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=k8iW1gmaR89FbbhKKjmo7bisZ5FPPfJlYckZ3ehXc3o=; b=ui7lLInFm5lr6IuK8rNjRct+4PWCA03Onu1D9xLISuU8K9LapWTbiNkjuqHeP5HUa1 os6JJA8cBfkgrZmAmCFklD1AhlGPtA+JEwzpyfAfOuiDjY02FppZrW9uaSi4Ub/DD/SV reFIEMJbGi3J0aPF5j5jaqbcRoXjiwj27srGGFKFfdN/iVjLD4OSgi/0+sdNj65tVbc4 XfKtJn36QzbsZo/9w/+hYMFWaa4UWHqqJCxQBQvAI2eyWM5beYE8eM9kC5CO1Cb8oGB7 qbd0G/pZtoF7JUwQgX/4MYUyvbXUwyEATluqQyt+Hh4kI97Zbyz0/HQIEBBH0ylftzML srqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UViljjD8; 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 c80si2283237pfb.307.2018.01.04.04.51.08; Thu, 04 Jan 2018 04:51:09 -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=UViljjD8; 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 S1752582AbeADMvF (ORCPT + 27 others); Thu, 4 Jan 2018 07:51:05 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:37587 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752460AbeADMvE (ORCPT ); Thu, 4 Jan 2018 07:51:04 -0500 Received: by mail-wm0-f68.google.com with SMTP id f140so3227878wmd.2 for ; Thu, 04 Jan 2018 04:51:03 -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=k8iW1gmaR89FbbhKKjmo7bisZ5FPPfJlYckZ3ehXc3o=; b=UViljjD8XQTyRMHYeWGJUQVFsqcZP2/Ikdj550M+XfwgJ/n4Gyum97USK0KOafsdXf jpDshUSLuCcvdayiGV3CmLqCQH/KoeTpx+M+LkKia4hZulde6Qdr2mf8Xf5M5vxDOKq0 yqu02NVsrtkps1g9geFEM4Bcgh0LKFM+alNH0= 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=k8iW1gmaR89FbbhKKjmo7bisZ5FPPfJlYckZ3ehXc3o=; b=ooNW6uARPCot+TOD890GI7TkGJa2pRvbofnzm3KfbWf+jxAt98fQhOT8ezRwA3H9O0 7WcnP/d0nuZoWNI3ttNKjsToX3fc+G0fEvXPqBc1Jt1dELCC8ivabo0oQzoW/qzxNFBN r1WFB71qD5jF9nWCC2tP0wgpWqetKOpa1cSreirlEy+PR11CzrAGG6Y4M5CAtsFVgNTq HCI6sXbq3T3lVxIjabTXh6+Q7oPOHNz0dx5uA+yH5V2/VFMZBFSmBJwsN+3Vm+tdSLQM SotYe5mFcolzJcw0v3UiE08pBiA9787G4jfFByZg/fLFWby6i0KE+LP6+KsS0go8SzM1 Hfsw== X-Gm-Message-State: AKGB3mL5Cv+mTaLfQrWbKMG6w/fxY1HBqPFrc7Wd40UZP3j013ShNSSb Qj09yGWtaVk5CuLe87VBgyiPRA== X-Received: by 10.28.61.87 with SMTP id k84mr3833581wma.48.1515070262991; Thu, 04 Jan 2018 04:51:02 -0800 (PST) Received: from mai.lan ([2001:41d0:fe90:b800:c10d:405d:d60:60bb]) by smtp.gmail.com with ESMTPSA id d71sm3668348wma.7.2018.01.04.04.51.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Jan 2018 04:51:02 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org, tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, benjamin.gaignard@linaro.org Subject: [PATCH 01/12] clocksource/drivers/timer-of: Store the device node pointer Date: Thu, 4 Jan 2018 13:50:17 +0100 Message-Id: <1515070228-10481-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515070228-10481-1-git-send-email-daniel.lezcano@linaro.org> References: <1515070228-10481-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 --- 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 f521477..2efa8ec 100644 --- a/drivers/clocksource/timer-of.h +++ b/drivers/clocksource/timer-of.h @@ -32,6 +32,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;