summaryrefslogtreecommitdiff
path: root/drivers/misc/xilinx_sdfec.c
diff options
context:
space:
mode:
authorHarshal Chaudhari <harshalchau04@gmail.com>2020-10-26 18:58:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-29 10:37:36 +0300
commit3f7566f4947834db9b36aeb8b308e91448ba74fc (patch)
tree76649ce1fd3132491ee6d15e1790233e1a310149 /drivers/misc/xilinx_sdfec.c
parentb36773c3912e770e92ba57fa0957c1cf4db6e8a7 (diff)
downloadlinux-3f7566f4947834db9b36aeb8b308e91448ba74fc.tar.xz
misc: xilinx_sdfec: add compat_ptr_ioctl()
Driver has a trivial helper function to convert the pointer argument and then call the native ioctl handler. But now we have a generic implementation for that, so we can use it. Signed-off-by: Harshal Chaudhari <harshalchau04@gmail.com> Link: https://lore.kernel.org/r/20201026155801.16053-1-harshalchau04@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/xilinx_sdfec.c')
-rw-r--r--drivers/misc/xilinx_sdfec.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
index 92291292756a..6f252793dceb 100644
--- a/drivers/misc/xilinx_sdfec.c
+++ b/drivers/misc/xilinx_sdfec.c
@@ -1016,14 +1016,6 @@ static long xsdfec_dev_ioctl(struct file *fptr, unsigned int cmd,
return rval;
}
-#ifdef CONFIG_COMPAT
-static long xsdfec_dev_compat_ioctl(struct file *file, unsigned int cmd,
- unsigned long data)
-{
- return xsdfec_dev_ioctl(file, cmd, (unsigned long)compat_ptr(data));
-}
-#endif
-
static __poll_t xsdfec_poll(struct file *file, poll_table *wait)
{
__poll_t mask = 0;
@@ -1054,9 +1046,7 @@ static const struct file_operations xsdfec_fops = {
.release = xsdfec_dev_release,
.unlocked_ioctl = xsdfec_dev_ioctl,
.poll = xsdfec_poll,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = xsdfec_dev_compat_ioctl,
-#endif
+ .compat_ioctl = compat_ptr_ioctl,
};
static int xsdfec_parse_of(struct xsdfec_dev *xsdfec)