Every call to gpio_ensure_requested() in gpiolib.c is done while holding gpio_lock and this function is not exported.
Race with ...?
The only place where chip->dead is changed to zero is later in gpiochip_remove_sleeping() (which cannot be called at the same time for the same
chip more than once anyway) or gpiochip_add() which is new chip registration function.
(..)
(..)
I agree with you on this.
W dniu 10.11.2010 10:49, Thomas Gleixner pisze:
The only way to do GPIO chip removal in the current code is to busy-loop.
"Sloppy" (as you called it) waiting is still more CPU-friendly than looping
in hope that somebody will finally release the chip.
If you would like to implement it as kobject then go ahead and post the code
so it can be used in drivers.
Best regards and thanks for comments,
Maciej Szmigiero
--