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

staging: tidspbridge: remove disp_init() and disp_exit()

The disp module has a disp_init() and a disp_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Víctor Manuel Jáquez Leal and committed by
Greg Kroah-Hartman
2f69a43b 18ff1592

+1 -62
-31
drivers/staging/tidspbridge/include/dspbridge/disp.h
··· 53 53 * -ENOMEM: Insufficient memory for requested resources. 54 54 * -EPERM: Unable to create dispatcher. 55 55 * Requires: 56 - * disp_init(void) called. 57 56 * disp_attrs != NULL. 58 57 * hdev_obj != NULL. 59 58 * dispatch_obj != NULL. ··· 72 73 * disp_obj: Node Dispatcher object. 73 74 * Returns: 74 75 * Requires: 75 - * disp_init(void) called. 76 76 * Valid disp_obj. 77 77 * Ensures: 78 78 * disp_obj is invalid. 79 79 */ 80 80 extern void disp_delete(struct disp_object *disp_obj); 81 - 82 - /* 83 - * ======== disp_exit ======== 84 - * Discontinue usage of DISP module. 85 - * 86 - * Parameters: 87 - * Returns: 88 - * Requires: 89 - * disp_init(void) previously called. 90 - * Ensures: 91 - * Any resources acquired in disp_init(void) will be freed when last DISP 92 - * client calls disp_exit(void). 93 - */ 94 - extern void disp_exit(void); 95 - 96 - /* 97 - * ======== disp_init ======== 98 - * Initialize the DISP module. 99 - * 100 - * Parameters: 101 - * Returns: 102 - * TRUE if initialization succeeded, FALSE otherwise. 103 - * Ensures: 104 - */ 105 - extern bool disp_init(void); 106 81 107 82 /* 108 83 * ======== disp_node_change_priority ======== ··· 93 120 * 0: Success. 94 121 * -ETIME: A timeout occurred before the DSP responded. 95 122 * Requires: 96 - * disp_init(void) called. 97 123 * Valid disp_obj. 98 124 * hnode != NULL. 99 125 * Ensures: ··· 120 148 * -ETIME: A timeout occurred before the DSP responded. 121 149 * -EPERM: A failure occurred, unable to create node. 122 150 * Requires: 123 - * disp_init(void) called. 124 151 * Valid disp_obj. 125 152 * pargs != NULL. 126 153 * hnode != NULL. ··· 149 178 * 0: Success. 150 179 * -ETIME: A timeout occurred before the DSP responded. 151 180 * Requires: 152 - * disp_init(void) called. 153 181 * Valid disp_obj. 154 182 * hnode != NULL. 155 183 * Ensures: ··· 174 204 * 0: Success. 175 205 * -ETIME: A timeout occurred before the DSP responded. 176 206 * Requires: 177 - * disp_init(void) called. 178 207 * Valid disp_obj. 179 208 * hnode != NULL. 180 209 * Ensures:
+1 -6
drivers/staging/tidspbridge/pmgr/dspapi.c
··· 272 272 msg_exit(); 273 273 io_exit(); 274 274 strm_exit(); 275 - disp_exit(); 276 275 mgr_exit(); 277 276 rmm_exit(); 278 277 } ··· 286 287 { 287 288 bool ret = true; 288 289 bool fdev, fchnl, fmsg, fio; 289 - bool fmgr, fdisp, fstrm, frmm; 290 + bool fmgr, fstrm, frmm; 290 291 291 292 if (api_c_refs == 0) { 292 293 /* initialize driver and other modules */ 293 294 fmgr = mgr_init(); 294 - fdisp = disp_init(); 295 295 fstrm = strm_init(); 296 296 frmm = rmm_init(); 297 297 fchnl = chnl_init(); ··· 306 308 307 309 if (fstrm) 308 310 strm_exit(); 309 - 310 - if (fdisp) 311 - disp_exit(); 312 311 313 312 if (fchnl) 314 313 chnl_exit();
-25
drivers/staging/tidspbridge/rmgr/disp.c
··· 69 69 u32 data_mau_size; /* Size of DSP Data MAU */ 70 70 }; 71 71 72 - static u32 refs; 73 - 74 72 static void delete_disp(struct disp_object *disp_obj); 75 73 static int fill_stream_def(rms_word *pdw_buf, u32 *ptotal, u32 offset, 76 74 struct node_strmdef strm_def, u32 max, ··· 168 170 void disp_delete(struct disp_object *disp_obj) 169 171 { 170 172 delete_disp(disp_obj); 171 - } 172 - 173 - /* 174 - * ======== disp_exit ======== 175 - * Discontinue usage of DISP module. 176 - */ 177 - void disp_exit(void) 178 - { 179 - refs--; 180 - } 181 - 182 - /* 183 - * ======== disp_init ======== 184 - * Initialize the DISP module. 185 - */ 186 - bool disp_init(void) 187 - { 188 - bool ret = true; 189 - 190 - if (ret) 191 - refs++; 192 - 193 - return ret; 194 173 } 195 174 196 175 /*