]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivercore: Add helper macro for platform_driver boilerplate
authorGrant Likely <grant.likely@secretlab.ca>
Wed, 5 Oct 2011 17:29:49 +0000 (11:29 -0600)
committerGrant Likely <grant.likely@secretlab.ca>
Mon, 24 Oct 2011 22:35:47 +0000 (00:35 +0200)
commit940ab88962bc1aff3273a8356d64577a6e386736
tree3d96d0cb30fd3c6e1b17b2a2d264f4d44258a3bb
parent38ada214fad79ff5ebbed58932c5f0c9969d9c91
drivercore: Add helper macro for platform_driver boilerplate

For simple modules that contain a single platform_driver without any
additional setup code then ends up being a block of duplicated
boilerplate.  This patch adds a new macro, module_platform_driver(),
which replaces the module_init()/module_exit() registrations with
template functions.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Reviewed-by: Magnus Damm <magnus.damm@gmail.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
27 files changed:
drivers/spi/spi-altera.c
drivers/spi/spi-ath79.c
drivers/spi/spi-atmel.c
drivers/spi/spi-bfin-sport.c
drivers/spi/spi-coldfire-qspi.c
drivers/spi/spi-davinci.c
drivers/spi/spi-dw-mmio.c
drivers/spi/spi-ep93xx.c
drivers/spi/spi-fsl-espi.c
drivers/spi/spi-gpio.c
drivers/spi/spi-imx.c
drivers/spi/spi-mpc512x-psc.c
drivers/spi/spi-mpc52xx-psc.c
drivers/spi/spi-mpc52xx.c
drivers/spi/spi-nuc900.c
drivers/spi/spi-oc-tiny.c
drivers/spi/spi-ppc4xx.c
drivers/spi/spi-s3c24xx.c
drivers/spi/spi-sh-msiof.c
drivers/spi/spi-sh-sci.c
drivers/spi/spi-sh.c
drivers/spi/spi-stmp.c
drivers/spi/spi-tegra.c
drivers/spi/spi-ti-ssp.c
drivers/spi/spi-xilinx.c
drivers/tty/serial/of_serial.c
include/linux/platform_device.h