Re: [PATCH 01/13] i2c: bcm2835: Use devm_request_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, December 18, 2013 11:21 AM, Stephen Warren wrote:
> On 12/16/2013 11:46 PM, Jingoo Han wrote:
> > Use devm_request_irq() to make cleanup paths simpler.
> 
> This may not be safe. The interrupt used by the I2C controllers on the
> BCM2835 chip is shared between two controllers. In theory, you could run
> into a condition where you're remove()ing the driver for one of the
> controller (a), while the driver for controller (b) is still active, yet
> the HW for controller (a) comes along and triggers an interrupt after
> remove() but before the devm IRQ cleanup. That would result in the IRQ
> handler for controller (a) executing after the remove() of the
> associated device, which could cause a variety of problems.

Hi Stephen,
I appreciate you detailed and kind description. :-)
If there is possible side effect, the patch should not be
merged.

Wolfram Sang,
Please ignore this patch. Thank you.

Best regards,
Jingoo Han

> You might be able to make this safe by explicitly clearing any IRQ
> enable registers in remove(), but leaving the code using plain
> request_irq() might be simpler.

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux