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: 2846364 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DD3519F239 for ; Mon, 19 Aug 2013 06:46:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8D16202AB for ; Mon, 19 Aug 2013 06:46:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE81F20204 for ; Mon, 19 Aug 2013 06:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751026Ab3HSGqF (ORCPT ); Mon, 19 Aug 2013 02:46:05 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:38400 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751006Ab3HSGqE (ORCPT ); Mon, 19 Aug 2013 02:46:04 -0400 Received: by mail-pb0-f52.google.com with SMTP id wz12so4591156pbc.39 for ; Sun, 18 Aug 2013 23:46:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=et4XsNewUTCE0YnxXrS21G856YzBqftJCR4XF9ftKK4=; b=i6AbkKsvmCM2IMQNoGVJt8aYc5/uQQHG9pDX9JCZgSXKiWPcLmZuJTaLadImUkxiLS zLxws4tHAmDNg0+z4bbSTDbZcmwiQys5wsWKItl/zrdis3OKAwdDPSLRUz1Z1UCcYLbo CA/AZPQD25ngiv0+4G06ppDDCWHU/38Dxivsg1G/9kjZGx5S+WrCuTi+BfQ9c5LOyge1 MS9qmMmFMytkempwmrZIAZTY+xiSJbu6Ln2c4gGQHUo4qtyKuWbFfGne7wfMhK4fY/1T 4PJVfjRWW3938SZvVl4yW3Y5zwcof+Ukl1Qzp2SQ+OLcz+/BY/Opon6jPpRhuzkJNZ98 fc2Q== X-Gm-Message-State: ALoCoQl/DQnG6bt11TvcHxvCN3LT1dyVwEK/iLLnfqnz0waVzIoW/OG60+ciz4m4jUcwjFRRvJtz 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> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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,