]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
serial: mps2-uart: make driver explicitly non-modular
authorVladimir Murzin <vladimir.murzin@arm.com>
Tue, 7 Jun 2016 15:02:37 +0000 (16:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jun 2016 21:01:57 +0000 (14:01 -0700)
commitce87122911f8db59d3c2bc355c694c7a38940804
tree46cc029988f4fa8de6acf0328345a4114aa5c411
parentc2c1659b4f8f9e19fe82a4fd06cca4b3d59090ce
serial: mps2-uart: make driver explicitly non-modular

The Kconfig currently controlling compilation of mps2-uart is:

config SERIAL_MPS2_UART
bool "MPS2 UART port"
depends on ARM || COMPILE_TEST

...meaning that it currently is not being built as a module by anyone.

Follow commit 89ebc2742769 ("drivers/tty: make serial/mvebu-uart.c
explicitly non-modular") as an example of moving modular code to
non-modular:

- remove the modular code that is essentially orphaned, so that
  when reading the driver there is no doubt it is builtin-only.

- explicitly disallow a driver unbind, since that doesn't have a
  sensible use case anyway, and it allows us to drop the ".remove"
  code for non-modular drivers.

- use arch_initcall instead of module_init and remove module_exit.

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.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/mps2-uart.c