From c1c1d86bdea45880c1843087d40498127d4293c9 Mon Sep 17 00:00:00 2001 From: Or Gerlitz Date: Sun, 2 Jul 2017 18:57:28 +0300 Subject: net/mlxfw: Properly handle dependancy with non-loadable mlx5 If mlx5 is set to be built-in and mlxfw as a module, we get a link error: drivers/built-in.o: In function `mlx5_firmware_flash': (.text+0x5aed72): undefined reference to `mlxfw_firmware_flash' Since we don't want to mandate selecting mlxfw for mlx5 users, we use the IS_REACHABLE macro to make sure that a stub is exposed to the caller. Signed-off-by: Or Gerlitz Reported-by: Jakub Kicinski Reported-by: Arnd Bergmann Signed-off-by: David S. Miller --- drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/ethernet/mellanox/mlxfw/mlxfw.h b/drivers/net/ethernet/mellanox/mlxfw/mlxfw.h index 9ca85383aa35..7a712b6b09ec 100644 --- a/drivers/net/ethernet/mellanox/mlxfw/mlxfw.h +++ b/drivers/net/ethernet/mellanox/mlxfw/mlxfw.h @@ -96,7 +96,7 @@ struct mlxfw_dev { u16 psid_size; }; -#if IS_ENABLED(CONFIG_MLXFW) +#if IS_REACHABLE(CONFIG_MLXFW) int mlxfw_firmware_flash(struct mlxfw_dev *mlxfw_dev, const struct firmware *firmware); #else -- cgit