Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0dd962d authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

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.

Reported-by: default avatarAlexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent e5225c82
Loading
Loading
Loading
Loading
+0 −82
Original line number Diff line number Diff line
.. -*- coding: utf-8; mode: rst -*-

.. _VIDEO_SET_SPU_PALETTE:

=====================
VIDEO_SET_SPU_PALETTE
=====================

Name
----

VIDEO_SET_SPU_PALETTE

.. attention:: This ioctl is deprecated.

Synopsis
--------

.. c:function:: int ioctl(fd, VIDEO_SET_SPU_PALETTE, struct video_spu_palette *palette )
    :name: VIDEO_SET_SPU_PALETTE


Arguments
---------

.. flat-table::
    :header-rows:  0
    :stub-columns: 0


    -  .. row 1

       -  int fd

       -  File descriptor returned by a previous call to open().

    -  .. row 2

       -  int request

       -  Equals VIDEO_SET_SPU_PALETTE for this command.

    -  .. row 3

       -  video_spu_palette_t \*palette

       -  SPU palette according to section ??.


Description
-----------

This ioctl sets the SPU color palette.

.. c:type:: video_spu_palette

.. code-block::c

	typedef struct video_spu_palette {      /* SPU Palette information */
		int length;
		__u8 __user *palette;
	} video_spu_palette_t;

Return Value
------------

On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.



.. flat-table::
    :header-rows:  0
    :stub-columns: 0


    -  .. row 1

       -  ``EINVAL``

       -  input is not a valid palette or driver doesn’t handle SPU.
+0 −1
Original line number Diff line number Diff line
@@ -38,6 +38,5 @@ Video Function Calls
    video-set-system
    video-set-highlight
    video-set-spu
    video-set-spu-palette
    video-get-navi
    video-set-attributes
+0 −18
Original line number Diff line number Diff line
@@ -320,24 +320,6 @@ to the following format:
     } video_spu_t;


.. c:type:: video_spu_palette

struct video_spu_palette
========================

The following structure is used to set the SPU palette by calling
VIDEO_SPU_PALETTE:


.. code-block:: c

     typedef
     struct video_spu_palette {
	 int length;
	 uint8_t *palette;
     } video_spu_palette_t;


.. c:type:: video_navi_pack

struct video_navi_pack
+0 −1
Original line number Diff line number Diff line
@@ -36,5 +36,4 @@ replace typedef video_stream_source_t :c:type:`video_stream_source`
replace typedef video_play_state_t :c:type:`video_play_state`
replace typedef video_highlight_t :c:type:`video_highlight`
replace typedef video_spu_t :c:type:`video_spu`
replace typedef video_spu_palette_t :c:type:`video_spu_palette`
replace typedef video_navi_pack_t :c:type:`video_navi_pack`
+0 −30
Original line number Diff line number Diff line
@@ -198,34 +198,6 @@ static int do_video_stillpicture(struct file *file,
	return err;
}

struct compat_video_spu_palette {
	int length;
	compat_uptr_t palette;
};

static int do_video_set_spu_palette(struct file *file,
		unsigned int cmd, struct compat_video_spu_palette __user *up)
{
	struct video_spu_palette __user *up_native;
	compat_uptr_t palp;
	int length, err;

	err  = get_user(palp, &up->palette);
	err |= get_user(length, &up->length);
	if (err)
		return -EFAULT;

	up_native = compat_alloc_user_space(sizeof(struct video_spu_palette));
	err  = put_user(compat_ptr(palp), &up_native->palette);
	err |= put_user(length, &up_native->length);
	if (err)
		return -EFAULT;

	err = do_ioctl(file, cmd, (unsigned long) up_native);

	return err;
}

#ifdef CONFIG_BLOCK
typedef struct sg_io_hdr32 {
	compat_int_t interface_id;	/* [i] 'S' for SCSI generic (required) */
@@ -1347,8 +1319,6 @@ static long do_ioctl_trans(unsigned int cmd,
		return do_video_get_event(file, cmd, argp);
	case VIDEO_STILLPICTURE:
		return do_video_stillpicture(file, cmd, argp);
	case VIDEO_SET_SPU_PALETTE:
		return do_video_set_spu_palette(file, cmd, argp);
	}

	/*
Loading