* [PATCH 0/2] i2c-omap: reduce bloat
@ 2008-07-18 1:44 Paul Walmsley
2008-07-18 1:44 ` [PATCH 1/2] i2c-omap: mark init-only functions as __init Paul Walmsley
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Paul Walmsley @ 2008-07-18 1:44 UTC (permalink / raw)
To: linux-omap
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.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
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(-)
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] i2c-omap: mark init-only functions as __init
2008-07-18 1:44 [PATCH 0/2] i2c-omap: reduce bloat Paul Walmsley
@ 2008-07-18 1:44 ` Paul Walmsley
2008-07-18 1:44 ` [PATCH 2/2] i2c-omap: don't compile in OMAP15xx I2C ISR for non-OMAP15xx builds Paul Walmsley
2008-08-04 14:09 ` [PATCH 0/2] i2c-omap: reduce bloat Tony Lindgren
2 siblings, 0 replies; 4+ messages in thread
From: Paul Walmsley @ 2008-07-18 1:44 UTC (permalink / raw)
To: linux-omap
Mark functions called only at init time as __init.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
drivers/i2c/busses/i2c-omap.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 55779f5..ed60693 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -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;
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] i2c-omap: don't compile in OMAP15xx I2C ISR for non-OMAP15xx builds
2008-07-18 1:44 [PATCH 0/2] i2c-omap: reduce bloat Paul Walmsley
2008-07-18 1:44 ` [PATCH 1/2] i2c-omap: mark init-only functions as __init Paul Walmsley
@ 2008-07-18 1:44 ` Paul Walmsley
2008-08-04 14:09 ` [PATCH 0/2] i2c-omap: reduce bloat Tony Lindgren
2 siblings, 0 replies; 4+ messages in thread
From: Paul Walmsley @ 2008-07-18 1:44 UTC (permalink / raw)
To: linux-omap
Skip compiling OMAP15xx I2C ISR for non-OMAP15xx builds. Saves 400 bytes
of text for most OMAP builds.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
drivers/i2c/busses/i2c-omap.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index ed60693..1bf0ad6 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -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);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] i2c-omap: reduce bloat
2008-07-18 1:44 [PATCH 0/2] i2c-omap: reduce bloat Paul Walmsley
2008-07-18 1:44 ` [PATCH 1/2] i2c-omap: mark init-only functions as __init Paul Walmsley
2008-07-18 1:44 ` [PATCH 2/2] i2c-omap: don't compile in OMAP15xx I2C ISR for non-OMAP15xx builds Paul Walmsley
@ 2008-08-04 14:09 ` Tony Lindgren
2 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2008-08-04 14:09 UTC (permalink / raw)
To: Paul Walmsley; +Cc: linux-omap
* Paul Walmsley <paul@pwsan.com> [080718 04:48]:
> 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
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
>
> ---
>
> 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(-)
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-04 14:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 1:44 [PATCH 0/2] i2c-omap: reduce bloat Paul Walmsley
2008-07-18 1:44 ` [PATCH 1/2] i2c-omap: mark init-only functions as __init Paul Walmsley
2008-07-18 1:44 ` [PATCH 2/2] i2c-omap: don't compile in OMAP15xx I2C ISR for non-OMAP15xx builds Paul Walmsley
2008-08-04 14:09 ` [PATCH 0/2] i2c-omap: reduce bloat Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox