[PATCH v2] video/imxfb.c: allow usage without BACKLIGHT_CLASS_DEVICE

Eric Bénard eric at eukrea.com
Thu Jul 29 09:03:20 EDT 2010


Le 29/07/2010 14:45, Uwe Kleine-König a écrit :
> On Thu, Jul 29, 2010 at 11:47:36AM +0200, Eric Bénard wrote:
>> Signed-off-by: Eric Bénard<eric at eukrea.com>
>> ---
>> v2:	handle CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE
>>
>>   drivers/video/imxfb.c |   18 ++++++++++++++++--
>>   1 files changed, 16 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
>> index 43f0639..a6f0d3f 100644
>> --- a/drivers/video/imxfb.c
>> +++ b/drivers/video/imxfb.c
>> @@ -175,7 +175,10 @@ struct imxfb_info {
>>
>>   	struct imx_fb_videomode *mode;
>>   	int			num_modes;
>> +#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
>> +	defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
>>   	struct backlight_device *bl;
>> +#endif
> I suspect this fails to build with
> 	CONFIG_BACKLIGHT_CLASS_DEVICE=m
> 	CONFIG_FB_IMX=y
>
you're right, I tested both =y and both =m but not one =y one =m :-(

> Maybe do the following:
>
> #if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
> 	(defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) == defined(CONFIG_FB_IMX_MODULE))
> #define BACKLIGHT_AVAILABLE
> #endif
>
> and use #ifdef BACKLIGHT_AVAILABLE to guard the backlight code?
>
> I didn't test this though.
>
patch follows (compile tested with all cases, including this new one ;-).

Eric



More information about the linux-arm-kernel mailing list