From patchwork Mon Aug 19 06:28:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 19286 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E8DB325AC6 for ; Mon, 19 Aug 2013 06:46:05 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id a41sf3685123yho.8 for ; Sun, 18 Aug 2013 23:46:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=et4XsNewUTCE0YnxXrS21G856YzBqftJCR4XF9ftKK4=; b=h1VCquRKNE/yO8Qlu088oLzYduw8MgHjLB+b/9MZxpTSdEqTX+v0D0WJI2M9DxgUMl u7x66qvnYdWuVQH30if5YMksvAaha1ErZrIfu+nHGzk1ddIdJC52oZwV1dqJkMvrcGKO Dq5qfEW0MSXwy5BokTl6CPhThlbvz4FKx7LGbT1WHSDD/cCcVwtcEDiGodpF7A81a08K pOo+Sv9JakZYB8BE4ODoZuxeKVqQTstRpKZYzttN8tvmcl2i0PXKSYsL5PEKOdmKH35h x1PvxXtxbK0bMRt/Mz2JJ5Rmglimv6YF66ehSX9sIYTNbvwn6ImDidOqo/W5Ib8bunVR yiFw== X-Received: by 10.236.2.5 with SMTP id 5mr3626237yhe.23.1376894765776; Sun, 18 Aug 2013 23:46:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.47.113 with SMTP id c17ls1685366qen.30.gmail; Sun, 18 Aug 2013 23:46:05 -0700 (PDT) X-Received: by 10.52.0.52 with SMTP id 20mr4121512vdb.22.1376894765665; Sun, 18 Aug 2013 23:46:05 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id w20si2104331vco.68.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 18 Aug 2013 23:46:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id cy12so2807471veb.32 for ; Sun, 18 Aug 2013 23:46:05 -0700 (PDT) X-Gm-Message-State: ALoCoQnTaBhlns3perCFe0NVwgpXRZZceCorufQkKzyMhBmu6D2bJv+I9rn/11tD9bOfOJ994FX8 X-Received: by 10.52.0.52 with SMTP id 20mr4121507vdb.22.1376894765579; Sun, 18 Aug 2013 23:46:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp79803vcz; Sun, 18 Aug 2013 23:46:05 -0700 (PDT) X-Received: by 10.66.196.110 with SMTP id il14mr1398615pac.130.1376894764656; Sun, 18 Aug 2013 23:46:04 -0700 (PDT) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id xq4si7450520pab.115.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 18 Aug 2013 23:46:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id jt11so4640388pbb.10 for ; Sun, 18 Aug 2013 23:46:04 -0700 (PDT) X-Received: by 10.66.186.12 with SMTP id fg12mr140509pac.178.1376894764260; Sun, 18 Aug 2013 23:46:04 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id iu10sm13648506pac.18.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 18 Aug 2013 23:46:03 -0700 (PDT) From: Sachin Kamat To: linux-pm@vger.kernel.org Cc: jonghwa3.lee@samsung.com, eduardo.valentin@ti.com, rui.zhang@intel.com, amit.daniel@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 3/3] thermal: exynos: Clean up non-DT remnants Date: Mon, 19 Aug 2013 11:58:43 +0530 Message-Id: <1376893723-22138-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1376893723-22138-1-git-send-email-sachin.kamat@linaro.org> References: <1376893723-22138-1-git-send-email-sachin.kamat@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Commit 1cd1ecb6 ("thermal: exynos: Remove non DT based support") cleaned up some non-DT code. However, there were few more things needed for complete cleanup to make this driver DT only. Signed-off-by: Sachin Kamat Acked-by: Eduardo Valentin --- drivers/thermal/samsung/Kconfig | 2 +- drivers/thermal/samsung/exynos_tmu.c | 30 ++++++++++++------------------ 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/drivers/thermal/samsung/Kconfig b/drivers/thermal/samsung/Kconfig index 92492e4..f760389 100644 --- a/drivers/thermal/samsung/Kconfig +++ b/drivers/thermal/samsung/Kconfig @@ -1,6 +1,6 @@ config EXYNOS_THERMAL tristate "Exynos thermal management unit driver" - depends on ARCH_HAS_BANDGAP + depends on ARCH_HAS_BANDGAP && OF help If you say yes here you get support for the TMU (Thermal Management Unit) driver for SAMSUNG EXYNOS series of SoCs. This driver initialises diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index a033dbb..b43afda 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -481,7 +481,6 @@ static irqreturn_t exynos_tmu_irq(int irq, void *id) return IRQ_HANDLED; } -#ifdef CONFIG_OF static const struct of_device_id exynos_tmu_match[] = { { .compatible = "samsung,exynos4210-tmu", @@ -502,27 +501,22 @@ static const struct of_device_id exynos_tmu_match[] = { {}, }; MODULE_DEVICE_TABLE(of, exynos_tmu_match); -#endif static inline struct exynos_tmu_platform_data *exynos_get_driver_data( struct platform_device *pdev, int id) { -#ifdef CONFIG_OF struct exynos_tmu_init_data *data_table; struct exynos_tmu_platform_data *tmu_data; - if (pdev->dev.of_node) { - const struct of_device_id *match; - match = of_match_node(exynos_tmu_match, pdev->dev.of_node); - if (!match) - return NULL; - data_table = (struct exynos_tmu_init_data *) match->data; - if (!data_table || id >= data_table->tmu_count) - return NULL; - tmu_data = data_table->tmu_data; - return (struct exynos_tmu_platform_data *) (tmu_data + id); - } -#endif - return NULL; + const struct of_device_id *match; + + match = of_match_node(exynos_tmu_match, pdev->dev.of_node); + if (!match) + return NULL; + data_table = (struct exynos_tmu_init_data *) match->data; + if (!data_table || id >= data_table->tmu_count) + return NULL; + tmu_data = data_table->tmu_data; + return (struct exynos_tmu_platform_data *) (tmu_data + id); } static int exynos_map_dt_data(struct platform_device *pdev) @@ -532,7 +526,7 @@ static int exynos_map_dt_data(struct platform_device *pdev) struct resource res; int ret; - if (!data) + if (!data || !pdev->dev.of_node) return -ENODEV; /* @@ -754,7 +748,7 @@ static struct platform_driver exynos_tmu_driver = { .name = "exynos-tmu", .owner = THIS_MODULE, .pm = EXYNOS_TMU_PM, - .of_match_table = of_match_ptr(exynos_tmu_match), + .of_match_table = exynos_tmu_match, }, .probe = exynos_tmu_probe, .remove = exynos_tmu_remove,