mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 13:22:02 +02:00
Counter fixes for 6.19
A fix for interrupt-cnt dropping the IRQF_NO_THREAD configuration to allow the IRQ handler to correctly acquire a spinlock_t lock. A fix for 104-quad-8 correcting quad8_irq_handler() to return irqreturn_t enum values rather than negative errno codes on error. -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCaVC8aQAKCRC1SFbKvhIj KzQ/AP45852Cd6hFisjAhbKm5+NFLN3cJX7ZnISpoG9G5it+0wD/aCUbuMJcPjAJ Zyk/cVSvNYCNfTVQ0jgeCH44UfbRFQg= =rNX8 -----END PGP SIGNATURE----- Merge tag 'counter-fixes-for-6.19' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-linus William writes: Counter fixes for 6.19 A fix for interrupt-cnt dropping the IRQF_NO_THREAD configuration to allow the IRQ handler to correctly acquire a spinlock_t lock. A fix for 104-quad-8 correcting quad8_irq_handler() to return irqreturn_t enum values rather than negative errno codes on error. * tag 'counter-fixes-for-6.19' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: 104-quad-8: Fix incorrect return value in IRQ handler counter: interrupt-cnt: Drop IRQF_NO_THREAD flag
This commit is contained in:
commit
d8aef84e60
|
|
@ -1192,6 +1192,7 @@ static irqreturn_t quad8_irq_handler(int irq, void *private)
|
|||
{
|
||||
struct counter_device *counter = private;
|
||||
struct quad8 *const priv = counter_priv(counter);
|
||||
struct device *dev = counter->parent;
|
||||
unsigned int status;
|
||||
unsigned long irq_status;
|
||||
unsigned long channel;
|
||||
|
|
@ -1200,8 +1201,11 @@ static irqreturn_t quad8_irq_handler(int irq, void *private)
|
|||
int ret;
|
||||
|
||||
ret = regmap_read(priv->map, QUAD8_INTERRUPT_STATUS, &status);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (ret) {
|
||||
dev_WARN_ONCE(dev, true,
|
||||
"Attempt to read Interrupt Status Register failed: %d\n", ret);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
if (!status)
|
||||
return IRQ_NONE;
|
||||
|
||||
|
|
@ -1223,8 +1227,9 @@ static irqreturn_t quad8_irq_handler(int irq, void *private)
|
|||
break;
|
||||
default:
|
||||
/* should never reach this path */
|
||||
WARN_ONCE(true, "invalid interrupt trigger function %u configured for channel %lu\n",
|
||||
flg_pins, channel);
|
||||
dev_WARN_ONCE(dev, true,
|
||||
"invalid interrupt trigger function %u configured for channel %lu\n",
|
||||
flg_pins, channel);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1232,8 +1237,11 @@ static irqreturn_t quad8_irq_handler(int irq, void *private)
|
|||
}
|
||||
|
||||
ret = regmap_write(priv->map, QUAD8_CHANNEL_OPERATION, CLEAR_PENDING_INTERRUPTS);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (ret) {
|
||||
dev_WARN_ONCE(dev, true,
|
||||
"Attempt to clear pending interrupts by writing to Channel Operation Register failed: %d\n", ret);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,8 +229,7 @@ static int interrupt_cnt_probe(struct platform_device *pdev)
|
|||
|
||||
irq_set_status_flags(priv->irq, IRQ_NOAUTOEN);
|
||||
ret = devm_request_irq(dev, priv->irq, interrupt_cnt_isr,
|
||||
IRQF_TRIGGER_RISING | IRQF_NO_THREAD,
|
||||
dev_name(dev), counter);
|
||||
IRQF_TRIGGER_RISING, dev_name(dev), counter);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user