From: Grygorii Strashko Date: Wed, 7 Dec 2016 00:00:38 +0000 (-0600) Subject: net: ethernet: ti: cpts: disable cpts when unregistered X-Git-Tag: MMI-PSA29.97-13-9~6662^2~61^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8fcd68914e447af006f9597a2688754517fabfe9;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git net: ethernet: ti: cpts: disable cpts when unregistered The cpts now is left enabled after unregistration. Hence, disable it in cpts_unregister(). Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c index 3dda6d5ba0aa..d3c1ac5e9336 100644 --- a/drivers/net/ethernet/ti/cpts.c +++ b/drivers/net/ethernet/ti/cpts.c @@ -404,6 +404,10 @@ void cpts_unregister(struct cpts *cpts) ptp_clock_unregister(cpts->clock); cancel_delayed_work_sync(&cpts->overflow_work); } + + cpts_write32(cpts, 0, int_enable); + cpts_write32(cpts, 0, control); + if (cpts->refclk) cpts_clk_release(cpts); }