From patchwork Wed Dec 12 08:54:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13488 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D026223FCE for ; Wed, 12 Dec 2012 09:01:16 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3DE08A192BB for ; Wed, 12 Dec 2012 09:01:16 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so1298859ieb.11 for ; Wed, 12 Dec 2012 01:01:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=w3bEnwpk7aP6Jda5EPd2qgFrZen512uw41mH5zWTh2c=; b=OKXF12dyTF44pT/fAXERn04Npdpdbv/XJNA+2wX3iY4uj8FWZpZ1P0otpIxDxy5rSd vSTQfd/2uJK76iriOsy/ECfxGH5lWltwzCewcaoWd3jRz0YccGM45oTYspyNo4jhBZ6Z muLScdvO2o3JguYB25XZT1eCeZ+7dfnejYLgehFRs5HdSH83rXRQJPdm1MAfNjE9t1h6 YiaQci/9LMtwnXJXvViWWt1I1EQanjKzosi6bBrv1K1vGzh8IRrHx+qLXizwszZWSD3I JWoNPR4D2WSQUquox31E6zjDefd6d9KIym27Ivu8NQao66va8YZdDCjz/4Y+F6Y/7224 5P6g== Received: by 10.43.49.199 with SMTP id vb7mr189731icb.6.1355302875609; Wed, 12 Dec 2012 01:01:15 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp186310igt; Wed, 12 Dec 2012 01:01:15 -0800 (PST) Received: by 10.68.237.6 with SMTP id uy6mr792750pbc.147.1355302874485; Wed, 12 Dec 2012 01:01:14 -0800 (PST) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx.google.com with ESMTPS id c9si4326662pax.133.2012.12.12.01.01.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 01:01:14 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.54; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f54.google.com with SMTP id bi5so406562pad.27 for ; Wed, 12 Dec 2012 01:01:14 -0800 (PST) Received: by 10.69.1.71 with SMTP id be7mr819287pbd.45.1355302873994; Wed, 12 Dec 2012 01:01:13 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ip8sm15326855pbc.36.2012.12.12.01.01.10 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 01:01:13 -0800 (PST) From: Sachin Kamat To: dri-devel@lists.freedesktop.org Cc: inki.dae@samsung.com, jy0922.shim@samsung.com, airlied@linux.ie, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/2] drm/exynos: hdmi: Add CONFIG_OF and use of_match_ptr() macro Date: Wed, 12 Dec 2012 14:24:07 +0530 Message-Id: <1355302448-21617-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQl+2PAqJB7u+E1/zm5rtBHot7SwslEwf7OplZw/3O/gE0PgR+mBZ5rIFpbRDWJHV14SKG9k Add CONFIG_OF to compile conditionally. of_match_ptr eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/exynos_ddc.c | 4 +++- drivers/gpu/drm/exynos/exynos_hdmi.c | 4 +++- drivers/gpu/drm/exynos/exynos_hdmiphy.c | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_ddc.c b/drivers/gpu/drm/exynos/exynos_ddc.c index 37e6ec7..bef43e0 100644 --- a/drivers/gpu/drm/exynos/exynos_ddc.c +++ b/drivers/gpu/drm/exynos/exynos_ddc.c @@ -48,6 +48,7 @@ static struct i2c_device_id ddc_idtable[] = { { }, }; +#ifdef CONFIG_OF static struct of_device_id hdmiddc_match_types[] = { { .compatible = "samsung,exynos5-hdmiddc", @@ -55,12 +56,13 @@ static struct of_device_id hdmiddc_match_types[] = { /* end node */ } }; +#endif struct i2c_driver ddc_driver = { .driver = { .name = "exynos-hdmiddc", .owner = THIS_MODULE, - .of_match_table = hdmiddc_match_types, + .of_match_table = of_match_ptr(hdmiddc_match_types), }, .id_table = ddc_idtable, .probe = s5p_ddc_probe, diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index bafb653..fdd353d 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2421,6 +2421,7 @@ static struct platform_device_id hdmi_driver_types[] = { } }; +#ifdef CONFIG_OF static struct of_device_id hdmi_match_types[] = { { .compatible = "samsung,exynos5-hdmi", @@ -2429,6 +2430,7 @@ static struct of_device_id hdmi_match_types[] = { /* end node */ } }; +#endif static int __devinit hdmi_probe(struct platform_device *pdev) { @@ -2645,6 +2647,6 @@ struct platform_driver hdmi_driver = { .name = "exynos-hdmi", .owner = THIS_MODULE, .pm = &hdmi_pm_ops, - .of_match_table = hdmi_match_types, + .of_match_table = of_match_ptr(hdmi_match_types), }, }; diff --git a/drivers/gpu/drm/exynos/exynos_hdmiphy.c b/drivers/gpu/drm/exynos/exynos_hdmiphy.c index 27d1720..6206056 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmiphy.c +++ b/drivers/gpu/drm/exynos/exynos_hdmiphy.c @@ -46,6 +46,7 @@ static const struct i2c_device_id hdmiphy_id[] = { { }, }; +#ifdef CONFIG_OF static struct of_device_id hdmiphy_match_types[] = { { .compatible = "samsung,exynos5-hdmiphy", @@ -53,12 +54,13 @@ static struct of_device_id hdmiphy_match_types[] = { /* end node */ } }; +#endif struct i2c_driver hdmiphy_driver = { .driver = { .name = "exynos-hdmiphy", .owner = THIS_MODULE, - .of_match_table = hdmiphy_match_types, + .of_match_table = of_match_ptr(hdmiphy_match_types), }, .id_table = hdmiphy_id, .probe = hdmiphy_probe,