From: chas w. <ch...@cm...> - 2003-09-29 19:12:33
|
In message <200...@ga...>,Mitchell Blank Jr writes: >Hmmm... maybe we should just put the autoload into atm_dev_lookup? i thought about it but its going to look pretty ugly. to keep from doing the request_module under the lock it would have to look something like: struct atm_dev *atm_dev_lookup(int number) { struct atm_dev *dev; int retry = 1; retry: read_lock(&atm_dev_lock); dev = __atm_dev_lookup(number); read_unlock(&atm_dev_lock); if (!dev && retry) { --retry; request_module("atm-device-%d", number); goto retry; } return dev; } |