diff mbox

[U-Boot] input: key_matrix: fix header inclusion

Message ID 1343940564-31464-1-git-send-email-linz@li-pro.net
State Accepted
Commit c20dbf64a976a40d39694a991d3bf51985cb35f6
Delegated to: Michal Simek
Headers show

Commit Message

Stephan Linz Aug. 2, 2012, 8:49 p.m. UTC
On Microblaze with device tree support enabled we run into
the error below.

I'm not sure, but I think that all source code should include
at least the common.h and just this fix the problem on
Microblaz architecture.

The error is:

In file included from key_matrix.c:29:
include/malloc.h:364: error: conflicting types for 'memset'
include/linux/string.h:71: error: previous declaration of 'memset' was here
include/malloc.h:365: error: conflicting types for 'memcpy'
include/linux/string.h:74: error: previous declaration of 'memcpy' was here

Signed-off-by: Stephan Linz <linz@li-pro.net>
CC: Bernie Thompson <bhthompson@chromium.org>
CC: Simon Glass <sjg@chromium.org>
CC: Tom Warren <twarren@nvidia.com>
CC: Michal Simek <monstr@monstr.eu>
---
 drivers/input/key_matrix.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Simon Glass Aug. 6, 2012, 5:56 p.m. UTC | #1
On Thu, Aug 2, 2012 at 1:49 PM, Stephan Linz <linz@li-pro.net> wrote:
> On Microblaze with device tree support enabled we run into
> the error below.
>
> I'm not sure, but I think that all source code should include
> at least the common.h and just this fix the problem on
> Microblaz architecture.
>
> The error is:
>
> In file included from key_matrix.c:29:
> include/malloc.h:364: error: conflicting types for 'memset'
> include/linux/string.h:71: error: previous declaration of 'memset' was here
> include/malloc.h:365: error: conflicting types for 'memcpy'
> include/linux/string.h:74: error: previous declaration of 'memcpy' was here
>
> Signed-off-by: Stephan Linz <linz@li-pro.net>
> CC: Bernie Thompson <bhthompson@chromium.org>
> CC: Simon Glass <sjg@chromium.org>
> CC: Tom Warren <twarren@nvidia.com>
> CC: Michal Simek <monstr@monstr.eu>

Acked-by: Simon Glass <sjg@chromium.org>

> ---
>  drivers/input/key_matrix.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/input/key_matrix.c b/drivers/input/key_matrix.c
> index 84b898f..715e57a 100644
> --- a/drivers/input/key_matrix.c
> +++ b/drivers/input/key_matrix.c
> @@ -23,6 +23,7 @@
>   * MA 02111-1307 USA
>   */
>
> +#include <common.h>
>  #include <fdtdec.h>
>  #include <key_matrix.h>
>  #include <malloc.h>
> --
> 1.7.0.4
>
Michal Simek Aug. 7, 2012, 5:04 a.m. UTC | #2
On 08/06/2012 07:56 PM, Simon Glass wrote:
> On Thu, Aug 2, 2012 at 1:49 PM, Stephan Linz <linz@li-pro.net> wrote:
>> On Microblaze with device tree support enabled we run into
>> the error below.
>>
>> I'm not sure, but I think that all source code should include
>> at least the common.h and just this fix the problem on
>> Microblaz architecture.
>>
>> The error is:
>>
>> In file included from key_matrix.c:29:
>> include/malloc.h:364: error: conflicting types for 'memset'
>> include/linux/string.h:71: error: previous declaration of 'memset' was here
>> include/malloc.h:365: error: conflicting types for 'memcpy'
>> include/linux/string.h:74: error: previous declaration of 'memcpy' was here
>>
>> Signed-off-by: Stephan Linz <linz@li-pro.net>
>> CC: Bernie Thompson <bhthompson@chromium.org>
>> CC: Simon Glass <sjg@chromium.org>
>> CC: Tom Warren <twarren@nvidia.com>
>> CC: Michal Simek <monstr@monstr.eu>
>
> Acked-by: Simon Glass <sjg@chromium.org>

Acked-by: Michal Simek <monstr@monstr.eu>


Thanks,
Michal
Wolfgang Denk Sept. 2, 2012, 3:44 p.m. UTC | #3
Dear Stephan Linz,

In message <1343940564-31464-1-git-send-email-linz@li-pro.net> you wrote:
> On Microblaze with device tree support enabled we run into
> the error below.
> 
> I'm not sure, but I think that all source code should include
> at least the common.h and just this fix the problem on
> Microblaz architecture.
> 
> The error is:
> 
> In file included from key_matrix.c:29:
> include/malloc.h:364: error: conflicting types for 'memset'
> include/linux/string.h:71: error: previous declaration of 'memset' was here
> include/malloc.h:365: error: conflicting types for 'memcpy'
> include/linux/string.h:74: error: previous declaration of 'memcpy' was here
> 
> Signed-off-by: Stephan Linz <linz@li-pro.net>
> CC: Bernie Thompson <bhthompson@chromium.org>
> CC: Simon Glass <sjg@chromium.org>
> CC: Tom Warren <twarren@nvidia.com>
> CC: Michal Simek <monstr@monstr.eu>
> ---
>  drivers/input/key_matrix.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/drivers/input/key_matrix.c b/drivers/input/key_matrix.c
index 84b898f..715e57a 100644
--- a/drivers/input/key_matrix.c
+++ b/drivers/input/key_matrix.c
@@ -23,6 +23,7 @@ 
  * MA 02111-1307 USA
  */
 
+#include <common.h>
 #include <fdtdec.h>
 #include <key_matrix.h>
 #include <malloc.h>