Re: [PATCH v5] HID: corsair-void: Add Corsair Void headset family driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11. 02. 25, 12:30, Stuart wrote:
And what about having one work for all three (reg, up, unreg) as I
suggested. As I wrote, IMO, you would need no lock then. Only flags to
see what to do there.

I wasn't super keen on that because it felt like forcing three otherwise
separate things into one, but it makes sense if I look at it as corsair_void's
work function.

Is there a guarantee that the same work item won't run twice at the same time?

It's a single work, it cannot run twice.

Do I need to make a work queue for that? I'm also not sure how to pass
arguments to the work function. I'm sure all of that is answered by some
documentation somewhere, but I couldn't find it myself when I looked previously.

E.g. set_bit() (one bit per OP) to something like 'unsigned long flags' in 'struct corsair_void_drvdata'. But it depends if you want to preserve order of actions... (Which was not guaranteed with separate queues anyway, so I assume not?)

thanks,
--
js
suse labs




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux