From patchwork Sun Feb 10 13:20:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2122251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3F5EDDF24C for ; Sun, 10 Feb 2013 13:24:58 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U4WrF-0004Ij-8m; Sun, 10 Feb 2013 13:22:13 +0000 Received: from mail-ea0-f170.google.com ([209.85.215.170]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U4Wq0-0003uH-If for linux-arm-kernel@lists.infradead.org; Sun, 10 Feb 2013 13:20:58 +0000 Received: by mail-ea0-f170.google.com with SMTP id a11so2258893eaa.15 for ; Sun, 10 Feb 2013 05:20:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=AG8DpVdly5tqSwOzu3Cdlp6DqOGynzb0QEtu7QF06t4=; b=F0miE2EcBeAs3er27KaewxDiJCwcgkqSCVrTkdkdQn5gTIErY+uUI9xlkyXV4Q9fhp HPNRdkQntNUQ8u9OuYgJDnnyxYPrScQKsJ+SquiQPjaUSss5d0ARgWWKo11E6BRO7MSO cpnCFHXY1W963B+XKNz/Z6UvNyMVS/z8tbeZR/9RW91O6OslintGOQhBmMuTjX4764qh nE3tMpG91d+/w/vWMKo18SiSVmkR1RRGv6tqk6nFoRxELtMOS2kgYXrxRE9R12yIoRtH IMZ4tVsXPDsuYhuktUS7+Mjis0/CBMj17TGEcs9QNEJyG3NQXeH+XnOk0eogXtl6jwW4 HQOA== X-Received: by 10.14.206.132 with SMTP id l4mr38375341eeo.38.1360502453308; Sun, 10 Feb 2013 05:20:53 -0800 (PST) Received: from flatron.tomeq (87-207-52-162.dynamic.chello.pl. [87.207.52.162]) by mx.google.com with ESMTPS id 44sm57225596eek.5.2013.02.10.05.20.50 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 10 Feb 2013 05:20:52 -0800 (PST) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 07/12] clocksource: samsung-time: Use clk_get_sys for getting clocks Date: Sun, 10 Feb 2013 14:20:18 +0100 Message-Id: <1360502423-2246-8-git-send-email-tomasz.figa@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1360502423-2246-1-git-send-email-tomasz.figa@gmail.com> References: <1360502423-2246-1-git-send-email-tomasz.figa@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130210_082056_799626_FE54CC58 X-CRM114-Status: UNSURE ( 9.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.170 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomasz.figa[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: arhuaco@freaks-unidos.net, Kukjin Kim , linux@arm.linux.org.uk, kwangwoo.lee@gmail.com, guillaume.gourat@nexvision.tv, bhmin@samsung.com, broonie@opensource.wolfsonmicro.com, mcuelenaere@gmail.com, Tomasz Figa , christer@weinigel.se, danders@amltd.com, kyungmin.park@samsung.com, linux-samsung-soc@vger.kernel.org, buserror@gmail.com, augulis.darius@gmail.com, jacmet@sunsite.dk, Sylwester Nawrocki , ghcstop@gmail.com, linux@simtec.co.uk, jekhor@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch removes the need to reference platform_device structs defined in platform code, by using clk_get_sys instead of clk_get for getting necessary clocks. Signed-off-by: Tomasz Figa --- drivers/clocksource/samsung-time.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/clocksource/samsung-time.c b/drivers/clocksource/samsung-time.c index d847036..29fc63f 100644 --- a/drivers/clocksource/samsung-time.c +++ b/drivers/clocksource/samsung-time.c @@ -23,8 +23,6 @@ #include #include -#include - static void __iomem *timer_base; #define S3C_TIMERREG(x) (timer_base + (x)) @@ -335,9 +333,6 @@ static void samsung_timer_resume(void) void __init samsung_set_timer_source(enum samsung_timer_mode event, enum samsung_timer_mode source) { - s3c_device_timer[event].dev.bus = &platform_bus_type; - s3c_device_timer[source].dev.bus = &platform_bus_type; - timer_source.event_id = event; timer_source.source_id = source; } @@ -485,28 +480,24 @@ static void __init samsung_timer_resources(void) clk_enable(timerclk); sprintf(devname, "s3c24xx-pwm.%lu", event_id); - s3c_device_timer[event_id].id = event_id; - s3c_device_timer[event_id].dev.init_name = devname; - tin_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tin"); + tin_event = clk_get_sys(devname, "pwm-tin"); if (IS_ERR(tin_event)) panic("failed to get pwm-tin clock for event timer"); - tdiv_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tdiv"); + tdiv_event = clk_get_sys(devname, "pwm-tdiv"); if (IS_ERR(tdiv_event)) panic("failed to get pwm-tdiv clock for event timer"); clk_enable(tin_event); sprintf(devname, "s3c24xx-pwm.%lu", source_id); - s3c_device_timer[source_id].id = source_id; - s3c_device_timer[source_id].dev.init_name = devname; - tin_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tin"); + tin_source = clk_get_sys(devname, "pwm-tin"); if (IS_ERR(tin_source)) panic("failed to get pwm-tin clock for source timer"); - tdiv_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tdiv"); + tdiv_source = clk_get_sys(devname, "pwm-tdiv"); if (IS_ERR(tdiv_source)) panic("failed to get pwm-tdiv clock for source timer");