[PATCH v2 19/19] fbdev: sh-mobile-lcdcfb: Enable the driver on all ARM platforms

Geert Uytterhoeven geert at linux-m68k.org
Wed Nov 6 03:46:24 EST 2013


On Wed, Nov 6, 2013 at 1:27 AM, Laurent Pinchart
<laurent.pinchart at ideasonboard.com> wrote:
>> +#ifdef CONFIG_PM_SLEEP
>>  static int sh_mobile_meram_suspend(struct device *dev)
>>  {
>>       struct platform_device *pdev = to_platform_device(dev);
>> @@ -592,7 +593,9 @@ static int sh_mobile_meram_suspend(struct device *dev)
>>       }
>>       return 0;
>>  }
>> +#endif
>>
>> +#ifdef CONFIG_PM_RUNTIME
>>  static int sh_mobile_meram_resume(struct device *dev)
>>  {
>>       struct platform_device *pdev = to_platform_device(dev);
>> @@ -611,6 +614,7 @@ static int sh_mobile_meram_resume(struct device *dev)
>>               meram_write_reg(priv->base, common_regs[i], priv->regs[i]);
>>       return 0;
>>  }
>> +#endif
>>
>>  static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops,
>>                           sh_mobile_meram_suspend,
>
> I'm a bit surprised, looking at the definition of UNIVERSAL_DEV_PM_OPS, I
> would have thought that both functions would be used when either
> CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined. I would thus have guarded
> both functions with #if defined(CONFIG_PM_SLEEP) ||
> defined(CONFIG_PM_RUNTIME).

You're right. I missed that both function pointers are passed to both macros.

Will send v2.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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



More information about the linux-arm-kernel mailing list