diff mbox series

ath11k: fix link error when CONFIG_REMOTEPROC is disabled

Message ID 0101017476e38f40-c4168ac4-c00a-4220-a032-fe17e4a157cb-000000@us-west-2.amazonses.com (mailing list archive)
State Accepted
Commit 5c0ec012ca7f7771f4a2dc9e41333411dd2693bc
Delegated to: Kalle Valo
Headers show
Series ath11k: fix link error when CONFIG_REMOTEPROC is disabled | expand

Commit Message

Kalle Valo Sept. 10, 2020, 7:20 a.m. UTC
If CONFIG_REMOTEPROC was disabled the linking failed with:

ERROR: modpost: "rproc_get_by_phandle" [drivers/net/wireless/ath/ath11k/ath11k.ko] undefined!

Compile tested only.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: 1ff8ed786d5d ("ath11k: use remoteproc only with AHB devices")
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/core.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Kalle Valo Sept. 11, 2020, 9:58 a.m. UTC | #1
Kalle Valo <kvalo@codeaurora.org> wrote:

> If CONFIG_REMOTEPROC was disabled the linking failed with:
> 
> ERROR: modpost: "rproc_get_by_phandle" [drivers/net/wireless/ath/ath11k/ath11k.ko] undefined!
> 
> Compile tested only.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: 1ff8ed786d5d ("ath11k: use remoteproc only with AHB devices")
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

5c0ec012ca7f ath11k: fix link error when CONFIG_REMOTEPROC is disabled
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 437b1123a34f..413811edd083 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -784,6 +784,9 @@  static int ath11k_core_get_rproc(struct ath11k_base *ab)
 	struct rproc *prproc;
 	phandle rproc_phandle;
 
+	if (!IS_ENABLED(CONFIG_REMOTEPROC))
+		return 0;
+
 	if (ab->bus_params.mhi_support)
 		return 0;