Re: [PATCH v2 04/15] ARM: milbeaut: Add basic support for Milbeaut m10v SoC

From: Sugaya, Taichi
Date: Wed Feb 20 2019 - 00:18:03 EST


Hi,

On 2019/02/19 18:21, Arnd Bergmann wrote:
On Tue, Feb 19, 2019 at 8:12 AM Sugaya, Taichi
<sugaya.taichi@xxxxxxxxxxxxx> wrote:
On 2019/02/18 21:15, Arnd Bergmann wrote:
On Fri, Feb 8, 2019 at 1:26 PM Sugaya Taichi
<sugaya.taichi@xxxxxxxxxxxxx> wrote:

+static int __init m10v_pm_init(void)
+{
+ suspend_set_ops(&m10v_pm_ops);
+
+ return 0;
+}
+late_initcall(m10v_pm_init);

This requires a check to ensure you are actually on the right platform,
otherwise you break suspend/resume in a multiplatform kernel running
on anything other than milbeaut.


OK.
I think the solution is adding a "if statement with mlbeaut compatible"
above suspend_set_ops(&m10v_pm_ops).

Right, you can either use a call to of_machine_is_compatible(),
or you add a machine descriptor with OF_MACHINE_START()
and use this as the init_late() callback.


Yeah, I will use "of_machine_is_compatible()".

Thanks,
Sugaya Taichi

Arnd