Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: lan966x: Fix when CONFIG_PTP_1588_CLOCK is compiled as module

When CONFIG_PTP_1588_CLOCK is compiled as a module, then the linking of
the lan966x fails because it can't find references to the following
functions 'ptp_clock_index', 'ptp_clock_register' and
'ptp_clock_unregister'

The fix consists in adding CONFIG_PTP_1588_CLOCK_OPTIONAL as a
dependency for the driver.

Fixes: d096459494a887 ("net: lan966x: Add support for ptp clocks")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Horatiu Vultur and committed by
David S. Miller
1da52b0e 48927142

+1
+1
drivers/net/ethernet/microchip/lan966x/Kconfig
··· 1 1 config LAN966X_SWITCH 2 2 tristate "Lan966x switch driver" 3 + depends on PTP_1588_CLOCK_OPTIONAL 3 4 depends on HAS_IOMEM 4 5 depends on OF 5 6 depends on NET_SWITCHDEV