]> git.baikalelectronics.ru Git - kernel.git/commit
SPI driver runtime footprint shrinkage
authorDavid Brownell <david-b@pacbell.net>
Tue, 16 Oct 2007 08:27:46 +0000 (01:27 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 16 Oct 2007 16:43:09 +0000 (09:43 -0700)
commit81df4ae71f6dd08f52f9797b0e3e5adfa5e10e85
treed1b3bcfe1804ea1871d5e965a2e3f3fa2efa07fc
parent2e5a1c63d74edb8aae7a9e99901bc2fb2c9aa153
SPI driver runtime footprint shrinkage

Shrink the runtime footprint of various SPI drivers:

  - Move the probe() routine into the init section where practical,
    using platform_driver_probe() to make that safe.  This often saves
    around 1KB.  Using platform_driver_probe() can also be a correctness
    fix, if the probe routine is already marked __init but the driver
    struct keeps a dangling pointer to it after init section removal.

  - Likewise move remove() routines into the exit sections.

These changes would be inappropriate iff the platform devices were
actually hotpluggable (e.g. they're found on optional addon cards,
or in an FPGA that's dynamically reprogrammed).  In these cases,
that's not the situation; it's an SOC controller and the only device
is initialized before these drivers.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/spi/omap_uwire.c
drivers/spi/pxa2xx_spi.c
drivers/spi/spi_imx.c
drivers/spi/spi_mpc83xx.c
drivers/spi/spi_s3c24xx.c