Re: [PATCH v2] driver core: platform_bus: allow runtime override of dev_pm_ops

From: Kevin Hilman
Date: Wed Aug 25 2010 - 15:50:10 EST


Grant Likely <grant.likely@xxxxxxxxxxxx> writes:

> On Mon, Aug 23, 2010 at 11:18 AM, Kevin Hilman
> <khilman@xxxxxxxxxxxxxxxxxxx> wrote:
>> Currently, the platform_bus allows customization of several of the
>> busses dev_pm_ops methods by using weak symbols so that platform code
>> can override them.  The weak-symbol approach is not scalable when
>> wanting to support multiple platforms in a single kernel binary.
>>
>> Instead, provide __init methods for platform code to customize the
>> dev_pm_ops methods at runtime.
>>
>> NOTE: after these dynamic methods are merged, the weak symbols should
>>      be removed from drivers/base/platform.c.  AFAIK, this will only
>>      affect SH and sh-mobile which should be converted to use this
>>      runtime approach instead of the weak symbols.  After SH &
>>      sh-mobile are converted, the weak symobols could be removed.
>>
>> Tested on OMAP3.
>>
>> Cc: Grant Likely <grant.likely@xxxxxxxxxxxx>
>> Cc: Magnus Damm <magnus.damm@xxxxxxxxx>
>> Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
>
> Looks good to me. A handful of nitpicks below, I don't know if Greg
> will want you to respin for these or not. Feel free to add my
> acked-by line though:
>
> Acked-by: Grant Likely <grant.likely@xxxxxxxxxxxx>

Thanks, here's a re-spin with your signoff and fixing the issues you
raised.

Applies to v2.6.36-rc1.

Kevin