From: "Heiko Stübner" <heiko@sntech.de>
To: Lee Jones <lee.jones@linaro.org>
Cc: Jingoo Han <jg1.han@samsung.com>,
"'Bryan Wu'" <cooloney@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] backlight: use of_find_backlight_by_node stub when backlight class disabled
Date: Tue, 11 Nov 2014 00:41:10 +0100 [thread overview]
Message-ID: <1767565.D903P0xsEy@diego> (raw)
In-Reply-To: <20141104171532.GS17577@x1>
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
prev parent reply other threads:[~2014-11-10 23:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 0:20 [PATCH] backlight: use of_find_backlight_by_node stub when backlight class disabled Heiko Stübner
2014-10-30 4:44 ` Jingoo Han
2014-11-03 17:17 ` Lee Jones
2014-11-04 9:07 ` Lee Jones
2014-11-04 10:18 ` Jingoo Han
2014-11-04 14:42 ` Lee Jones
2014-11-04 15:02 ` Heiko Stübner
2014-11-04 17:15 ` Lee Jones
2014-11-10 23:41 ` Heiko Stübner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1767565.D903P0xsEy@diego \
--to=heiko@sntech.de \
--cc=cooloney@gmail.com \
--cc=jg1.han@samsung.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox