diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-09-09 13:29:01 (GMT) |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-01 07:32:11 (GMT) |
commit | f4ba6315cb77a5dcff6664ce1d66ebfe31bcc6b1 (patch) | |
tree | c0c99772309192bf7c5eb120fe7f0ea8af1dc160 /drivers/macintosh | |
parent | e89524d33deb55de28b4ab171e4b0f89d46b2d4e (diff) | |
download | linux-fsl-qoriq-f4ba6315cb77a5dcff6664ce1d66ebfe31bcc6b1.tar.xz |
spi/imx: convert driver to use platform ids
This has the advantage not to need to much cpu_is_... macros. Still more
when imx51 support is added which has two different spi interfaces which
would introduce additional checks on the device id.
With this setup it's not possible for the compiler anymore to detect the
unused functions, so four additional kconfig symbols are introduced to
ifdef out the unneeded functions in the callback array and all these
functions are marked with __maybe_unused to suppress the corresponding
gcc warnings.
Comparing the driver footprint with and without the patch for a mx27
kernel yields:
add/remove: 2/0 grow/shrink: 2/0 up/down: 280/0 (280)
function old new delta
spi_imx_devtype - 192 +192
spi_imx_probe 980 1032 +52
spi_imx_devtype_data - 32 +32
spi_imx_setupxfer 276 280 +4
Later when the platform code is updated to use the platform ids, the
autodetection can be removed which will make the driver a bit smaller
again. (~60 Bytes in my test.)
Acked-by: Jason Wang <jason77.wang@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/macintosh')
0 files changed, 0 insertions, 0 deletions