dvb-core: compatile with 32bit in 64bit kernel [1/1]

PD#SWPL-3009

Problem:
32bit frontend app can't call ioctl in 64bit-kernel

Solution:
Add 32bit define in header and handle in dvb_frontend in 64bit-kernel

Verify:
Verify at android_p at R311

Change-Id: I63178803cfb1cf7d670e3c2b55f104e97f5afa63
Signed-off-by: Chuangcheng Peng <chuangcheng.peng@amlogic.com>
This commit is contained in:
Chuangcheng Peng
2018-12-07 18:16:13 +08:00
committed by Dongjin Kim
parent b682325e08
commit 3411f700d2
2 changed files with 188 additions and 40 deletions

View File

@@ -541,16 +541,38 @@ struct dtv_property {
__u32 reserved1[3];
void *reserved2;
} buffer;
#if 0
#ifdef CONFIG_AMLOGIC_DVB_COMPAT
} u;
int result;
} __attribute__ ((packed));
struct dtv_property_32 {
__u32 cmd;
__u32 reserved[3];
union {
__u32 data;
struct dtv_fe_stats st;
struct {
__u8 data[32];
__u32 len;
__u32 reserved1[3];
__u64 reserved;
} reserved;
#endif
#endif
__u32 reserved2;
} buffer;
} u;
int result;
} __attribute__ ((packed));
struct dtv_property_64 {
__u32 cmd;
__u32 reserved[3];
union {
__u32 data;
struct dtv_fe_stats st;
struct {
__u8 data[32];
__u32 len;
__u32 reserved1[3];
__u64 reserved2;
} buffer;
} u;
int result;
} __attribute__ ((packed));
@@ -560,14 +582,17 @@ struct dtv_property {
struct dtv_properties {
__u32 num;
#if 0 && defined(CONFIG_AMLOGIC_DVB_COMPAT)
union {
struct dtv_property *props;
__u64 reserved;
};
#else
struct dtv_property *props;
#endif
};
struct dtv_properties_32 {
__u32 num;
__u32 props;
};
struct dtv_properties_64 {
__u32 num;
__u64 props;
};
#if defined(__DVB_CORE__) || !defined (__KERNEL__)
@@ -722,6 +747,12 @@ struct dvbsx_blindscanevent {
#define FE_SET_PROPERTY _IOW('o', 82, struct dtv_properties)
#define FE_GET_PROPERTY _IOR('o', 83, struct dtv_properties)
#define FE_SET_PROPERTY_32 _IOW('o', 82, struct dtv_properties_32)
#define FE_GET_PROPERTY_32 _IOR('o', 83, struct dtv_properties_32)
#define FE_SET_PROPERTY_64 _IOW('o', 82, struct dtv_properties_64)
#define FE_GET_PROPERTY_64 _IOR('o', 83, struct dtv_properties_64)
#ifdef CONFIG_AMLOGIC_DVB_COMPAT
/*for atv*/
struct tuner_status_s {