diff options
author | Keith Packard <keithp@keithp.com> | 2012-07-09 18:40:07 -0400 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2012-09-05 16:55:02 -0400 |
commit | 804d74abe2e3f361ead5c5c6850d5b1ab0203862 (patch) | |
tree | fa332c96e84ad98e66b38c220ad72022364a6f40 | |
parent | 0273de08c455031335dbea2630208f66106b0c14 (diff) |
drm: use drm_compat_ioctl for 32-bit apps
Most of the DRM drivers appear to be missing the .compat_ioctl file
operation entry necessary for 32-bit application compatibility.
This patch uses drm_compat_ioctl for all drivers which don't have
their own, and which are using drm_ioctl for .unlocked_ioctl.
This leaves drivers/gpu/drm/psb/psb_drv.c unchanged; it has a custom
.unlocked_ioctl and will presumably need a custom .compat_ioctl as
well.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
-rw-r--r-- | drivers/gpu/drm/ast/ast_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/cirrus/cirrus_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i810/i810_dma.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i810/i810_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/savage/savage_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/sis/sis_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/tdfx/tdfx_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/udl/udl_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/via/via_drv.c | 3 |
11 files changed, 33 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c index d0c4574ef49c..36164806b9d4 100644 --- a/drivers/gpu/drm/ast/ast_drv.c +++ b/drivers/gpu/drm/ast/ast_drv.c | |||
@@ -193,6 +193,9 @@ static const struct file_operations ast_fops = { | |||
193 | .mmap = ast_mmap, | 193 | .mmap = ast_mmap, |
194 | .poll = drm_poll, | 194 | .poll = drm_poll, |
195 | .fasync = drm_fasync, | 195 | .fasync = drm_fasync, |
196 | #ifdef CONFIG_COMPAT | ||
197 | .compat_ioctl = drm_compat_ioctl, | ||
198 | #endif | ||
196 | .read = drm_read, | 199 | .read = drm_read, |
197 | }; | 200 | }; |
198 | 201 | ||
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.c b/drivers/gpu/drm/cirrus/cirrus_drv.c index 7053140c6596..b83a2d7ddd1a 100644 --- a/drivers/gpu/drm/cirrus/cirrus_drv.c +++ b/drivers/gpu/drm/cirrus/cirrus_drv.c | |||
@@ -74,6 +74,9 @@ static const struct file_operations cirrus_driver_fops = { | |||
74 | .unlocked_ioctl = drm_ioctl, | 74 | .unlocked_ioctl = drm_ioctl, |
75 | .mmap = cirrus_mmap, | 75 | .mmap = cirrus_mmap, |
76 | .poll = drm_poll, | 76 | .poll = drm_poll, |
77 | #ifdef CONFIG_COMPAT | ||
78 | .compat_ioctl = drm_compat_ioctl, | ||
79 | #endif | ||
77 | .fasync = drm_fasync, | 80 | .fasync = drm_fasync, |
78 | }; | 81 | }; |
79 | static struct drm_driver driver = { | 82 | static struct drm_driver driver = { |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index ebacec6f1e48..6345abe9fdee 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c | |||
@@ -241,6 +241,9 @@ static const struct file_operations exynos_drm_driver_fops = { | |||
241 | .poll = drm_poll, | 241 | .poll = drm_poll, |
242 | .read = drm_read, | 242 | .read = drm_read, |
243 | .unlocked_ioctl = drm_ioctl, | 243 | .unlocked_ioctl = drm_ioctl, |
244 | #ifdef CONFIG_COMPAT | ||
245 | .compat_ioctl = drm_compat_ioctl, | ||
246 | #endif | ||
244 | .release = drm_release, | 247 | .release = drm_release, |
245 | }; | 248 | }; |
246 | 249 | ||
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c index 57d892eaaa6e..463ec6871fe9 100644 --- a/drivers/gpu/drm/i810/i810_dma.c +++ b/drivers/gpu/drm/i810/i810_dma.c | |||
@@ -115,6 +115,9 @@ static const struct file_operations i810_buffer_fops = { | |||
115 | .unlocked_ioctl = drm_ioctl, | 115 | .unlocked_ioctl = drm_ioctl, |
116 | .mmap = i810_mmap_buffers, | 116 | .mmap = i810_mmap_buffers, |
117 | .fasync = drm_fasync, | 117 | .fasync = drm_fasync, |
118 | #ifdef CONFIG_COMPAT | ||
119 | .compat_ioctl = drm_compat_ioctl, | ||
120 | #endif | ||
118 | .llseek = noop_llseek, | 121 | .llseek = noop_llseek, |
119 | }; | 122 | }; |
120 | 123 | ||
diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c index f9924ad04d09..48cfcca2b350 100644 --- a/drivers/gpu/drm/i810/i810_drv.c +++ b/drivers/gpu/drm/i810/i810_drv.c | |||
@@ -51,6 +51,9 @@ static const struct file_operations i810_driver_fops = { | |||
51 | .mmap = drm_mmap, | 51 | .mmap = drm_mmap, |
52 | .poll = drm_poll, | 52 | .poll = drm_poll, |
53 | .fasync = drm_fasync, | 53 | .fasync = drm_fasync, |
54 | #ifdef CONFIG_COMPAT | ||
55 | .compat_ioctl = drm_compat_ioctl, | ||
56 | #endif | ||
54 | .llseek = noop_llseek, | 57 | .llseek = noop_llseek, |
55 | }; | 58 | }; |
56 | 59 | ||
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c index ea1024d79974..e5f145d2cb3b 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.c +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c | |||
@@ -84,6 +84,9 @@ static const struct file_operations mgag200_driver_fops = { | |||
84 | .mmap = mgag200_mmap, | 84 | .mmap = mgag200_mmap, |
85 | .poll = drm_poll, | 85 | .poll = drm_poll, |
86 | .fasync = drm_fasync, | 86 | .fasync = drm_fasync, |
87 | #ifdef CONFIG_COMPAT | ||
88 | .compat_ioctl = drm_compat_ioctl, | ||
89 | #endif | ||
87 | .read = drm_read, | 90 | .read = drm_read, |
88 | }; | 91 | }; |
89 | 92 | ||
diff --git a/drivers/gpu/drm/savage/savage_drv.c b/drivers/gpu/drm/savage/savage_drv.c index d31d4cca9a4c..c5a164337bd5 100644 --- a/drivers/gpu/drm/savage/savage_drv.c +++ b/drivers/gpu/drm/savage/savage_drv.c | |||
@@ -43,6 +43,9 @@ static const struct file_operations savage_driver_fops = { | |||
43 | .mmap = drm_mmap, | 43 | .mmap = drm_mmap, |
44 | .poll = drm_poll, | 44 | .poll = drm_poll, |
45 | .fasync = drm_fasync, | 45 | .fasync = drm_fasync, |
46 | #ifdef CONFIG_COMPAT | ||
47 | .compat_ioctl = drm_compat_ioctl, | ||
48 | #endif | ||
46 | .llseek = noop_llseek, | 49 | .llseek = noop_llseek, |
47 | }; | 50 | }; |
48 | 51 | ||
diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c index 7f119870147c..867dc03000e6 100644 --- a/drivers/gpu/drm/sis/sis_drv.c +++ b/drivers/gpu/drm/sis/sis_drv.c | |||
@@ -74,6 +74,9 @@ static const struct file_operations sis_driver_fops = { | |||
74 | .mmap = drm_mmap, | 74 | .mmap = drm_mmap, |
75 | .poll = drm_poll, | 75 | .poll = drm_poll, |
76 | .fasync = drm_fasync, | 76 | .fasync = drm_fasync, |
77 | #ifdef CONFIG_COMPAT | ||
78 | .compat_ioctl = drm_compat_ioctl, | ||
79 | #endif | ||
77 | .llseek = noop_llseek, | 80 | .llseek = noop_llseek, |
78 | }; | 81 | }; |
79 | 82 | ||
diff --git a/drivers/gpu/drm/tdfx/tdfx_drv.c b/drivers/gpu/drm/tdfx/tdfx_drv.c index 90f6b13acfac..a7f4d6bd1330 100644 --- a/drivers/gpu/drm/tdfx/tdfx_drv.c +++ b/drivers/gpu/drm/tdfx/tdfx_drv.c | |||
@@ -49,6 +49,9 @@ static const struct file_operations tdfx_driver_fops = { | |||
49 | .mmap = drm_mmap, | 49 | .mmap = drm_mmap, |
50 | .poll = drm_poll, | 50 | .poll = drm_poll, |
51 | .fasync = drm_fasync, | 51 | .fasync = drm_fasync, |
52 | #ifdef CONFIG_COMPAT | ||
53 | .compat_ioctl = drm_compat_ioctl, | ||
54 | #endif | ||
52 | .llseek = noop_llseek, | 55 | .llseek = noop_llseek, |
53 | }; | 56 | }; |
54 | 57 | ||
diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index 6e52069894b3..9f84128505bb 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c | |||
@@ -66,6 +66,9 @@ static const struct file_operations udl_driver_fops = { | |||
66 | .unlocked_ioctl = drm_ioctl, | 66 | .unlocked_ioctl = drm_ioctl, |
67 | .release = drm_release, | 67 | .release = drm_release, |
68 | .fasync = drm_fasync, | 68 | .fasync = drm_fasync, |
69 | #ifdef CONFIG_COMPAT | ||
70 | .compat_ioctl = drm_compat_ioctl, | ||
71 | #endif | ||
69 | .llseek = noop_llseek, | 72 | .llseek = noop_llseek, |
70 | }; | 73 | }; |
71 | 74 | ||
diff --git a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c index e927b4c052f5..af1b914b17e3 100644 --- a/drivers/gpu/drm/via/via_drv.c +++ b/drivers/gpu/drm/via/via_drv.c | |||
@@ -65,6 +65,9 @@ static const struct file_operations via_driver_fops = { | |||
65 | .mmap = drm_mmap, | 65 | .mmap = drm_mmap, |
66 | .poll = drm_poll, | 66 | .poll = drm_poll, |
67 | .fasync = drm_fasync, | 67 | .fasync = drm_fasync, |
68 | #ifdef CONFIG_COMPAT | ||
69 | .compat_ioctl = drm_compat_ioctl, | ||
70 | #endif | ||
68 | .llseek = noop_llseek, | 71 | .llseek = noop_llseek, |
69 | }; | 72 | }; |
70 | 73 | ||