[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150216132936.GC21649@linutronix.de>
Date: Mon, 16 Feb 2015 14:29:36 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Stanislav Meduna <stano@...una.org>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>, zbr@...emap.net,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-rt-users@...r.kernel.org" <linux-rt-users@...r.kernel.org>
Subject: Re: w1-gpio: sleeping function called from invalid context
* Stanislav Meduna | 2014-04-17 16:18:16 [+0200]:
>diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c
>index e10acc2..7065486 100644
>--- a/drivers/w1/w1_io.c
>+++ b/drivers/w1/w1_io.c
>@@ -170,14 +170,14 @@ static u8 w1_read_bit(struct w1_master *dev)
> unsigned long flags = 0;
>
> /* sample timing is critical here */
>- local_irq_save(flags);
>+ if(w1_disable_irqs) local_irq_save(flags);
> dev->bus_master->write_bit(dev->bus_master->data, 0);
> w1_delay(6);
> dev->bus_master->write_bit(dev->bus_master->data, 1);
> w1_delay(9);
>
> result = dev->bus_master->read_bit(dev->bus_master->data);
>- local_irq_restore(flags);
>+ if(w1_disable_irqs) local_irq_restore(flags);
>
> w1_delay(55);
>
there is local_irq_save_nort() and its friends.
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists