diff options
author | Finn Thain <fthain@linux-m68k.org> | 2024-03-13 13:53:41 +1100 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2024-04-29 16:43:55 +0200 |
commit | 0f35e016df9204e822319a86b214076d4a4aeedc (patch) | |
tree | 59ee6b54f37deee55df12090dcca630cf56d796a | |
parent | 3fefa6c847841faf7e3d635cd8d27d393074da9d (diff) | |
download | linux-m68k-0f35e016df9204e822319a86b214076d4a4aeedc.tar.gz |
macintosh/via-macii: Fix "BUG: sleeping function called from invalid context"
The via-macii ADB driver calls request_irq() after disabling hard
interrupts. But disabling interrupts isn't necessary here because the
VIA shift register interrupt was masked during VIA1 initialization.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/419fcc09d0e563b425c419053d02236b044d86b0.1710298421.git.fthain@linux-m68k.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-rw-r--r-- | drivers/macintosh/via-macii.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c index db9270da5b8e9c..b6ddf1d47cb4e2 100644 --- a/drivers/macintosh/via-macii.c +++ b/drivers/macintosh/via-macii.c @@ -140,24 +140,19 @@ static int macii_probe(void) /* Initialize the driver */ static int macii_init(void) { - unsigned long flags; int err; - local_irq_save(flags); - err = macii_init_via(); if (err) - goto out; + return err; err = request_irq(IRQ_MAC_ADB, macii_interrupt, 0, "ADB", macii_interrupt); if (err) - goto out; + return err; macii_state = idle; -out: - local_irq_restore(flags); - return err; + return 0; } /* initialize the hardware */ |