Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: ca.h: get rid of CA_SET_PID

This ioctl seems to be some attempt to support a feature
at the bt8xx dst_ca driver. Yet, as said there, it
"needs more work". Right now, the code there is just
a boilerplate.

At the end of the day, no driver uses this ioctl, nor it is
documented anywhere (except for "needs more work").

So, get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

-100
-1
Documentation/media/ca.h.rst.exceptions
··· 16 16 replace define CA_DSS :c:type:`ca_descr_info` 17 17 18 18 # some typedefs should point to struct/enums 19 - replace typedef ca_pid_t :c:type:`ca_pid` 20 19 replace typedef ca_slot_info_t :c:type:`ca_slot_info` 21 20 replace typedef ca_descr_info_t :c:type:`ca_descr_info` 22 21 replace typedef ca_caps_t :c:type:`ca_caps`
-1
Documentation/media/dvb-drivers/ci.rst
··· 143 143 #define CA_GET_MSG _IOR('o', 132, ca_msg_t) 144 144 #define CA_SEND_MSG _IOW('o', 133, ca_msg_t) 145 145 #define CA_SET_DESCR _IOW('o', 134, ca_descr_t) 146 - #define CA_SET_PID _IOW('o', 135, ca_pid_t) 147 146 148 147 149 148 On querying the device, the device yields information thus:
-60
Documentation/media/uapi/dvb/ca-set-pid.rst
··· 1 - .. -*- coding: utf-8; mode: rst -*- 2 - 3 - .. _CA_SET_PID: 4 - 5 - ========== 6 - CA_SET_PID 7 - ========== 8 - 9 - Name 10 - ---- 11 - 12 - CA_SET_PID 13 - 14 - 15 - Synopsis 16 - -------- 17 - 18 - .. c:function:: int ioctl(fd, CA_SET_PID, struct ca_pid *pid) 19 - :name: CA_SET_PID 20 - 21 - 22 - Arguments 23 - --------- 24 - 25 - ``fd`` 26 - File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. 27 - 28 - ``pid`` 29 - Pointer to struct :c:type:`ca_pid`. 30 - 31 - .. c:type:: ca_pid 32 - 33 - .. flat-table:: struct ca_pid 34 - :header-rows: 1 35 - :stub-columns: 0 36 - 37 - - 38 - - unsigned int 39 - - pid 40 - - Program ID 41 - 42 - - 43 - - int 44 - - index 45 - - PID index. Use -1 to disable. 46 - 47 - 48 - 49 - Description 50 - ----------- 51 - 52 - .. note:: This ioctl is undocumented. Documentation is welcome. 53 - 54 - 55 - Return Value 56 - ------------ 57 - 58 - On success 0 is returned, on error -1 and the ``errno`` variable is set 59 - appropriately. The generic error codes are described at the 60 - :ref:`Generic Error Codes <gen-errors>` chapter.
-14
Documentation/media/uapi/dvb/ca_data_types.rst
··· 94 94 unsigned int parity; 95 95 unsigned char cw[8]; 96 96 } ca_descr_t; 97 - 98 - 99 - .. c:type:: ca_pid 100 - 101 - ca-pid 102 - ====== 103 - 104 - 105 - .. code-block:: c 106 - 107 - typedef struct ca_pid { 108 - unsigned int pid; 109 - int index; /* -1 == disable*/ 110 - } ca_pid_t;
-1
Documentation/media/uapi/dvb/ca_function_calls.rst
··· 18 18 ca-get-msg 19 19 ca-send-msg 20 20 ca-set-descr 21 - ca-set-pid
-16
drivers/media/pci/bt8xx/dst_ca.c
··· 64 64 return -EOPNOTSUPP; 65 65 } 66 66 67 - /* Need some more work */ 68 - static int ca_set_pid(void) 69 - { 70 - /* We could make this more graceful ? */ 71 - return -EOPNOTSUPP; 72 - } 73 - 74 67 static void put_command_and_length(u8 *data, int command, int length) 75 68 { 76 69 data[0] = (command >> 16) & 0xff; ··· 621 628 goto free_mem_and_exit; 622 629 } 623 630 dprintk(verbose, DST_CA_INFO, 1, " -->CA_SET_DESCR Success !"); 624 - break; 625 - case CA_SET_PID: 626 - dprintk(verbose, DST_CA_INFO, 1, " Setting PID"); 627 - if ((ca_set_pid()) < 0) { 628 - dprintk(verbose, DST_CA_ERROR, 1, " -->CA_SET_PID Failed !"); 629 - result = -1; 630 - goto free_mem_and_exit; 631 - } 632 - dprintk(verbose, DST_CA_INFO, 1, " -->CA_SET_PID Success !"); 633 631 break; 634 632 default: 635 633 result = -EOPNOTSUPP;
-7
include/uapi/linux/dvb/ca.h
··· 73 73 unsigned char cw[8]; 74 74 }; 75 75 76 - struct ca_pid { 77 - unsigned int pid; 78 - int index; /* -1 == disable*/ 79 - }; 80 - 81 76 #define CA_RESET _IO('o', 128) 82 77 #define CA_GET_CAP _IOR('o', 129, struct ca_caps) 83 78 #define CA_GET_SLOT_INFO _IOR('o', 130, struct ca_slot_info) ··· 80 85 #define CA_GET_MSG _IOR('o', 132, struct ca_msg) 81 86 #define CA_SEND_MSG _IOW('o', 133, struct ca_msg) 82 87 #define CA_SET_DESCR _IOW('o', 134, struct ca_descr) 83 - #define CA_SET_PID _IOW('o', 135, struct ca_pid) 84 88 85 89 #if !defined (__KERNEL__) 86 90 ··· 89 95 typedef struct ca_caps ca_caps_t; 90 96 typedef struct ca_msg ca_msg_t; 91 97 typedef struct ca_descr ca_descr_t; 92 - typedef struct ca_pid ca_pid_t; 93 98 94 99 #endif 95 100