* [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* Re: [PATCH] Fix wrong 'no interrupt' handling in of_i2c
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
0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2008-06-28 19:16 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev
On Sat, Jun 28, 2008 at 12:31 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> 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>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix wrong 'no interrupt' handling in of_i2c
2008-06-28 19:16 ` Grant Likely
@ 2008-07-16 22:15 ` Sean MacLennan
2008-07-16 22:22 ` Grant Likely
0 siblings, 1 reply; 4+ messages in thread
From: Sean MacLennan @ 2008-07-16 22:15 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Wolfram Sang
On Sat, 28 Jun 2008 13:16:16 -0600
"Grant Likely" <grant.likely@secretlab.ca> wrote:
> On Sat, Jun 28, 2008 at 12:31 PM, Wolfram Sang
> <w.sang@pengutronix.de> wrote:
> > 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>
>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>
I just hit this while trying to get the at24 driver working. So:
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Cheers,
Sean
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix wrong 'no interrupt' handling in of_i2c
2008-07-16 22:15 ` Sean MacLennan
@ 2008-07-16 22:22 ` Grant Likely
0 siblings, 0 replies; 4+ messages in thread
From: Grant Likely @ 2008-07-16 22:22 UTC (permalink / raw)
To: Sean MacLennan; +Cc: linuxppc-dev, Wolfram Sang
On Wed, Jul 16, 2008 at 4:15 PM, Sean MacLennan <smaclennan@pikatech.com> wrote:
> On Sat, 28 Jun 2008 13:16:16 -0600
> "Grant Likely" <grant.likely@secretlab.ca> wrote:
>
>> On Sat, Jun 28, 2008 at 12:31 PM, Wolfram Sang
>> <w.sang@pengutronix.de> wrote:
>> > 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>
>>
>> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>>
>
> I just hit this while trying to get the at24 driver working. So:
>
> Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Okay, I'll pick this one up.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [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).