mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
Revert "gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain()"
This reverts commit0357259cb1which is commitff7a1790fbupstream. It breaks the Android abi, so revert it for now. If it needs to come back, it can be done so in an abi-safe way. Bug: 161946584 Change-Id: I2147b1495cfc1f7e8758b9c58a24f080be2bec3c Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -1650,7 +1650,7 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Remove all IRQ mappings and delete the domain */
|
/* Remove all IRQ mappings and delete the domain */
|
||||||
if (!gc->irq.domain_is_allocated_externally && gc->irq.domain) {
|
if (gc->irq.domain) {
|
||||||
unsigned int irq;
|
unsigned int irq;
|
||||||
|
|
||||||
for (offset = 0; offset < gc->ngpio; offset++) {
|
for (offset = 0; offset < gc->ngpio; offset++) {
|
||||||
@@ -1696,7 +1696,6 @@ int gpiochip_irqchip_add_domain(struct gpio_chip *gc,
|
|||||||
|
|
||||||
gc->to_irq = gpiochip_to_irq;
|
gc->to_irq = gpiochip_to_irq;
|
||||||
gc->irq.domain = domain;
|
gc->irq.domain = domain;
|
||||||
gc->irq.domain_is_allocated_externally = true;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Using barrier() here to prevent compiler from reordering
|
* Using barrier() here to prevent compiler from reordering
|
||||||
|
|||||||
@@ -245,14 +245,6 @@ struct gpio_irq_chip {
|
|||||||
*/
|
*/
|
||||||
bool initialized;
|
bool initialized;
|
||||||
|
|
||||||
/**
|
|
||||||
* @domain_is_allocated_externally:
|
|
||||||
*
|
|
||||||
* True it the irq_domain was allocated outside of gpiolib, in which
|
|
||||||
* case gpiolib won't free the irq_domain itself.
|
|
||||||
*/
|
|
||||||
bool domain_is_allocated_externally;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @init_hw: optional routine to initialize hardware before
|
* @init_hw: optional routine to initialize hardware before
|
||||||
* an IRQ chip will be added. This is quite useful when
|
* an IRQ chip will be added. This is quite useful when
|
||||||
|
|||||||
Reference in New Issue
Block a user