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 <grygorii.strashko@ti.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Grygorii Strashko 2016-12-06 18:00:38 -06:00 committed by David S. Miller
parent 6c691405bc
commit 8fcd68914e

View File

@ -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);
}