On Wednesday 10 October 2012 10:33:17 Ming Lei wrote: > On Tue, Oct 9, 2012 at 4:50 PM, Oliver Neukum <oneukum@xxxxxxx> wrote: > > This is awkward to use in suspend()/resume() > > Could you make both versions available? > > Good catch, thanks for your review. > > As far as I can think of, the mutex_is_locked() trick can solve the problem. No, you cannot do this. It introduces a race. The check for mutex_is_locked() can be positive because the device is being suspended and the IO would be done when it is too late. Please don't try to be fancy here, just export two versions of each call. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html