diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2021-01-22 19:55:43 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2021-02-15 11:43:30 +0100 |
commit | 4a6eac2b4b129800a2ab37d7127e2244bce37653 (patch) | |
tree | 0cc91da988c0f71b625086eef0da75953f4392f3 /drivers/gpio/gpio-tegra.c | |
parent | gpio: tegra: Clean up whitespaces in tegra_gpio_driver (diff) | |
download | linux-4a6eac2b4b129800a2ab37d7127e2244bce37653.tar.xz linux-4a6eac2b4b129800a2ab37d7127e2244bce37653.zip |
gpio: tegra: Support building driver as a loadable module
Support building driver as a loadable kernel module. This allows to
reduce size of a kernel zImage, which is important for some devices
since size of kernel partition may be limited and since some bootloader
variants have known problems in regards to the initrd placement if kernel
image is too big.
$ lsmod
Module Size Used by
gpio_tegra 16384 27
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpio-tegra.c')
-rw-r--r-- | drivers/gpio/gpio-tegra.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index e2b739a95ee0..a3c8cea69628 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -802,6 +802,7 @@ static const struct of_device_id tegra_gpio_of_match[] = { { .compatible = "nvidia,tegra20-gpio", .data = &tegra20_gpio_config }, { }, }; +MODULE_DEVICE_TABLE(of, tegra_gpio_of_match); static struct platform_driver tegra_gpio_driver = { .driver = { @@ -811,9 +812,11 @@ static struct platform_driver tegra_gpio_driver = { }, .probe = tegra_gpio_probe, }; - -static int __init tegra_gpio_init(void) -{ - return platform_driver_register(&tegra_gpio_driver); -} -subsys_initcall(tegra_gpio_init); +module_platform_driver(tegra_gpio_driver); + +MODULE_DESCRIPTION("NVIDIA Tegra GPIO controller driver"); +MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>"); +MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>"); +MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>"); +MODULE_AUTHOR("Erik Gilling <konkers@google.com>"); +MODULE_LICENSE("GPL v2"); |