Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: tegra: clean up modular vs. non-modular distinctions

None of the Kconfigs for any of these drivers are tristate,
meaning that they currently are not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the drivers there is no doubt they are builtin-only. All
drivers get similar changes, so they are handled in batch.

We remove module.h from code that isn't doing anything modular at
all; if they have __init sections, then replace it with init.h.

A couple drivers have module_exit() code that is essentially orphaned,
and so we remove that.

Quite a few bool drivers (hence non-modular) are converted over to
to builtin_platform_driver().

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Pritesh Raithatha <praithatha@nvidia.com>
Cc: Ashwini Ghuge <aghuge@nvidia.com>
Cc: linux-gpio@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Paul Gortmaker and committed by
Linus Walleij
e3d2160f 1a8764f4

+18 -36
-1
drivers/pinctrl/tegra/pinctrl-tegra.c
··· 21 21 #include <linux/err.h> 22 22 #include <linux/init.h> 23 23 #include <linux/io.h> 24 - #include <linux/module.h> 25 24 #include <linux/of.h> 26 25 #include <linux/platform_device.h> 27 26 #include <linux/pinctrl/machine.h>
+4 -7
drivers/pinctrl/tegra/pinctrl-tegra114.c
··· 1 1 /* 2 2 * Pinctrl data for the NVIDIA Tegra114 pinmux 3 3 * 4 + * Author: Pritesh Raithatha <praithatha@nvidia.com> 5 + * 4 6 * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved. 5 7 * 6 8 * This program is free software; you can redistribute it and/or modify it ··· 15 13 * more details. 16 14 */ 17 15 18 - #include <linux/module.h> 16 + #include <linux/init.h> 19 17 #include <linux/of.h> 20 18 #include <linux/platform_device.h> 21 19 #include <linux/pinctrl/pinctrl.h> ··· 1859 1857 { .compatible = "nvidia,tegra114-pinmux", }, 1860 1858 { }, 1861 1859 }; 1862 - MODULE_DEVICE_TABLE(of, tegra114_pinctrl_of_match); 1863 1860 1864 1861 static struct platform_driver tegra114_pinctrl_driver = { 1865 1862 .driver = { ··· 1867 1866 }, 1868 1867 .probe = tegra114_pinctrl_probe, 1869 1868 }; 1870 - module_platform_driver(tegra114_pinctrl_driver); 1871 - 1872 - MODULE_AUTHOR("Pritesh Raithatha <praithatha@nvidia.com>"); 1873 - MODULE_DESCRIPTION("NVIDIA Tegra114 pinctrl driver"); 1874 - MODULE_LICENSE("GPL v2"); 1869 + builtin_platform_driver(tegra114_pinctrl_driver);
+4 -7
drivers/pinctrl/tegra/pinctrl-tegra124.c
··· 1 1 /* 2 2 * Pinctrl data for the NVIDIA Tegra124 pinmux 3 3 * 4 + * Author: Ashwini Ghuge <aghuge@nvidia.com> 5 + * 4 6 * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved. 5 7 * 6 8 * This program is free software; you can redistribute it and/or modify it ··· 15 13 * more details. 16 14 */ 17 15 18 - #include <linux/module.h> 16 + #include <linux/init.h> 19 17 #include <linux/of.h> 20 18 #include <linux/platform_device.h> 21 19 #include <linux/pinctrl/pinctrl.h> ··· 2071 2069 { .compatible = "nvidia,tegra124-pinmux", }, 2072 2070 { }, 2073 2071 }; 2074 - MODULE_DEVICE_TABLE(of, tegra124_pinctrl_of_match); 2075 2072 2076 2073 static struct platform_driver tegra124_pinctrl_driver = { 2077 2074 .driver = { ··· 2079 2078 }, 2080 2079 .probe = tegra124_pinctrl_probe, 2081 2080 }; 2082 - module_platform_driver(tegra124_pinctrl_driver); 2083 - 2084 - MODULE_AUTHOR("Ashwini Ghuge <aghuge@nvidia.com>"); 2085 - MODULE_DESCRIPTION("NVIDIA Tegra124 pinctrl driver"); 2086 - MODULE_LICENSE("GPL v2"); 2081 + builtin_platform_driver(tegra124_pinctrl_driver);
+4 -7
drivers/pinctrl/tegra/pinctrl-tegra20.c
··· 1 1 /* 2 2 * Pinctrl data for the NVIDIA Tegra20 pinmux 3 3 * 4 + * Author: Stephen Warren <swarren@nvidia.com> 5 + * 4 6 * Copyright (c) 2011-2012, NVIDIA CORPORATION. All rights reserved. 5 7 * 6 8 * Derived from code: ··· 19 17 * more details. 20 18 */ 21 19 22 - #include <linux/module.h> 20 + #include <linux/init.h> 23 21 #include <linux/of.h> 24 22 #include <linux/platform_device.h> 25 23 #include <linux/pinctrl/pinctrl.h> ··· 2248 2246 }, 2249 2247 .probe = tegra20_pinctrl_probe, 2250 2248 }; 2251 - module_platform_driver(tegra20_pinctrl_driver); 2252 - 2253 - MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>"); 2254 - MODULE_DESCRIPTION("NVIDIA Tegra20 pinctrl driver"); 2255 - MODULE_LICENSE("GPL v2"); 2256 - MODULE_DEVICE_TABLE(of, tegra20_pinctrl_of_match); 2249 + builtin_platform_driver(tegra20_pinctrl_driver);
+2 -7
drivers/pinctrl/tegra/pinctrl-tegra210.c
··· 13 13 * more details. 14 14 */ 15 15 16 - #include <linux/module.h> 16 + #include <linux/init.h> 17 17 #include <linux/of.h> 18 18 #include <linux/platform_device.h> 19 19 #include <linux/pinctrl/pinctrl.h> ··· 1573 1573 { .compatible = "nvidia,tegra210-pinmux", }, 1574 1574 { }, 1575 1575 }; 1576 - MODULE_DEVICE_TABLE(of, tegra210_pinctrl_of_match); 1577 1576 1578 1577 static struct platform_driver tegra210_pinctrl_driver = { 1579 1578 .driver = { ··· 1581 1582 }, 1582 1583 .probe = tegra210_pinctrl_probe, 1583 1584 }; 1584 - module_platform_driver(tegra210_pinctrl_driver); 1585 - 1586 - MODULE_AUTHOR("NVIDIA"); 1587 - MODULE_DESCRIPTION("NVIDIA Tegra210 pinctrl driver"); 1588 - MODULE_LICENSE("GPL v2"); 1585 + builtin_platform_driver(tegra210_pinctrl_driver);
+4 -7
drivers/pinctrl/tegra/pinctrl-tegra30.c
··· 1 1 /* 2 2 * Pinctrl data for the NVIDIA Tegra30 pinmux 3 3 * 4 + * Author: Stephen Warren <swarren@nvidia.com> 5 + * 4 6 * Copyright (c) 2011-2012, NVIDIA CORPORATION. All rights reserved. 5 7 * 6 8 * This program is free software; you can redistribute it and/or modify it ··· 15 13 * more details. 16 14 */ 17 15 18 - #include <linux/module.h> 16 + #include <linux/init.h> 19 17 #include <linux/of.h> 20 18 #include <linux/platform_device.h> 21 19 #include <linux/pinctrl/pinctrl.h> ··· 2494 2492 { .compatible = "nvidia,tegra30-pinmux", }, 2495 2493 { }, 2496 2494 }; 2497 - MODULE_DEVICE_TABLE(of, tegra30_pinctrl_of_match); 2498 2495 2499 2496 static struct platform_driver tegra30_pinctrl_driver = { 2500 2497 .driver = { ··· 2502 2501 }, 2503 2502 .probe = tegra30_pinctrl_probe, 2504 2503 }; 2505 - module_platform_driver(tegra30_pinctrl_driver); 2506 - 2507 - MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>"); 2508 - MODULE_DESCRIPTION("NVIDIA Tegra30 pinctrl driver"); 2509 - MODULE_LICENSE("GPL v2"); 2504 + builtin_platform_driver(tegra30_pinctrl_driver);