[PATCH v2] soc: mediatek: SCPSYS: use module_platform_driver
Matthias Brugger
matthias.bgg at gmail.com
Fri Dec 18 00:33:36 PST 2015
Hi Paul,
On 17/12/15 16:16, Paul Gortmaker wrote:
> [Re: [PATCH v2] soc: mediatek: SCPSYS: use module_platform_driver] On 17/12/2015 (Thu 10:52) Daniel Kurtz wrote:
>
> [...]
>
>>
>> Also, since scpsys' Kconfig is "bool" not "tristate" it isn't a real
>> module so I think we should use:
>> builtin_platform_driver not module_platform_driver
>>
>> CC'ing Paul Gortmaker who seems to be on a mass
>> builtin_platform_driver conversion at the moment, see:
>> https://lkml.org/lkml/2015/12/9/952
>>
>
> Good guess. In my giant queue I have that change. I just haven't got
> around to the requisite triple check and multi arch rebuild tests and
> put out a series for soc yet. Here is the short list for soc:
>
> drivers-soc-make-mediatek-mtk-scpsys.c-explicitly-no.patch
> drivers-soc-make-qcom-spm.c-explicitly-non-modular.patch
> drivers-soc-make-samsung-exynos-srom.c.c-explicitly-.patch
> drivers-soc-make-sunxi_sram.c-explicitly-non-modular.patch
> drivers-soc-tegra-make-fuse-tegra.c-explicitly-non-m.patch
>
> ...and here is the patch you predicted. If someone wants to fold
> the change into their work then great; I'll be happy to drop
> mine and be with one less patch to herd along.
>
I take this through my tree.
Thanks a lot.
Matthias
> Paul.
> --
>
> From eb32cc2c1db8192c08dd64af69cb172b3be4c98b Mon Sep 17 00:00:00 2001
> From: Paul Gortmaker <paul.gortmaker at windriver.com>
> Date: Fri, 4 Sep 2015 19:33:54 -0400
> Subject: [PATCH] drivers/soc: make mediatek/mtk-scpsys.c explicitly
> non-modular
>
> The Kconfig currently controlling compilation of this code is:
>
> drivers/soc/mediatek/Kconfig:config MTK_SCPSYS
> drivers/soc/mediatek/Kconfig: bool "MediaTek SCPSYS Support"
>
> ...meaning that it currently is not being built as a module by anyone.
>
> Lets remove the couple traces of modularity so that when reading the
> driver there is no doubt it is builtin-only.
>
> Since module_platform_driver() uses the same init level priority as
> builtin_platform_driver() the init ordering remains unchanged with
> this commit.
>
> Cc: Matthias Brugger <matthias.bgg at gmail.com>
> Cc: Sascha Hauer <s.hauer at pengutronix.de>
> Cc: Daniel Kurtz <djkurtz at chromium.org>
> Cc: Paul Gortmaker <paul.gortmaker at windriver.com>
> Cc: Olof Johansson <olof at lixom.net>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-mediatek at lists.infradead.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker at windriver.com>
>
> diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
> index 164a7d8439b1..ae0ca34e64dd 100644
> --- a/drivers/soc/mediatek/mtk-scpsys.c
> +++ b/drivers/soc/mediatek/mtk-scpsys.c
> @@ -15,7 +15,7 @@
> #include <linux/io.h>
> #include <linux/kernel.h>
> #include <linux/mfd/syscon.h>
> -#include <linux/module.h>
> +#include <linux/init.h>
> #include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> @@ -484,5 +484,4 @@ static struct platform_driver scpsys_drv = {
> .of_match_table = of_match_ptr(of_scpsys_match_tbl),
> },
> };
> -
> -module_platform_driver_probe(scpsys_drv, scpsys_probe);
> +builtin_platform_driver_probe(scpsys_drv, scpsys_probe);
>
More information about the Linux-mediatek
mailing list