Skip to content

Commit 59ea38f

Browse files
Finn Thainmpe
authored andcommitted
macintosh/via-macii: Access autopoll_devs when inside lock
The interrupt handler should be excluded when accessing the autopoll_devs variable. Fixes: d95fd5f ("m68k: Mac II ADB fixes") # v5.0+ Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/5952dd8a9bc9de90f1acc4790c51dd42b4c98065.1593318192.git.fthain@telegraphics.com.au
1 parent c66da95 commit 59ea38f

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎drivers/macintosh/via-macii.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,12 @@ static int macii_autopoll(int devs)
270270
unsigned long flags;
271271
int err = 0;
272272

273+
local_irq_save(flags);
274+
273275
/* bit 1 == device 1, and so on. */
274276
autopoll_devs = devs & 0xFFFE;
275277

276-
if (!autopoll_devs)
277-
return 0;
278-
279-
local_irq_save(flags);
280-
281-
if (current_req == NULL) {
278+
if (autopoll_devs && !current_req) {
282279
/* Send a Talk Reg 0. The controller will repeatedly transmit
283280
* this as long as it is idle.
284281
*/

0 commit comments

Comments
 (0)