diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-08-26 16:04:31 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:52:41 +0900 |
commit | 393a27c614ce4280d8accc239baac751725f20a6 (patch) | |
tree | 4ca63b8bd8c26cd37ef94ffb59a2a95032182fcd /drivers/sensors/brcm/ssp_sensorhub.c | |
parent | 6ad8c7530d23d78eb246880073181421bf44e468 (diff) |
sensors: sensorhub_brcm: fix for compatibility
For 32bit compatibility, compat_ioctl should be registered. Also,
32bit built IOCTL value is different from 64bit, then it should be
considered. So this fixes for compatibility with compat_ioctl.
Change-Id: I11c353d4cd39a8ef5014f2b9b2d1f504fda86182
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Diffstat (limited to 'drivers/sensors/brcm/ssp_sensorhub.c')
-rw-r--r-- | drivers/sensors/brcm/ssp_sensorhub.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/sensors/brcm/ssp_sensorhub.c b/drivers/sensors/brcm/ssp_sensorhub.c index 70d033fc958e..258a00b30440 100644 --- a/drivers/sensors/brcm/ssp_sensorhub.c +++ b/drivers/sensors/brcm/ssp_sensorhub.c @@ -258,6 +258,9 @@ static long ssp_sensorhub_ioctl(struct file *file, unsigned int cmd, switch (cmd) { case IOCTL_READ_BIG_CONTEXT_DATA: +#ifdef CONFIG_COMPAT + case IOCTL_READ_BIG_CONTEXT_DATA_COMPAT: +#endif if (unlikely(!hub_data->big_events.library_data || !hub_data->big_events.library_length)) { sensorhub_info("no big library data"); @@ -300,6 +303,9 @@ static struct file_operations ssp_sensorhub_fops = { .write = ssp_sensorhub_write, .read = ssp_sensorhub_read, .unlocked_ioctl = ssp_sensorhub_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = ssp_sensorhub_ioctl, +#endif }; void ssp_sensorhub_report_notice(struct ssp_data *ssp_data, char notice) @@ -696,6 +702,9 @@ void ssp_sensorhub_remove(struct ssp_data *ssp_data) ssp_sensorhub_fops.write = NULL; ssp_sensorhub_fops.read = NULL; ssp_sensorhub_fops.unlocked_ioctl = NULL; +#ifdef CONFIG_COMPAT + ssp_sensorhub_fops.compat_ioctl = NULL; +#endif kthread_stop(hub_data->sensorhub_task); kfifo_free(&hub_data->fifo); |