Re: [PATCH v2] leds: add new lp8788 led driver

From: Mark Brown
Date: Tue Jul 24 2012 - 08:55:12 EST


On Tue, Jul 24, 2012 at 08:23:00AM +0800, Bryan Wu wrote:
> On Mon, Jul 23, 2012 at 2:19 AM, Mark Brown

> > If the work is flushed then the state that userspace thought was set
> > when the driver is removed will actually be set before the driver is
> > removed. This is fairly minor but might be useful.

> So what's kind of state you mentioned here that is cared by user
> space. I find these 2 functions are quite confused for use right now.

Any state - none of the drivers with sleeping I/O can do anything
directly in their callbacks so they defer everything to work (we really
should have that in the core but it was too annoying to implement last
time I looked).

> Literally, canceling normally will remove pending work item and wait
> for running work item to finish. flushing will wait for both pending
> and running work item to finish.

Right, so if we flush it means we know that any scheduled work actually
ran and implemented whatever change was requested.

Attachment: signature.asc
Description: Digital signature