[PATCH v9 07/12] ARM: EXYNOS: introduce soc specific pm ops

Arnd Bergmann arnd at arndb.de
Thu Mar 30 07:03:59 PDT 2017


On Thu, Mar 30, 2017 at 3:17 PM, Pankaj Dubey <pankaj.dubey at samsung.com> wrote:

> +               .soc_id = "EXYNOS5250",
> +               .data = &exynos_common_s2r_data
> +       },
> +       {
> +               .soc_id = "EXYNOS5260",
> +               .data = &exynos_common_s2r_data
> +       },
> +       {
> +               .soc_id = "EXYNOS5440",
> +               .data = &exynos_common_s2r_data
> +       },
> +       {
> +               .soc_id = "EXYNOS5410",
> +               .data = &exynos_common_s2r_data
> +       },
> +       {
> +               .soc_id = "EXYNOS5420",
> +               .data = &exynos_common_s2r_data
> +       },
> +       {
> +               .soc_id = "EXYNOS5800",
> +               .data = &exynos_common_s2r_data

If these are all the same, just make that soc_id="EXYNOS5*"
to match them all at once.

> +int __init exynos_s2r_init(void)
> +{
> +       const struct soc_device_attribute *match;
> +
> +       match = soc_device_match(exynos_soc_revision);
> +
> +       if (match)
> +               s2r_data = (const struct exynos_s2r_data *) match->data;
> +
> +       if (!s2r_data)
> +               return -ENODEV;
> +
> +       return 0;
> +}
> +arch_initcall(exynos_s2r_init);
> +

Can you replace the arch_initcall with a direct call from the machine
init function?

        Arnd



More information about the linux-arm-kernel mailing list