stmmac: fix and review the ptp registration.
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Wed, 19 Oct 2016 07:06:41 +0000 (09:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Oct 2016 19:10:30 +0000 (15:10 -0400)
commitc30a70d3ac60f3216e8d60d7746caad084a7eb46
tree06303ac6f3ec3be5ecb30a38e3c4d1f5a72f15a4
parent82454581d76ccb95535ba6898b39ac5baa123633
stmmac: fix and review the ptp registration.

The commit commit 7086605a6ab5 ("stmmac: fix error check when init ptp")
breaks the procedure added by the
commit efee95f42b5d ("ptp_clock: future-proofing drivers against PTP
subsystem becoming optional")

So this patch tries to re-import the logic added by the latest
commit above: it makes sense to have the stmmac_ptp_register
as void function and, inside the main, the stmmac_init_ptp can fails
in case of the capability cannot be supported by the HW.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre TORGUE <alexandre.torgue@st.com>
Cc: Rayagond Kokatanur <rayagond@vayavyalabs.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Nicolas Pitre <nico@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c