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: 2122121 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 401973FCA4 for ; Sun, 10 Feb 2013 13:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754936Ab3BJNUy (ORCPT ); Sun, 10 Feb 2013 08:20:54 -0500 Received: from mail-ee0-f42.google.com ([74.125.83.42]:54821 "EHLO mail-ee0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754918Ab3BJNUy (ORCPT ); Sun, 10 Feb 2013 08:20:54 -0500 Received: by mail-ee0-f42.google.com with SMTP id b47so2676243eek.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 Cc: linux-samsung-soc@vger.kernel.org, Kukjin Kim , kyungmin.park@samsung.com, linux@simtec.co.uk, broonie@opensource.wolfsonmicro.com, kwangwoo.lee@gmail.com, jacmet@sunsite.dk, augulis.darius@gmail.com, mcuelenaere@gmail.com, linux@arm.linux.org.uk, Sylwester Nawrocki , arhuaco@freaks-unidos.net, buserror@gmail.com, christer@weinigel.se, guillaume.gourat@nexvision.tv, jekhor@gmail.com, danders@amltd.com, bhmin@samsung.com, ghcstop@gmail.com, Tomasz Figa 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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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");