net: lan966x: Fix when CONFIG_PTP_1588_CLOCK is compiled as module
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Sat, 12 Feb 2022 20:45:44 +0000 (21:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Feb 2022 15:57:03 +0000 (15:57 +0000)
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>
drivers/net/ethernet/microchip/lan966x/Kconfig

index ac273f8..4241ff0 100644 (file)
@@ -1,5 +1,6 @@
 config LAN966X_SWITCH
        tristate "Lan966x switch driver"
+       depends on PTP_1588_CLOCK_OPTIONAL
        depends on HAS_IOMEM
        depends on OF
        depends on NET_SWITCHDEV