aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2016-09-20 19:25:58 -0400
committerDavid S. Miller <davem@davemloft.net>2016-09-22 02:18:33 -0400
commitefee95f42b5dddedcaff0a0eaa44e170fc7522e8 (patch)
treee5d83b374d57e1bced53af0345db98f0f6cd4373 /include
parentnet: ethernet: hisilicon: hns: use new api ethtool_{get|set}_link_ksettings (diff)
downloadlinux-dev-efee95f42b5dddedcaff0a0eaa44e170fc7522e8.tar.xz
linux-dev-efee95f42b5dddedcaff0a0eaa44e170fc7522e8.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ptp_clock_kernel.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h
index 6b15e168148a..5ad54fc66cf0 100644
--- a/include/linux/ptp_clock_kernel.h
+++ b/include/linux/ptp_clock_kernel.h
@@ -127,6 +127,11 @@ struct ptp_clock;
*
* @info: Structure describing the new clock.
* @parent: Pointer to the parent device of the new clock.
+ *
+ * Returns a valid pointer on success or PTR_ERR on failure. If PHC
+ * support is missing at the configuration level, this function
+ * returns NULL, and drivers are expected to gracefully handle that
+ * case separately.
*/
extern struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,