[PATCH 3/3] [media] s5p-mfc: Use of_match_ptr and CONFIG_OF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This builds the code only if DT is enabled.

Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 3930177..65ed603 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1405,6 +1405,7 @@ static struct platform_device_id mfc_driver_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, mfc_driver_ids);
 
+#ifdef CONFIG_OF
 static const struct of_device_id exynos_mfc_match[] = {
 	{
 		.compatible = "samsung,mfc-v5",
@@ -1416,6 +1417,7 @@ static const struct of_device_id exynos_mfc_match[] = {
 	{},
 };
 MODULE_DEVICE_TABLE(of, exynos_mfc_match);
+#endif
 
 static void *mfc_get_drv_data(struct platform_device *pdev)
 {
@@ -1442,7 +1444,7 @@ static struct platform_driver s5p_mfc_driver = {
 		.name	= S5P_MFC_NAME,
 		.owner	= THIS_MODULE,
 		.pm	= &s5p_mfc_pm_ops,
-		.of_match_table = exynos_mfc_match,
+		.of_match_table = of_match_ptr(exynos_mfc_match),
 	},
 };
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux