Re: [PATCH v2] leds: add a dac124s085 SPI LED driver

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Guennadi Liakhovetski
Date: Monday, December 29, 2008 - 4:54 pm

On Mon, 29 Dec 2008, Andrew Morton wrote:


Actually this was an attempt to fix the endianness issue pointed out in an 
earlier review by Ben Dooks, have I done it wrong?


Here's why (from include/linux/leds.h):

	/* Set LED brightness level */
	/* Must not sleep, use a workqueue if needed */
	void		(*brightness_set)(struct led_classdev *led_cdev,
					  enum led_brightness brightness);


This seems to be a common "feature" of multiple leds drivers. In fact, if 
the two calls are successive, then the queue will take care of the 
execution order. If they are "simultaneous," i.e., the callers didn't 
synchronise, how do we know who is the first and who is the second? Isn't 
the one that _completes_ first actually the first? Or am I missing 
something?

Thanks for the review!
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office@denx.de
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] leds: add a dac124s085 SPI LED driver, Guennadi Liakhovetski, (Thu Dec 18, 4:15 am)
Re: [PATCH] leds: add a dac124s085 SPI LED driver, Ben Dooks, (Thu Dec 18, 5:06 am)
[PATCH v2] leds: add a dac124s085 SPI LED driver, Guennadi Liakhovetski, (Thu Dec 18, 5:51 am)
Re: [PATCH v2] leds: add a dac124s085 SPI LED driver, Andrew Morton, (Mon Dec 29, 4:11 pm)
Re: [PATCH v2] leds: add a dac124s085 SPI LED driver, Guennadi Liakhovetski, (Mon Dec 29, 4:54 pm)