
3 Mar
2020
3 Mar
'20
9:23 a.m.
Hi,
Thanks for having a look.
Either use `priv->soc` or the guard throughout the driver. Please don't mix both.
But have used #ifdef guard only where it is really necessary and to keep implementation clean used priv->soc.
+static const struct udevice_id owl_clk_ids[] = { +#if defined(CONFIG_MACH_S900)
{ .compatible = "actions,s900-cmu", .data = S900 },
+#elif defined(CONFIG_MACH_S700)
{ .compatible = "actions,s700-cmu", .data = S700 },
{ }
+#endif
Guard is not necessary here.
But this is something suggested by Andre in previous review round
"just protect the compatible strings below with MACH_S[79]00 ifdefs, so that both SoCs share the file, but compile to different drivers supporting only one compatible (due to the different reg_sx00.h and the #ifdef protected parts)."
Thanks Amit