dvb: add configuration items to control dvb module compilation. [1\2]
authorChuanzhi Wang <chuanzhi.wang@amlogic.com>
Thu, 26 Jul 2018 05:49:49 +0000 (13:49 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 10 Aug 2018 08:47:44 +0000 (01:47 -0700)
PD#169652: Kconfig: Add configuration items.

Change-Id: If5d0a987bda435975fb3a6fa7be26ff8f7099e6f
Signed-off-by: Chuanzhi Wang <chuanzhi.wang@amlogic.com>
arch/arm64/configs/meson64_defconfig
drivers/amlogic/media/Kconfig
drivers/media/dvb-core/dmxdev.c
drivers/media/dvb-core/dvb_ca_en50221.c
drivers/media/dvb-core/dvb_frontend.c

index a32ca70639be23235e68896f3930c40d95b3eab3..3465b594c3a2158451094f01a7c270096c11dda6 100644 (file)
@@ -349,7 +349,6 @@ CONFIG_AMLOGIC_WDT_MESON_V3=y
 CONFIG_AMLOGIC_ESM=y
 CONFIG_AMLOGIC_WIFI=y
 CONFIG_AMLOGIC_BT_DEVICE=y
-CONFIG_AMLOGIC_DVB_COMPAT=y
 CONFIG_AMLOGIC_PCIE=y
 CONFIG_AMLOGIC_IRBLASTER=y
 CONFIG_AMLOGIC_IIO=y
index d476845f4331d37ab2a49fbb015e6cd29d4b0410..bc316278ce439e222b22a8cfa895f9da406479af 100644 (file)
@@ -1,3 +1,34 @@
+#
+# Amlogic DVB configuration
+#
+
+menu "Amlogic dvb configuration"
+
+config AMLOGIC_DVB
+       bool "Amlogic dvb support"
+       select DVB_CORE
+       select AMLOGIC_DVB_COMPAT
+       default y
+       help
+               This option is used only to control the
+               compilation of dvb related driver code, for
+               example hw_demux, it is enabled by default,
+               When it is turned on,it will automatically
+               select DVB_CORE and AMLOGIC_DVB_COMPAT.
+
+config AMLOGIC_DVB_COMPAT
+       bool "Compat amlogic dvb"
+       depends on AMLOGIC_DVB && DVB_CORE
+       default y
+       help
+               This option is used only to compatible with
+               amlogic dvb related code, for example dvb-core,
+               it is enabled by default,depending on
+               AMLOGIC_DVB and DVB_CORE.
+
+endmenu
+
+
 #
 # Amlogic multimedia configuration
 #
@@ -66,3 +97,5 @@ source "drivers/amlogic/media/algorithm/Kconfig"
 endif
 source "drivers/amlogic/media/dtv_demod/Kconfig"
 endmenu
+
+
index 7bda384d8af10776c1b20f4f267269a912f47011..5cc568481ffa5d73bf0c49c766745e50797a264c 100644 (file)
@@ -1133,8 +1133,9 @@ static long dvb_demux_compat_ioctl(struct file *filp,
                        unsigned int cmd, unsigned long args)
 {
        unsigned long ret;
-
+#ifdef CONFIG_COMPAT
        args = (unsigned long)compat_ptr(args);
+#endif
        ret = dvb_demux_ioctl(filp, cmd, args);
        return ret;
 }
@@ -1223,8 +1224,9 @@ static long dvb_dvr_compat_ioctl(struct file *filp,
                        unsigned int cmd, unsigned long args)
 {
        unsigned long ret;
-
+#ifdef CONFIG_COMPAT
        args = (unsigned long)compat_ptr(args);
+#endif
        ret = dvb_dvr_ioctl(filp, cmd, args);
        return ret;
 }
index 43bf20639c341ce3530a73d828b52e11a61b4f12..6a51227664c49b5461bd17baed64df147f605baf 100644 (file)
@@ -1688,8 +1688,9 @@ static long dvb_ca_en50221_compat_ioctl(struct file *filp,
                        unsigned int cmd, unsigned long args)
 {
        unsigned long ret;
-
+#ifdef CONFIG_COMPAT
        args = (unsigned long)compat_ptr(args);
+#endif
        ret = dvb_ca_en50221_io_ioctl(filp, cmd, args);
        return ret;
 }
index 778927e992d1a1afea427770c9e17147a65a2409..aa34713b44a4d141b500d7258728a8148edd2795 100644 (file)
@@ -2665,14 +2665,16 @@ static long dvb_frontend_compat_ioctl(struct file *filp,
 {
        unsigned long ret;
        struct dtv_properties tvps;
-
+#ifdef CONFIG_COMPAT
        args  = (unsigned long)compat_ptr(args);
-
+#endif
        if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) {
                if (copy_from_user(&tvps, (void *)args,
                        sizeof(struct dtv_properties)))
                        return -EFAULT;
+#ifdef CONFIG_COMPAT
                tvps.props = compat_ptr((unsigned long)tvps.props);
+#endif
                if (copy_to_user((void *)args, (void *)&tvps,
                        sizeof(struct dtv_properties)))
                        return -EFAULT;