]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commited6d6ed4568189354d51f31a71cb5c6657c19ac0
tree06303ac6f3ec3be5ecb30a38e3c4d1f5a72f15a4
parente11aeec4b44f03a9e695740c992816cc72add450
stmmac: fix and review the ptp registration.

The commit commit 38fc2bba10d2 ("stmmac: fix error check when init ptp")
breaks the procedure added by the
commit 7c70bf7f970e ("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