Revert "gpio: Restrict usage of GPIO chip irq members before initialization"
This reverts commit 0912cf021f
.
It breaks the kernel abi so revert it for now. We will add it back
later at the next kabi update.
Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic05524e1d76a349bf55d12d3b571114483ed7d1b
This commit is contained in:
parent
ee5fed1cef
commit
34c16f1a20
|
@ -1368,16 +1368,6 @@ static int gpiochip_to_irq(struct gpio_chip *gc, unsigned int offset)
|
|||
{
|
||||
struct irq_domain *domain = gc->irq.domain;
|
||||
|
||||
#ifdef CONFIG_GPIOLIB_IRQCHIP
|
||||
/*
|
||||
* Avoid race condition with other code, which tries to lookup
|
||||
* an IRQ before the irqchip has been properly registered,
|
||||
* i.e. while gpiochip is still being brought up.
|
||||
*/
|
||||
if (!gc->irq.initialized)
|
||||
return -EPROBE_DEFER;
|
||||
#endif
|
||||
|
||||
if (!gpiochip_irqchip_irq_valid(gc, offset))
|
||||
return -ENXIO;
|
||||
|
||||
|
@ -1562,15 +1552,6 @@ static int gpiochip_add_irqchip(struct gpio_chip *gc,
|
|||
|
||||
acpi_gpiochip_request_interrupts(gc);
|
||||
|
||||
/*
|
||||
* Using barrier() here to prevent compiler from reordering
|
||||
* gc->irq.initialized before initialization of above
|
||||
* GPIO chip irq members.
|
||||
*/
|
||||
barrier();
|
||||
|
||||
gc->irq.initialized = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -224,15 +224,6 @@ struct gpio_irq_chip {
|
|||
unsigned long *valid_mask,
|
||||
unsigned int ngpios);
|
||||
|
||||
/**
|
||||
* @initialized:
|
||||
*
|
||||
* Flag to track GPIO chip irq member's initialization.
|
||||
* This flag will make sure GPIO chip irq members are not used
|
||||
* before they are initialized.
|
||||
*/
|
||||
bool initialized;
|
||||
|
||||
/**
|
||||
* @valid_mask:
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue