From bc474ffea6f7867c5de557c662db3d5f829a02dc Mon Sep 17 00:00:00 2001 From: Yong Ding Date: Tue, 16 Jan 2018 15:32:37 +0800 Subject: soc: qcom: hab: add compat_ioctl support This is used to allow 32-bit userland programs to make ioctl calls on 64-bit kernel. Change-Id: Ie5066a3445c79859fc0b509159b34ff08d36358a Signed-off-by: Yong Ding --- drivers/soc/qcom/hab/hab.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/hab/hab.c b/drivers/soc/qcom/hab/hab.c index a48636dc9dbe..5ca94579b6f1 100644 --- a/drivers/soc/qcom/hab/hab.c +++ b/drivers/soc/qcom/hab/hab.c @@ -867,12 +867,19 @@ static long hab_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) return ret; } +static long hab_compat_ioctl(struct file *filep, unsigned int cmd, + unsigned long arg) +{ + return hab_ioctl(filep, cmd, arg); +} + static const struct file_operations hab_fops = { .owner = THIS_MODULE, .open = hab_open, .release = hab_release, .mmap = habmem_imp_hyp_mmap, - .unlocked_ioctl = hab_ioctl + .unlocked_ioctl = hab_ioctl, + .compat_ioctl = hab_compat_ioctl }; /* -- cgit v1.2.3