From f99dad30ea2fe1739eab15c82209371056a62ae3 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Fri, 6 Feb 2004 14:52:16 +1100 Subject: [PATCH] ADB: Minor fix, autopoll list could be lost on a failed bus reset --- drivers/macintosh/adb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index a20a9e899ef40..f1d34776308e1 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c @@ -83,6 +83,7 @@ static pid_t adb_probe_task_pid; static DECLARE_MUTEX(adb_probe_mutex); static struct completion adb_probe_task_comp; static int sleepy_trackpad; +static int autopoll_devs; int __adb_probe_sync; #ifdef CONFIG_PMAC_PBOOK @@ -379,7 +380,7 @@ adb_notify_sleep(struct pmu_sleep_notifier *self, int when) static int do_adb_reset_bus(void) { - int ret, nret, devs; + int ret, nret; if (adb_controller == NULL) return -ENXIO; @@ -390,7 +391,7 @@ do_adb_reset_bus(void) nret = notifier_call_chain(&adb_client_list, ADB_MSG_PRE_RESET, NULL); if (nret & NOTIFY_STOP_MASK) { if (adb_controller->autopoll) - adb_controller->autopoll(devs); + adb_controller->autopoll(autopoll_devs); return -EBUSY; } @@ -416,9 +417,9 @@ do_adb_reset_bus(void) } if (!ret) { - devs = adb_scan_bus(); + autopoll_devs = adb_scan_bus(); if (adb_controller->autopoll) - adb_controller->autopoll(devs); + adb_controller->autopoll(autopoll_devs); } up(&adb_handler_sem); -- 2.53.0