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

staging: tidspbridge: remove drv_init() and drv_exit()

The drv module has a drv_init() and a drv_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
1f2cd527 2a90957f

+2 -55
-23
drivers/staging/tidspbridge/include/dspbridge/drv.h
··· 199 199 extern int drv_destroy(struct drv_object *driver_obj); 200 200 201 201 /* 202 - * ======== drv_exit ======== 203 - * Purpose: 204 - * Exit the DRV module, freeing any modules initialized in drv_init. 205 - * Parameters: 206 - * Returns: 207 - * Requires: 208 - * Ensures: 209 - */ 210 - extern void drv_exit(void); 211 - 212 - /* 213 202 * ======== drv_get_first_dev_object ======== 214 203 * Purpose: 215 204 * Returns the Ptr to the FirstDev Object in the List ··· 281 292 * Ensures: 282 293 */ 283 294 extern u32 drv_get_next_dev_extension(u32 dev_extension); 284 - 285 - /* 286 - * ======== drv_init ======== 287 - * Purpose: 288 - * Initialize the DRV module. 289 - * Parameters: 290 - * Returns: 291 - * TRUE if success; FALSE otherwise. 292 - * Requires: 293 - * Ensures: 294 - */ 295 - extern int drv_init(void); 296 295 297 296 /* 298 297 * ======== drv_insert_dev_object ========
+2 -6
drivers/staging/tidspbridge/pmgr/dspapi.c
··· 278 278 proc_exit(); 279 279 mgr_exit(); 280 280 rmm_exit(); 281 - drv_exit(); 282 281 } 283 282 } 284 283 ··· 289 290 bool api_init(void) 290 291 { 291 292 bool ret = true; 292 - bool fdrv, fdev, fcod, fchnl, fmsg, fio; 293 + bool fdev, fcod, fchnl, fmsg, fio; 293 294 bool fmgr, fproc, fnode, fdisp, fstrm, frmm; 294 295 295 296 if (api_c_refs == 0) { 296 297 /* initialize driver and other modules */ 297 - fdrv = drv_init(); 298 298 fmgr = mgr_init(); 299 299 fproc = proc_init(); 300 300 fnode = node_init(); ··· 305 307 fio = io_init(); 306 308 fdev = dev_init(); 307 309 fcod = cod_init(); 308 - ret = fdrv && fdev && fchnl && fcod && fmsg && fio; 310 + ret = fdev && fchnl && fcod && fmsg && fio; 309 311 ret = ret && fmgr && fproc && frmm; 310 312 if (!ret) { 311 - if (fdrv) 312 - drv_exit(); 313 313 314 314 if (fmgr) 315 315 mgr_exit();
-26
drivers/staging/tidspbridge/rmgr/drv.c
··· 51 51 }; 52 52 53 53 /* ----------------------------------- Globals */ 54 - static s32 refs; 55 54 static bool ext_phys_mem_pool_enabled; 56 55 struct ext_phys_mem_pool { 57 56 u32 phys_mem_base; ··· 331 332 } 332 333 333 334 /* 334 - * ======== drv_exit ======== 335 - * Purpose: 336 - * Discontinue usage of the DRV module. 337 - */ 338 - void drv_exit(void) 339 - { 340 - refs--; 341 - } 342 - 343 - /* 344 335 * ======== = drv_destroy ======== = 345 336 * purpose: 346 337 * Invoked during bridge de-initialization ··· 485 496 } 486 497 487 498 return dw_dev_extension; 488 - } 489 - 490 - /* 491 - * ======== drv_init ======== 492 - * Purpose: 493 - * Initialize DRV module private state. 494 - */ 495 - int drv_init(void) 496 - { 497 - s32 ret = 1; /* function return value */ 498 - 499 - if (ret) 500 - refs++; 501 - 502 - return ret; 503 499 } 504 500 505 501 /*