mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] backlight: platform_lcd: remove unnecessary #ifdef CONFIG_OF
@ 2014-08-22  6:23 Jingoo Han
  2014-08-22  7:13 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Jingoo Han @ 2014-08-22  6:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fbdev, 'Bryan Wu', 'Lee Jones',
	'Jingoo Han'

Remove unnecessary #ifdef CONFIG_OF, because this is already
handled by the of_match_ptr macro.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/video/backlight/platform_lcd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c
index c3d2e209fc8f..2bca5ca760ee 100644
--- a/drivers/video/backlight/platform_lcd.c
+++ b/drivers/video/backlight/platform_lcd.c
@@ -137,13 +137,11 @@ static int platform_lcd_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend,
 			platform_lcd_resume);
 
-#ifdef CONFIG_OF
 static const struct of_device_id platform_lcd_of_match[] = {
 	{ .compatible = "platform-lcd" },
 	{},
 };
 MODULE_DEVICE_TABLE(of, platform_lcd_of_match);
-#endif
 
 static struct platform_driver platform_lcd_driver = {
 	.driver		= {
-- 
2.0.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] backlight: platform_lcd: remove unnecessary #ifdef CONFIG_OF
  2014-08-22  6:23 [PATCH] backlight: platform_lcd: remove unnecessary #ifdef CONFIG_OF Jingoo Han
@ 2014-08-22  7:13 ` Geert Uytterhoeven
  2014-08-22  7:17   ` Jingoo Han
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-08-22  7:13 UTC (permalink / raw)
  To: Jingoo Han
  Cc: linux-kernel, Linux Fbdev development list, Bryan Wu, Lee Jones

On Fri, Aug 22, 2014 at 8:23 AM, Jingoo Han <jg1.han@samsung.com> wrote:
> Remove unnecessary #ifdef CONFIG_OF, because this is already
> handled by the of_match_ptr macro.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/video/backlight/platform_lcd.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c
> index c3d2e209fc8f..2bca5ca760ee 100644
> --- a/drivers/video/backlight/platform_lcd.c
> +++ b/drivers/video/backlight/platform_lcd.c
> @@ -137,13 +137,11 @@ static int platform_lcd_resume(struct device *dev)
>  static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend,
>                         platform_lcd_resume);
>
> -#ifdef CONFIG_OF
>  static const struct of_device_id platform_lcd_of_match[] = {
>         { .compatible = "platform-lcd" },
>         {},
>  };
>  MODULE_DEVICE_TABLE(of, platform_lcd_of_match);
> -#endif
>
>  static struct platform_driver platform_lcd_driver = {
>         .driver         = {

Doesn't this introduce a compiler warning ("defined but not used") if
CONFIG_OF is not set?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] backlight: platform_lcd: remove unnecessary #ifdef CONFIG_OF
  2014-08-22  7:13 ` Geert Uytterhoeven
@ 2014-08-22  7:17   ` Jingoo Han
  0 siblings, 0 replies; 3+ messages in thread
From: Jingoo Han @ 2014-08-22  7:17 UTC (permalink / raw)
  To: 'Geert Uytterhoeven'
  Cc: linux-kernel, 'Linux Fbdev development list',
	'Bryan Wu', 'Lee Jones', 'Jingoo Han'

On Friday, August 22, 2014 4:13 PM, Jingoo Han wrote:
> On Fri, Aug 22, 2014 at 8:23 AM, Jingoo Han <jg1.han@samsung.com> wrote:
> > Remove unnecessary #ifdef CONFIG_OF, because this is already
> > handled by the of_match_ptr macro.
> >
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> > ---
> >  drivers/video/backlight/platform_lcd.c | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c
> > index c3d2e209fc8f..2bca5ca760ee 100644
> > --- a/drivers/video/backlight/platform_lcd.c
> > +++ b/drivers/video/backlight/platform_lcd.c
> > @@ -137,13 +137,11 @@ static int platform_lcd_resume(struct device *dev)
> >  static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend,
> >                         platform_lcd_resume);
> >
> > -#ifdef CONFIG_OF
> >  static const struct of_device_id platform_lcd_of_match[] = {
> >         { .compatible = "platform-lcd" },
> >         {},
> >  };
> >  MODULE_DEVICE_TABLE(of, platform_lcd_of_match);
> > -#endif
> >
> >  static struct platform_driver platform_lcd_driver = {
> >         .driver         = {
> 
> Doesn't this introduce a compiler warning ("defined but not used") if
> CONFIG_OF is not set?

Hi Geert Uytterhoeven,

Thank you for your feedback. I already tested this patch with both
cases such as CONFIG_OF=y and CONFIG_OF=n.  When CONFIG_OF is not set,
it does NOT make any compile warnings such as "defined but not used".
Thank you.

Best regards,
Jingoo Han


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-22  7:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-22  6:23 [PATCH] backlight: platform_lcd: remove unnecessary #ifdef CONFIG_OF Jingoo Han
2014-08-22  7:13 ` Geert Uytterhoeven
2014-08-22  7:17   ` Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®