mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'Heiko Stübner'" <heiko@sntech.de>
Cc: "'Bryan Wu'" <cooloney@gmail.com>,
	"'Lee Jones'" <lee.jones@linaro.org>,
	linux-kernel@vger.kernel.org,
	"'Jingoo Han'" <jg1.han@samsung.com>
Subject: Re: [PATCH] backlight: use of_find_backlight_by_node stub when backlight class disabled
Date: Thu, 30 Oct 2014 13:44:16 +0900	[thread overview]
Message-ID: <000501cff3fc$2946aec0$7bd40c40$%han@samsung.com> (raw)
In-Reply-To: <50522512.UJWUZtqLop@diego>

On Wednesday, October 29, 2014 9:20 AM, Heiko Stübner wrote:
> 
> Drivers may want to search for an optional backlight even when the backlight
> class is disabled. In this case the linker would miss the function referenced
> in the backlight header.
> 
> Therefore use the stub function also when the backlight class is disabled.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

of_find_backlight_by_node()is defined at ./drivers/video/backlight/backlight.c
file. Also, this file can be built when CONFIG_BACKLIGHT_CLASS_DEVICE=y.
So, in order to prevent the possible build error, this patch looks good.

Acked-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
>  include/linux/backlight.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/backlight.h b/include/linux/backlight.h
> index adb14a8..d9cb644 100644
> --- a/include/linux/backlight.h
> +++ b/include/linux/backlight.h
> @@ -157,7 +157,7 @@ struct generic_bl_info {
>  	void (*kick_battery)(void);
>  };
> 
> -#ifdef CONFIG_OF
> +#if defined(CONFIG_OF) && defined(CONFIG_BACKLIGHT_CLASS_DEVICE)
>  struct backlight_device *of_find_backlight_by_node(struct device_node *node);
>  #else
>  static inline struct backlight_device *
> --
> 2.0.1



  reply	other threads:[~2014-10-30  4:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29  0:20 Heiko Stübner
2014-10-30  4:44 ` Jingoo Han [this message]
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

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='000501cff3fc$2946aec0$7bd40c40$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=cooloney@gmail.com \
    --cc=heiko@sntech.de \
    --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

Powered by JetHome