lkml.org 
[lkml]   [2014]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] backlight: use of_find_backlight_by_node stub when backlight class disabled
Date
Hi,

Am Dienstag, 4. November 2014, 17:15:32 schrieb Lee Jones:
> Actually there is a better way still:
>
> #ifdef CONFIG_OF && IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> struct backlight_device *of_find_backlight_by_node(struct device_node
> *node); #else
> static inline struct backlight_device *
> of_find_backlight_by_node(struct device_node *node)
> {
> return NULL;
> }
> #endif

After further looking at the problem, I'm actually not even sure, if my
approach is the best one at all.

The problem I was trying to fix was panel-simple (drivers/gpu/drm/panel/panel-
simple.c) checking for an optional backlight, while not depending on the
backlight-class itself.

As both components do not have a relationship, there exist the possibility of
panel-simply being build into the kernel while the backlight_class is build as
module. So while the IS_ENABLED check would define the prototype, panel-generic
would still miss the function when linking.

Should panel-generic simply depend in the backlight_class instead?


Thanks
Heiko


\
 
 \ /
  Last update: 2014-11-11 01:01    [W:0.047 / U:1.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site