i2c-omap: reduce bloat
Subsystems (4)
cover i2c-omap: reduce bloat
Don't compile the OMAP15xx I2C ISR for non-OMAP15xx builds. Also, mark init-only functions in i2c-omap as __init.
Boot-tested on OMAP3430SDP ES2.
---
size:
3391587 157104 107136 3655827 37c893 vmlinux.3430sdp.orig 3390339 157104 107136 3654579 37c3b3 vmlinux.3430sdp
drivers/i2c/busses/i2c-omap.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)
PATCH 1/2 i2c-omap: mark init-only functions as __init
Mark functions called only at init time as __init.
---
drivers/i2c/busses/i2c-omap.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-omap.c +2 -2
@@ -160,7 +160,7 @@ static inline u16 omap_i2c_read_reg(struct omap_i2c_dev *i2c_dev, int reg)return __raw_readw (i2c_dev->base + reg); } -static int omap_i2c_get_clocks (struct omap_i2c_dev *dev) +static int __init omap_i2c_get_clocks (struct omap_i2c_dev *dev) {if (cpu_is_omap16xx () ||cpu_class_is_omap2 ()) { dev->iclk =clk_get (dev->dev,"i2c_ick" );
@@ -701,7 +701,7 @@ static const struct i2c_algorithm omap_i2c_algo = { .functionality = omap_i2c_func, }; -static int +static int __init omap_i2c_probe (struct platform_device *pdev) {struct omap_i2c_dev *dev;
PATCH 2/2 i2c-omap: don't compile in OMAP15xx I2C ISR for non-OMAP15xx builds
In reply to Paul WalmsleySkip compiling OMAP15xx I2C ISR for non-OMAP15xx builds. Saves 400 bytes of text for most OMAP builds.
---
drivers/i2c/busses/i2c-omap.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-omap.c +8 -2
@@ -529,6 +529,9 @@ omap_i2c_ack_stat(struct omap_i2c_dev *dev, u16 stat)omap_i2c_write_reg (dev,OMAP_I2C_STAT_REG , stat); } +/* rev1 devices are apparently only on some 15xx */ +#ifdef CONFIG_ARCH_OMAP15XX +static irqreturn_t omap_i2c_rev1_isr (int this_irq,void *dev_id) {
@@ -583,6 +586,9 @@ omap_i2c_rev1_isr(int this_irq, void *dev_id) return IRQ_HANDLED; } +#else +#define omap_i2c_rev1_isr 0 +#endif static irqreturn_t omap_i2c_isr (int this_irq,void *dev_id)
@@ -844,14 +850,14 @@ static struct platform_driver omap_i2c_driver = { };/* I2C may be needed to bring up other drivers */ -static int __init +static int __devinit omap_i2c_init_driver (void ) {return platform_driver_register (&omap_i2c_driver); }subsys_initcall (omap_i2c_init_driver); -static void __exit omap_i2c_exit_driver(void) +static void __devexit omap_i2c_exit_driver(void) {platform_driver_unregister (&omap_i2c_driver); }
Tony Lindgren
maintainerQuoted 4 lines · Paul Walmsley
Don't compile the OMAP15xx I2C ISR for non-OMAP15xx builds. Also, mark init-only functions in i2c-omap as
__init.Boot-tested on OMAP3430SDP ES2.
Pushing these today.
Tony
Quoted 17 lines
Signed-off-by Paul Walmsley <[email protected]>---
size:
3391587 157104 107136 3655827 37c893 vmlinux.3430sdp.orig 3390339 157104 107136 3654579 37c3b3 vmlinux.3430sdpdrivers/i2c/busses/i2c-omap.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html