Patchwork RM: OMAP4: board-4430sdp: don't initialize value that is never used

login
register
mail settings
Submitter Uwe Kleine-König
Date Feb. 9, 2012, 9:30 p.m.
Message ID <1328823034-9668-1-git-send-email-u.kleine-koenig@pengutronix.de>
Download mbox | patch
Permalink /patch/140439/
State New
Headers show

Comments

Uwe Kleine-König - Feb. 9, 2012, 9:30 p.m.
sdp4430_spi_board_info.irq was initialized to ETH_KS8851_IRQ and in
omap_4430sdp_init() overwritten with gpio_to_irq(ETH_KS8851_IRQ) before
sdp4430_spi_board_info was registered. This is a bit confusing, so
better don't initialize .irq and document that it is set later.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 arch/arm/mach-omap2/board-4430sdp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Tony Lindgren - March 5, 2012, 6:23 p.m.
* Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [120209 13:00]:
> sdp4430_spi_board_info.irq was initialized to ETH_KS8851_IRQ and in
> omap_4430sdp_init() overwritten with gpio_to_irq(ETH_KS8851_IRQ) before
> sdp4430_spi_board_info was registered. This is a bit confusing, so
> better don't initialize .irq and document that it is set later.

Thanks applying into board branch.

Regards,

Tony

Patch

diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 39fba9d..991a289 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -321,7 +321,10 @@  static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
 		.bus_num                = 1,
 		.chip_select            = 0,
 		.max_speed_hz           = 24000000,
-		.irq                    = ETH_KS8851_IRQ,
+		/*
+		 * .irq is set to gpio_to_irq(ETH_KS8851_IRQ)
+		 * in omap_4430sdp_init
+		 */
 	},
 };