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

gpio: zx: make explicitly non-modular

The Kconfig currently controlling compilation of this code is:

config GPIO_ZX
bool "ZTE ZX GPIO 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.

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: Alexandre Courbot <gnurou@gmail.com>
Cc: Jun Nie <jun.nie@linaro.org>
Cc: linux-gpio@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
18fb0a98 b33d12d3

+6 -8
+6 -8
drivers/gpio/gpio-zx.c
··· 1 1 /* 2 + * ZTE ZX296702 GPIO driver 3 + * 4 + * Author: Jun Nie <jun.nie@linaro.org> 5 + * 2 6 * Copyright (C) 2015 Linaro Ltd. 3 7 * 4 8 * This program is free software; you can redistribute it and/or modify ··· 14 10 #include <linux/errno.h> 15 11 #include <linux/gpio/driver.h> 16 12 #include <linux/irqchip/chained_irq.h> 17 - #include <linux/module.h> 13 + #include <linux/init.h> 18 14 #include <linux/of.h> 19 15 #include <linux/pinctrl/consumer.h> 20 16 #include <linux/platform_device.h> ··· 286 282 }, 287 283 { }, 288 284 }; 289 - MODULE_DEVICE_TABLE(of, zx_gpio_match); 290 285 291 286 static struct platform_driver zx_gpio_driver = { 292 287 .probe = zx_gpio_probe, ··· 294 291 .of_match_table = of_match_ptr(zx_gpio_match), 295 292 }, 296 293 }; 297 - 298 - module_platform_driver(zx_gpio_driver) 299 - 300 - MODULE_AUTHOR("Jun Nie <jun.nie@linaro.org>"); 301 - MODULE_DESCRIPTION("ZTE ZX296702 GPIO driver"); 302 - MODULE_LICENSE("GPL"); 294 + builtin_platform_driver(zx_gpio_driver)