From patchwork Sat Feb 16 16:43:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2151961 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 07488DF2A1 for ; Sat, 16 Feb 2013 16:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753689Ab3BPQpE (ORCPT ); Sat, 16 Feb 2013 11:45:04 -0500 Received: from mail-ee0-f42.google.com ([74.125.83.42]:61523 "EHLO mail-ee0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753551Ab3BPQpD (ORCPT ); Sat, 16 Feb 2013 11:45:03 -0500 Received: by mail-ee0-f42.google.com with SMTP id b47so2195057eek.15 for ; Sat, 16 Feb 2013 08:45:02 -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=7COL+BfNEsQeoROYHeq1citbpg/MkqKjrT/xACIqRFw=; b=BovcOdkGmk+POAmx0e/jTyHG1qppyPOEkOYDW56OwPsDPPhVtXczlefsFMPpSwVNq4 dlcS5ljxFxkB7eYJ9ckAZZcQRoQQerTcTaDVCQgEDlAH2RsfyZYDHkUaEfuK4elYxsRW IZMPrHDoX7+Oy9tGWmN6m3swFyf2Tv5O4gwI9GEcAgAh20ZJnejrS75bjbqstnP6qvDG yQLp+K3tPe5AB7nM/Be+RYr26/moIyr6DiMsSuqVDlsZN3afGwnVyU4NAXG5mfco0dfR /2JAEFDg6sUz/VPtkyaF77EuJlMge6HZQxqh5RCfQERMVSYP7kEXdhVmyRvfsUr06Lg+ 0BPw== X-Received: by 10.14.182.137 with SMTP id o9mr22362530eem.13.1361033102416; Sat, 16 Feb 2013 08:45:02 -0800 (PST) Received: from flatron.tomeq (87-207-52-162.dynamic.chello.pl. [87.207.52.162]) by mx.google.com with ESMTPS id f47sm43609113eep.13.2013.02.16.08.45.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 16 Feb 2013 08:45:01 -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 , buserror@gmail.com, christer@weinigel.se, jekhor@gmail.com, ghcstop@gmail.com, Mark Rutland , Tomasz Figa Subject: [PATCH v2 07/12] clocksource: samsung-time: Use clk_get_sys for getting clocks Date: Sat, 16 Feb 2013 17:43:59 +0100 Message-Id: <1361033044-27629-8-git-send-email-tomasz.figa@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1361033044-27629-1-git-send-email-tomasz.figa@gmail.com> References: <1361033044-27629-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 f1e54f9..5ecc864 100644 --- a/drivers/clocksource/samsung-time.c +++ b/drivers/clocksource/samsung-time.c @@ -24,8 +24,6 @@ #include #include -#include - static void __iomem *timer_base; #define S3C_TIMERREG(x) (timer_base + (x)) @@ -336,9 +334,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; } @@ -486,28 +481,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");