net: enetc: Replace ifdef with IS_ENABLED
authorMartyn Welch <martyn.welch@collabora.com>
Thu, 12 Sep 2024 17:37:40 +0000 (18:37 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Sep 2024 03:01:11 +0000 (20:01 -0700)
commit9c699a8f3b273c62f7b364ff999e873501a1e834
tree6417145a9dbda722ebb6631f398b41a4f0b405cf
parent9297886f9fcd20176a2eb68961c79f4f0b99e117
net: enetc: Replace ifdef with IS_ENABLED

The enetc driver uses ifdefs when checking whether
CONFIG_FSL_ENETC_PTP_CLOCK is enabled in a number of places. This works
if the driver is built-in but fails if the driver is available as a
kernel module. Replace the instances of ifdef with use of the IS_ENABLED
macro, that will evaluate as true when this feature is built as a kernel
module and follows the kernel's coding style.

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240912173742.484549-1-martyn.welch@collabora.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc.h
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c