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: 1870011 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id A836EDF266 for ; Wed, 12 Dec 2012 18:24:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A57F5E6665 for ; Wed, 12 Dec 2012 10:24:51 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 22D24E5C05 for ; Wed, 12 Dec 2012 01:01:14 -0800 (PST) Received: by mail-pa0-f49.google.com with SMTP id bi1so386114pad.36 for ; Wed, 12 Dec 2012 01:01:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=w3bEnwpk7aP6Jda5EPd2qgFrZen512uw41mH5zWTh2c=; b=oeT3quA9Y0E3S/3mXfE9q2/DrDQSxQlxEBk/hb37N0CYnOSBQKpbV5V/QIA3Mspdq9 HqBo4f9805uTt+c28zGRGXn1TPVMURZnNnUaHQvuukGzrqh3wyLaeOtVxdyXf9D/2DNq EQFgNJ/f/VsJcfq+oSh+FeM24YVzi7DQ25N34tEQ9CthPE4utZHRrHiWgDTIJpK/VHrO iGnRNzGn1Anna0UWr2VaBIpkt3lEttdD8wOLH4yC5NjfXiXD3iCnrn69fkSKDcWDfJAl qGVJoSPwYH+aiePl2P6poIfyFMkcyqqntn/qfVFwwF8hGqEiRwpPzY4yYAWe6efZosRk sEig== 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 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: ALoCoQlVWMVr9K0ctiLOEqr9Y7g1Odwfiry/2IORmgaWQ50D3v3ql1hzVa8negKQm2fjHAYayRIx X-Mailman-Approved-At: Wed, 12 Dec 2012 08:51:28 -0800 Cc: patches@linaro.org, sachin.kamat@linaro.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org 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,