From ac0696629d73d87e51c2fb75426cebad4399bac4 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Thu, 15 May 2014 12:17:28 +0200 Subject: [PATCH] usb: ehci-orion: fix clock reference leaking In order to disable the clock in the ->remove() function, a call to devm_clk_get() is being made, which further increases the reference count of the clock. In order to clean this up, a private structure holding a pointer to the clock is added using the override mechanism provided by the ehci framework. This makes the driver clock handling much more logical. The bug was introduced in v3.6, however the ehci framework allowing to use the override mechanism has only been introduced in v3.8, so this patch won't apply before it. [Thomas: reword commit log, fix goto label names.] Fixes: 8c869edaee07c623066266827371235fb9c12e01 ('ARM: Orion: EHCI: Add support for enabling clocks') Cc: # v3.8+ Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Petazzoni Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed