USB: host: ohci-at91: resume: balance the clock start call
authorBoris Krasnovskiy <Boris.Krasnovskiy@lairdconnect.com>
Wed, 11 Sep 2019 06:41:54 +0000 (08:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 12:16:53 +0000 (14:16 +0200)
commit87e8dfa6f7ebdb3e2802a606bda44d26054f92a8
treed3407d85c9aae277bfac1a79157670477c2b44b3
parenta3bf4d6816556baa9a503c9232eb7e3f018ff8dc
USB: host: ohci-at91: resume: balance the clock start call

There is a clock enable counter run away problem in resume ohci_at91. Code
enables clock that was never disabled in case of non wakeup interface. That
would make clock unstoppable in future.
Use proper alternative to start clocks only if they were stopped before.

Signed-off-by: Boris Krasnovskiy <Boris.Krasnovskiy@lairdconnect.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20190911064154.28633-4-nicolas.ferre@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-at91.c