linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix wrong 'no interrupt' handling in of_i2c
@ 2008-06-28 18:31 Wolfram Sang
  2008-06-28 19:16 ` Grant Likely
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2008-06-28 18:31 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Wolfram Sang

If an I2C device node does not specify an interrupt, the .irq member of the
board_info struct was set to -1. This caused crashes on following
irq_dispose_mappings. Leave it NO_IRQ as returned from irq_of_parse_and_map.
(Suggesting -1 as 'i2c-no-irq' used to be a bug in linux/i2c.h.)

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---

 drivers/of/of_i2c.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index b2ccdcb..500cb1e 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -90,8 +90,6 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
 		}
 
 		info.irq = irq_of_parse_and_map(node, 0);
-		if (info.irq == NO_IRQ)
-			info.irq = -1;
 
 		if (of_find_i2c_driver(node, &info) < 0) {
 			irq_dispose_mapping(info.irq);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-16 22:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-28 18:31 [PATCH] Fix wrong 'no interrupt' handling in of_i2c Wolfram Sang
2008-06-28 19:16 ` Grant Likely
2008-07-16 22:15   ` Sean MacLennan
2008-07-16 22:22     ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).