From 37434e0be62710ffd76760e13bd121e4d12cf2d0 Mon Sep 17 00:00:00 2001 From: Chuanzhi Wang Date: Thu, 26 Jul 2018 13:49:49 +0800 Subject: [PATCH] dvb: add configuration items to control dvb module compilation. [1\2] PD#169652: Kconfig: Add configuration items. Change-Id: If5d0a987bda435975fb3a6fa7be26ff8f7099e6f Signed-off-by: Chuanzhi Wang --- arch/arm64/configs/meson64_defconfig | 1 - drivers/amlogic/media/Kconfig | 33 +++++++++++++++++++++++++++++++++ drivers/media/dvb-core/dmxdev.c | 6 ++++-- drivers/media/dvb-core/dvb_ca_en50221.c | 3 ++- drivers/media/dvb-core/dvb_frontend.c | 6 ++++-- 5 files changed, 43 insertions(+), 6 deletions(-) diff --git a/arch/arm64/configs/meson64_defconfig b/arch/arm64/configs/meson64_defconfig index a32ca70..3465b59 100644 --- a/arch/arm64/configs/meson64_defconfig +++ b/arch/arm64/configs/meson64_defconfig @@ -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 diff --git a/drivers/amlogic/media/Kconfig b/drivers/amlogic/media/Kconfig index d476845..bc31627 100644 --- a/drivers/amlogic/media/Kconfig +++ b/drivers/amlogic/media/Kconfig @@ -1,4 +1,35 @@ # +# 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 + + diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c index 7bda384..5cc5684 100644 --- a/drivers/media/dvb-core/dmxdev.c +++ b/drivers/media/dvb-core/dmxdev.c @@ -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; } diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c index 43bf206..6a51227 100644 --- a/drivers/media/dvb-core/dvb_ca_en50221.c +++ b/drivers/media/dvb-core/dvb_ca_en50221.c @@ -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; } diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 778927e..aa34713 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -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; -- 2.7.4