History

media: dvb: get rid of VIDEO_SET_SPU_PALETTE

No upstream drivers use it. It doesn't make any sense to have a compat32 code for something that nobody uses upstream.

Mauro Carvalho Chehab committed 8 years ago

Commit d0dd9621 parent e5225c86 files · +0 −139Browse files

Unified · Split

6 files
  1. Documentation/media/uapi/dvb/video-set-spu-palette.rst +0 −82
  2. Documentation/media/uapi/dvb/video_function_calls.rst +0 −1
  3. Documentation/media/uapi/dvb/video_types.rst +0 −18
  4. Documentation/media/video.h.rst.exceptions +0 −1
  5. fs/compat_ioctl.c +0 −30
  6. include/uapi/linux/dvb/video.h +0 −7
Documentation/media/uapi/dvb/video-set-spu-palette.rst+0−82
@@ -1,82 +0,0 @@
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _VIDEO_SET_SPU_PALETTE:
4
5=====================
6VIDEO_SET_SPU_PALETTE
7=====================
8
9Name
10----
11
12VIDEO_SET_SPU_PALETTE
13
14.. attention:: This ioctl is deprecated.
15
16Synopsis
17--------
18
19.. c:function:: int ioctl(fd, VIDEO_SET_SPU_PALETTE, struct video_spu_palette *palette )
20 :name: VIDEO_SET_SPU_PALETTE
21
22
23Arguments
24---------
25
26.. flat-table::
27 :header-rows: 0
28 :stub-columns: 0
29
30
31 - .. row 1
32
33 - int fd
34
35 - File descriptor returned by a previous call to open().
36
37 - .. row 2
38
39 - int request
40
41 - Equals VIDEO_SET_SPU_PALETTE for this command.
42
43 - .. row 3
44
45 - video_spu_palette_t \*palette
46
47 - SPU palette according to section ??.
48
49
50Description
51-----------
52
53This ioctl sets the SPU color palette.
54
55.. c:type:: video_spu_palette
56
57.. code-block::c
58
59 typedef struct video_spu_palette { /* SPU Palette information */
60 int length;
61 __u8 __user *palette;
62 } video_spu_palette_t;
63
64Return Value
65------------
66
67On success 0 is returned, on error -1 and the ``errno`` variable is set
68appropriately. The generic error codes are described at the
69:ref:`Generic Error Codes <gen-errors>` chapter.
70
71
72
73.. flat-table::
74 :header-rows: 0
75 :stub-columns: 0
76
77
78 - .. row 1
79
80 - ``EINVAL``
81
82 - input is not a valid palette or driver doesn’t handle SPU.
Documentation/media/uapi/dvb/video_function_calls.rst+0−1
@@ -38,6 +38,5 @@ Video Function Calls · 37 unmodified lines
38 video-set-system38 video-set-system
39 video-set-highlight39 video-set-highlight
40 video-set-spu40 video-set-spu
41 video-set-spu-palette
42 video-get-navi41 video-get-navi
43 video-set-attributes42 video-set-attributes
Documentation/media/uapi/dvb/video_types.rst+0−18
@@ -320,24 +320,6 @@ to the following format: · 319 unmodified lines
320 } video_spu_t;320 } video_spu_t;
321 321
322 322
323.. c:type:: video_spu_palette
324
325struct video_spu_palette
326========================
327
328The following structure is used to set the SPU palette by calling
329VIDEO_SPU_PALETTE:
330
331
332.. code-block:: c
333
334 typedef
335 struct video_spu_palette {
336 int length;
337 uint8_t *palette;
338 } video_spu_palette_t;
339
340
341.. c:type:: video_navi_pack323.. c:type:: video_navi_pack
342 324
343struct video_navi_pack325struct video_navi_pack
Documentation/media/video.h.rst.exceptions+0−1
@@ -36,5 +36,4 @@ replace typedef video_stream_source_t :c:type:`video_stream_source` · 35 unmodified lines
36replace typedef video_play_state_t :c:type:`video_play_state`36replace typedef video_play_state_t :c:type:`video_play_state`
37replace typedef video_highlight_t :c:type:`video_highlight`37replace typedef video_highlight_t :c:type:`video_highlight`
38replace typedef video_spu_t :c:type:`video_spu`38replace typedef video_spu_t :c:type:`video_spu`
39replace typedef video_spu_palette_t :c:type:`video_spu_palette`
40replace typedef video_navi_pack_t :c:type:`video_navi_pack`39replace typedef video_navi_pack_t :c:type:`video_navi_pack`
fs/compat_ioctl.c+0−30
@@ -198,34 +198,6 @@ static int do_video_stillpicture(struct file *file, · 197 unmodified lines
198 return err;198 return err;
199}199}
200 200
201struct compat_video_spu_palette {
202 int length;
203 compat_uptr_t palette;
204};
205
206static int do_video_set_spu_palette(struct file *file,
207 unsigned int cmd, struct compat_video_spu_palette __user *up)
208{
209 struct video_spu_palette __user *up_native;
210 compat_uptr_t palp;
211 int length, err;
212
213 err = get_user(palp, &up->palette);
214 err |= get_user(length, &up->length);
215 if (err)
216 return -EFAULT;
217
218 up_native = compat_alloc_user_space(sizeof(struct video_spu_palette));
219 err = put_user(compat_ptr(palp), &up_native->palette);
220 err |= put_user(length, &up_native->length);
221 if (err)
222 return -EFAULT;
223
224 err = do_ioctl(file, cmd, (unsigned long) up_native);
225
226 return err;
227}
228
229#ifdef CONFIG_BLOCK201#ifdef CONFIG_BLOCK
230typedef struct sg_io_hdr32 {202typedef struct sg_io_hdr32 {
231 compat_int_t interface_id; /* [i] 'S' for SCSI generic (required) */203 compat_int_t interface_id; /* [i] 'S' for SCSI generic (required) */
@@ -1347,8 +1319,6 @@ static long do_ioctl_trans(unsigned int cmd, · 1115 unmodified lines
1347 return do_video_get_event(file, cmd, argp);1319 return do_video_get_event(file, cmd, argp);
1348 case VIDEO_STILLPICTURE:1320 case VIDEO_STILLPICTURE:
1349 return do_video_stillpicture(file, cmd, argp);1321 return do_video_stillpicture(file, cmd, argp);
1350 case VIDEO_SET_SPU_PALETTE:
1351 return do_video_set_spu_palette(file, cmd, argp);
1352 }1322 }
1353 1323
1354 /*1324 /*
include/uapi/linux/dvb/video.h+0−7
@@ -186,12 +186,6 @@ typedef struct video_spu { · 185 unmodified lines
186} video_spu_t;186} video_spu_t;
187 187
188 188
189typedef struct video_spu_palette { /* SPU Palette information */
190 int length;
191 __u8 __user *palette;
192} video_spu_palette_t;
193
194
195typedef struct video_navi_pack {189typedef struct video_navi_pack {
196 int length; /* 0 ... 1024 */190 int length; /* 0 ... 1024 */
197 __u8 data[1024];191 __u8 data[1024];
@@ -248,7 +242,6 @@ typedef __u16 video_attributes_t; · 50 unmodified lines
248#define VIDEO_SET_SYSTEM _IO('o', 38)242#define VIDEO_SET_SYSTEM _IO('o', 38)
249#define VIDEO_SET_HIGHLIGHT _IOW('o', 39, video_highlight_t)243#define VIDEO_SET_HIGHLIGHT _IOW('o', 39, video_highlight_t)
250#define VIDEO_SET_SPU _IOW('o', 50, video_spu_t)244#define VIDEO_SET_SPU _IOW('o', 50, video_spu_t)
251#define VIDEO_SET_SPU_PALETTE _IOW('o', 51, video_spu_palette_t)
252#define VIDEO_GET_NAVI _IOR('o', 52, video_navi_pack_t)245#define VIDEO_GET_NAVI _IOR('o', 52, video_navi_pack_t)
253#define VIDEO_SET_ATTRIBUTES _IO('o', 53)246#define VIDEO_SET_ATTRIBUTES _IO('o', 53)
254#define VIDEO_GET_SIZE _IOR('o', 55, video_size_t)247#define VIDEO_GET_SIZE _IOR('o', 55, video_size_t)