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

staging: tidspbridge: remove proc_init() and proc_exit()

The proc module has a proc_init() and a proc_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
02a63f9d d4040fad

+2 -63
-28
drivers/staging/tidspbridge/include/dspbridge/proc.h
··· 189 189 u32 resource_info_size); 190 190 191 191 /* 192 - * ======== proc_exit ======== 193 - * Purpose: 194 - * Decrement reference count, and free resources when reference count is 195 - * 0. 196 - * Parameters: 197 - * Returns: 198 - * Requires: 199 - * PROC is initialized. 200 - * Ensures: 201 - * When reference count == 0, PROC's private resources are freed. 202 - */ 203 - extern void proc_exit(void); 204 - 205 - /* 206 192 * ======== proc_get_dev_object ========= 207 193 * Purpose: 208 194 * Returns the DEV Hanlde for a given Processor handle ··· 207 221 */ 208 222 extern int proc_get_dev_object(void *hprocessor, 209 223 struct dev_object **device_obj); 210 - 211 - /* 212 - * ======== proc_init ======== 213 - * Purpose: 214 - * Initialize PROC's private state, keeping a reference count on each 215 - * call. 216 - * Parameters: 217 - * Returns: 218 - * TRUE if initialized; FALSE if error occurred. 219 - * Requires: 220 - * Ensures: 221 - * TRUE: A requirement for the other public PROC functions. 222 - */ 223 - extern bool proc_init(void); 224 224 225 225 /* 226 226 * ======== proc_get_state ========
+2 -7
drivers/staging/tidspbridge/pmgr/dspapi.c
··· 274 274 strm_exit(); 275 275 disp_exit(); 276 276 node_exit(); 277 - proc_exit(); 278 277 mgr_exit(); 279 278 rmm_exit(); 280 279 } ··· 288 289 { 289 290 bool ret = true; 290 291 bool fdev, fchnl, fmsg, fio; 291 - bool fmgr, fproc, fnode, fdisp, fstrm, frmm; 292 + bool fmgr, fnode, fdisp, fstrm, frmm; 292 293 293 294 if (api_c_refs == 0) { 294 295 /* initialize driver and other modules */ 295 296 fmgr = mgr_init(); 296 - fproc = proc_init(); 297 297 fnode = node_init(); 298 298 fdisp = disp_init(); 299 299 fstrm = strm_init(); ··· 302 304 fio = io_init(); 303 305 fdev = dev_init(); 304 306 ret = fdev && fchnl && fmsg && fio; 305 - ret = ret && fmgr && fproc && frmm; 307 + ret = ret && fmgr && frmm; 306 308 if (!ret) { 307 309 308 310 if (fmgr) ··· 310 312 311 313 if (fstrm) 312 314 strm_exit(); 313 - 314 - if (fproc) 315 - proc_exit(); 316 315 317 316 if (fnode) 318 317 node_exit();
-28
drivers/staging/tidspbridge/rmgr/proc.c
··· 98 98 struct list_head proc_list; 99 99 }; 100 100 101 - static u32 refs; 102 - 103 101 DEFINE_MUTEX(proc_lock); /* For critical sections */ 104 102 105 103 /* ----------------------------------- Function Prototypes */ ··· 907 909 } 908 910 909 911 /* 910 - * ======== proc_exit ======== 911 - * Purpose: 912 - * Decrement reference count, and free resources when reference count is 913 - * 0. 914 - */ 915 - void proc_exit(void) 916 - { 917 - refs--; 918 - } 919 - 920 - /* 921 912 * ======== proc_get_dev_object ======== 922 913 * Purpose: 923 914 * Return the Dev Object handle for a given Processor. ··· 994 1007 int status; 995 1008 status = -ENOSYS; 996 1009 return status; 997 - } 998 - 999 - /* 1000 - * ======== proc_init ======== 1001 - * Purpose: 1002 - * Initialize PROC's private state, keeping a reference count on each call 1003 - */ 1004 - bool proc_init(void) 1005 - { 1006 - bool ret = true; 1007 - 1008 - if (ret) 1009 - refs++; 1010 - 1011 - return ret; 1012 1010 } 1013 1011 1014 1012 /*