2011-10-26 15:30:44

by Sangwook Lee

[permalink] [raw]
Subject: [PATCH] ath6kl: Fix compile error for ARM

Fix the compile error for ARM Platform.

Signed-off-by: Sangwook Lee <[email protected]>
---

Compile errors come from ARM plaform:
In file included from drivers/net/wireless/ath/ath6kl/init.c:19:0:
include/linux/of.h: In function ‘of_property_read_u32_array’:
include/linux/of.h:249:10: error: ‘ENOSYS’ undeclared

drivers/net/wireless/ath/ath6kl/init.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 4c0c314..64975a9 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -16,6 +16,7 @@
*/

#include <linux/moduleparam.h>
+#include <linux/errno.h>
#include <linux/of.h>
#include <linux/mmc/sdio_func.h>
#include "core.h"
--
1.7.4.1



2011-10-27 08:33:10

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath6kl: Fix compile error for ARM

On 10/26/2011 06:28 PM, Sangwook Lee wrote:
> Fix the compile error for ARM Platform.
>
> Signed-off-by: Sangwook Lee <[email protected]>
> ---
>
> Compile errors come from ARM plaform:
> In file included from drivers/net/wireless/ath/ath6kl/init.c:19:0:
> include/linux/of.h: In function ‘of_property_read_u32_array’:
> include/linux/of.h:249:10: error: ‘ENOSYS’ undeclared

In my opinion this is a bug in of.h and I sent a patch few weeks ago:

https://lkml.org/lkml/2011/10/6/133

But it seems that openfirmware maintainers don't care as I haven't
received any reply to the patch. So let's just workaround this in ath6kl.

Patch applied, but I changed the commit log a bit. Thank you again.

commit e0627e2c7e0647d174d9fcac06fa194d38740f7d
Author: Sangwook Lee <[email protected]>
Date: Wed Oct 26 16:28:38 2011 +0100

ath6kl: Fix compilation error from of.h

When compiling ath6kl for ARM with device tree tree compilation fails
with errors like:

include/linux/of.h: In function 'of_property_read_u32_array':
include/linux/of.h:249:10: error: 'ENOSYS' undeclared

Workaround this by including errno.h from init.c.

kvalo: improved commit log

Signed-off-by: Sangwook Lee <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>

Kalle