ptp_clock: future-proofing drivers against PTP subsystem becoming optional
authorNicolas Pitre <nicolas.pitre@linaro.org>
Tue, 20 Sep 2016 23:25:58 +0000 (19:25 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Sep 2016 06:18:33 +0000 (02:18 -0400)
commitefee95f42b5dddedcaff0a0eaa44e170fc7522e8
treee5d83b374d57e1bced53af0345db98f0f6cd4373
parentd270f76c2d6ee3d96cfb1affb78a3d536e0b8fd6
ptp_clock: future-proofing drivers against PTP subsystem becoming optional

Drivers must be ready to accept NULL from ptp_clock_register() if the
PTP clock subsystem is configured out.

This patch documents that and ensures that all drivers cope well
with a NULL return.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Reviewed-by: Eugenia Emantayev <eugenia@mellanox.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/e1000e/ptp.c
drivers/net/ethernet/intel/i40e/i40e_ptp.c
drivers/net/ethernet/intel/igb/igb_ptp.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
drivers/net/ethernet/mellanox/mlx4/en_clock.c
drivers/net/ethernet/mellanox/mlx5/core/en_clock.c
drivers/net/ethernet/sfc/ptp.c
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
include/linux/ptp_clock_kernel.h