* [PATCH] Fix bad hint about irqs in i2c.h
@ 2008-06-27 13:23 Wolfram Sang
[not found] ` <20080627130922.8265.12081.stgit-WosDo8ZsKtpoC+DoxizDebTfikLOBL9CDsAVuJBuCrE@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2008-06-27 13:23 UTC (permalink / raw)
To: i2c-GZX6beZjE8VD60Wz+7aTrA
i2c.h mentions -1 as a not-issued irq. This false hint was taken by of_i2c and
caused crashes. Don't give any advice as 'no irq' is not consistent across all
architectures yet and it is not needed internally by the i2c-core.
Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
The crash was caused because of_i2c set .irq to -1 and later used that value
for dispose_mapping. Using 0xffffffff here instead of the original NO_IRQ
caused the crash. Patch for of_i2c will go via linux-ppcdev later, if it is
accepted here that the -1 is not required by the i2c-core and NO_IRQ is
equally sufficent.
include/linux/i2c.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index fb9af6a..8dc7301 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -171,7 +171,7 @@ struct i2c_client {
struct i2c_adapter *adapter; /* the adapter we sit on */
struct i2c_driver *driver; /* and our access routines */
struct device dev; /* the device structure */
- int irq; /* irq issued by device (or -1) */
+ int irq; /* irq issued by device */
struct list_head list; /* DEPRECATED */
struct completion released;
};
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-27 20:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-27 13:23 [PATCH] Fix bad hint about irqs in i2c.h Wolfram Sang
[not found] ` <20080627130922.8265.12081.stgit-WosDo8ZsKtpoC+DoxizDebTfikLOBL9CDsAVuJBuCrE@public.gmane.org>
2008-06-27 20:45 ` Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox