On 04.10.2018 23:34, Takashi Iwai wrote:
Rather include <linux/math64.h>, and put in the appropriate order.
Sorry, I had a bit of hard time finding the function in first place, but what is the appropriate order?
Since you're calling in the same pattern, it's better to consider to provide a helper to call snd_usb_ctl_msg() with the given type (and shows the error there). The helper can take snd_usb_lock_shutdown() and unlock in it, so it'll simplify a lot.
In first case I'm calling GET_STATUS1 and the lock surrounds that. In the second case I'm calling both GET_STATUS1 and GET_CURRENT_FREQ and the lock surrounds both calls togher. I didn't completely understand how to achieve this with the helper, unless you meant through some extra argument and control path inside?
- Jussi