diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-12-12 03:54:07 -0500 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-12-14 01:40:50 -0500 |
commit | 65da03507735f288b2c6250def1f5142bf6d5667 (patch) | |
tree | ad46ab73bf63081b88ce5cffa8c1712aabfaa92d /drivers/gpu/drm/exynos | |
parent | a55622570dc3e2d294db2ca7677cc32d65dfbf33 (diff) |
drm/exynos: hdmi: Add CONFIG_OF and use of_match_ptr() macro
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 <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_ddc.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_hdmi.c | 4 | ||||
-rw-r--r-- | 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 37e6ec704e1d..bef43e0342a6 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[] = { | |||
48 | { }, | 48 | { }, |
49 | }; | 49 | }; |
50 | 50 | ||
51 | #ifdef CONFIG_OF | ||
51 | static struct of_device_id hdmiddc_match_types[] = { | 52 | static struct of_device_id hdmiddc_match_types[] = { |
52 | { | 53 | { |
53 | .compatible = "samsung,exynos5-hdmiddc", | 54 | .compatible = "samsung,exynos5-hdmiddc", |
@@ -55,12 +56,13 @@ static struct of_device_id hdmiddc_match_types[] = { | |||
55 | /* end node */ | 56 | /* end node */ |
56 | } | 57 | } |
57 | }; | 58 | }; |
59 | #endif | ||
58 | 60 | ||
59 | struct i2c_driver ddc_driver = { | 61 | struct i2c_driver ddc_driver = { |
60 | .driver = { | 62 | .driver = { |
61 | .name = "exynos-hdmiddc", | 63 | .name = "exynos-hdmiddc", |
62 | .owner = THIS_MODULE, | 64 | .owner = THIS_MODULE, |
63 | .of_match_table = hdmiddc_match_types, | 65 | .of_match_table = of_match_ptr(hdmiddc_match_types), |
64 | }, | 66 | }, |
65 | .id_table = ddc_idtable, | 67 | .id_table = ddc_idtable, |
66 | .probe = s5p_ddc_probe, | 68 | .probe = s5p_ddc_probe, |
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 68936e6aa6ab..e009216e4a3c 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c | |||
@@ -2440,6 +2440,7 @@ static struct platform_device_id hdmi_driver_types[] = { | |||
2440 | } | 2440 | } |
2441 | }; | 2441 | }; |
2442 | 2442 | ||
2443 | #ifdef CONFIG_OF | ||
2443 | static struct of_device_id hdmi_match_types[] = { | 2444 | static struct of_device_id hdmi_match_types[] = { |
2444 | { | 2445 | { |
2445 | .compatible = "samsung,exynos5-hdmi", | 2446 | .compatible = "samsung,exynos5-hdmi", |
@@ -2448,6 +2449,7 @@ static struct of_device_id hdmi_match_types[] = { | |||
2448 | /* end node */ | 2449 | /* end node */ |
2449 | } | 2450 | } |
2450 | }; | 2451 | }; |
2452 | #endif | ||
2451 | 2453 | ||
2452 | static int __devinit hdmi_probe(struct platform_device *pdev) | 2454 | static int __devinit hdmi_probe(struct platform_device *pdev) |
2453 | { | 2455 | { |
@@ -2710,6 +2712,6 @@ struct platform_driver hdmi_driver = { | |||
2710 | .name = "exynos-hdmi", | 2712 | .name = "exynos-hdmi", |
2711 | .owner = THIS_MODULE, | 2713 | .owner = THIS_MODULE, |
2712 | .pm = &hdmi_pm_ops, | 2714 | .pm = &hdmi_pm_ops, |
2713 | .of_match_table = hdmi_match_types, | 2715 | .of_match_table = of_match_ptr(hdmi_match_types), |
2714 | }, | 2716 | }, |
2715 | }; | 2717 | }; |
diff --git a/drivers/gpu/drm/exynos/exynos_hdmiphy.c b/drivers/gpu/drm/exynos/exynos_hdmiphy.c index 27d1720f1bbd..6206056f4a33 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[] = { | |||
46 | { }, | 46 | { }, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | #ifdef CONFIG_OF | ||
49 | static struct of_device_id hdmiphy_match_types[] = { | 50 | static struct of_device_id hdmiphy_match_types[] = { |
50 | { | 51 | { |
51 | .compatible = "samsung,exynos5-hdmiphy", | 52 | .compatible = "samsung,exynos5-hdmiphy", |
@@ -53,12 +54,13 @@ static struct of_device_id hdmiphy_match_types[] = { | |||
53 | /* end node */ | 54 | /* end node */ |
54 | } | 55 | } |
55 | }; | 56 | }; |
57 | #endif | ||
56 | 58 | ||
57 | struct i2c_driver hdmiphy_driver = { | 59 | struct i2c_driver hdmiphy_driver = { |
58 | .driver = { | 60 | .driver = { |
59 | .name = "exynos-hdmiphy", | 61 | .name = "exynos-hdmiphy", |
60 | .owner = THIS_MODULE, | 62 | .owner = THIS_MODULE, |
61 | .of_match_table = hdmiphy_match_types, | 63 | .of_match_table = of_match_ptr(hdmiphy_match_types), |
62 | }, | 64 | }, |
63 | .id_table = hdmiphy_id, | 65 | .id_table = hdmiphy_id, |
64 | .probe = hdmiphy_probe, | 66 | .probe = hdmiphy_probe, |