linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG
	EXYNOS ARM ARCHITECTURES),
	linux-samsung-soc@vger.kernel.org (moderated list:ARM/SAMSUNG
	EXYNOS ARM ARCHITECTURES)
Subject: [PATCH 08/18] clocksource/drivers/exynos_mct: Remove dead code
Date: Sat, 23 Feb 2019 14:06:56 +0100	[thread overview]
Message-ID: <20190223130707.16704-8-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <20190223130707.16704-1-daniel.lezcano@linaro.org>

From: Marek Szyprowski <m.szyprowski@samsung.com>

Exynos Multi-Core Timer driver is used only on device-tree based
systems, so remove non-dt related code. In case of !CONFIG_OF
the code is anyway equal because of_irq_count() has a stub
returning 0. Device node pointer is always provided when driver
has been probed from device tree.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/exynos_mct.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index d55c30f6981d..647ea9fc752f 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -508,13 +508,12 @@ static int __init exynos4_timer_resources(struct device_node *np, void __iomem *
 	int err, cpu;
 	struct clk *mct_clk, *tick_clk;
 
-	tick_clk = np ? of_clk_get_by_name(np, "fin_pll") :
-				clk_get(NULL, "fin_pll");
+	tick_clk = of_clk_get_by_name(np, "fin_pll");
 	if (IS_ERR(tick_clk))
 		panic("%s: unable to determine tick clock rate\n", __func__);
 	clk_rate = clk_get_rate(tick_clk);
 
-	mct_clk = np ? of_clk_get_by_name(np, "mct") : clk_get(NULL, "mct");
+	mct_clk = of_clk_get_by_name(np, "mct");
 	if (IS_ERR(mct_clk))
 		panic("%s: unable to retrieve mct clock instance\n", __func__);
 	clk_prepare_enable(mct_clk);
@@ -582,11 +581,7 @@ static int __init mct_init_dt(struct device_node *np, unsigned int int_type)
 	 * timer irqs are specified after the four global timer
 	 * irqs are specified.
 	 */
-#ifdef CONFIG_OF
 	nr_irqs = of_irq_count(np);
-#else
-	nr_irqs = 0;
-#endif
 	for (i = MCT_L0_IRQ; i < nr_irqs; i++)
 		mct_irqs[i] = irq_of_parse_and_map(np, i);
 
-- 
2.17.1


  parent reply	other threads:[~2019-02-23 13:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-23 13:05 [GIT PULL] clockevents for 5.1 Daniel Lezcano
2019-02-23 13:06 ` [PATCH 01/18] clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable Daniel Lezcano
2019-02-23 13:06   ` [PATCH 02/18] clocksource/drivers/arch_timer: Workaround for Allwinner A64 timer instability Daniel Lezcano
     [not found]     ` <20190226212356.C6B68218A2@mail.kernel.org>
2019-02-27  2:55       ` Samuel Holland
2019-02-23 13:06   ` [PATCH 03/18] clocksource/drivers/exynos_mct: Move one-shot check from tick clear to ISR Daniel Lezcano
2019-02-23 13:06   ` [PATCH 04/18] clocksource/drivers/exynos_mct: Clear timer interrupt when shutdown Daniel Lezcano
2019-02-23 13:06   ` [PATCH 05/18] dt-bindings: timer: renesas, cmt: Document r8a774c0 CMT support Daniel Lezcano
2019-02-23 13:06   ` [PATCH 06/18] dt-bindings: timer: renesas: tmu: Document r8a774c0 bindings Daniel Lezcano
2019-02-23 13:06   ` [PATCH 07/18] clocksource/drivers/riscv: Add required checks during clock source init Daniel Lezcano
2019-02-23 13:06   ` Daniel Lezcano [this message]
2019-02-23 13:06   ` [PATCH 09/18] clocksource/drivers/exynos_mct: Fix error path in timer resources initialization Daniel Lezcano
2019-02-23 13:06   ` [PATCH 10/18] dt-bindings: timer: mediatek: update bindings for MT7629 SoC Daniel Lezcano
2019-02-23 13:06   ` [PATCH 11/18] clocksource/drivers/exynos_mct: Remove unused header includes Daniel Lezcano
2019-02-23 13:07   ` [PATCH 12/18] dt-bindings: timer: gpt: update binding doc Daniel Lezcano
2019-02-23 13:07   ` [PATCH 13/18] clocksource/drivers/tango-xtal: Rename the file for consistency Daniel Lezcano
2019-02-23 13:07   ` [PATCH 14/18] clocksource/drivers/timer-pxa: " Daniel Lezcano
2019-02-23 13:07   ` [PATCH 15/18] clocksource/drivers/timer-cs5535: " Daniel Lezcano
2019-02-23 13:07   ` [PATCH 16/18] dt-bindings: timer: add Tegra210 timer Daniel Lezcano
2019-02-23 13:07   ` [PATCH 17/18] clocksource/drivers/tegra: Add Tegra210 timer support Daniel Lezcano
2019-02-23 13:07   ` [PATCH 18/18] soc/tegra: default select TEGRA_TIMER for Tegra210 Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190223130707.16704-8-daniel.lezcano@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).