* [PATCH] HID: picolcd: Fix build error due to redefinition of 'picolcd_debug_raw_event'
@ 2012-09-11 12:29 Axel Lin
2012-09-11 14:08 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-09-11 12:29 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Bruno Prémont, linux-input
Current code missed the definition for picolcd_debug_raw_event, but add
definition for picolcd_debug_raw_event twice.
This patch fixes below build error:
CC [M] drivers/hid/hid-picolcd_core.o
In file included from drivers/hid/hid-picolcd_core.c:34:0:
drivers/hid/hid-picolcd.h:176:20: error: redefinition of 'picolcd_debug_raw_event'
drivers/hid/hid-picolcd.h:162:20: note: previous definition of 'picolcd_debug_raw_event' was here
make[2]: *** [drivers/hid/hid-picolcd_core.o] Error 1
make[1]: *** [drivers/hid] Error 2
make: *** [drivers] Error 2
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/hid/hid-picolcd.h | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/hid/hid-picolcd.h b/drivers/hid/hid-picolcd.h
index 240eb1c..020cef6 100644
--- a/drivers/hid/hid-picolcd.h
+++ b/drivers/hid/hid-picolcd.h
@@ -159,6 +159,10 @@ void picolcd_init_devfs(struct picolcd_data *data,
void picolcd_exit_devfs(struct picolcd_data *data);
#else
+static inline void picolcd_debug_out_report(struct picolcd_data *data,
+ struct hid_device *hdev, struct hid_report *report)
+{
+}
static inline void picolcd_debug_raw_event(struct picolcd_data *data,
struct hid_device *hdev, struct hid_report *report,
u8 *raw_data, int size)
@@ -173,11 +177,6 @@ static inline void picolcd_init_devfs(struct picolcd_data *data,
static inline void picolcd_exit_devfs(struct picolcd_data *data)
{
}
-static inline void picolcd_debug_raw_event(struct picolcd_data *data,
- struct hid_device *hdev, struct hid_report *report,
- u8 *raw_data, int size)
-{
-}
#endif /* CONFIG_DEBUG_FS */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] HID: picolcd: Fix build error due to redefinition of 'picolcd_debug_raw_event'
2012-09-11 12:29 [PATCH] HID: picolcd: Fix build error due to redefinition of 'picolcd_debug_raw_event' Axel Lin
@ 2012-09-11 14:08 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2012-09-11 14:08 UTC (permalink / raw)
To: Axel Lin; +Cc: Bruno Prémont, linux-input
On Tue, 11 Sep 2012, Axel Lin wrote:
> Current code missed the definition for picolcd_debug_raw_event, but add
This should be picolcd_debug_out_report().
> definition for picolcd_debug_raw_event twice.
>
> This patch fixes below build error:
> CC [M] drivers/hid/hid-picolcd_core.o
> In file included from drivers/hid/hid-picolcd_core.c:34:0:
> drivers/hid/hid-picolcd.h:176:20: error: redefinition of 'picolcd_debug_raw_event'
> drivers/hid/hid-picolcd.h:162:20: note: previous definition of 'picolcd_debug_raw_event' was here
> make[2]: *** [drivers/hid/hid-picolcd_core.o] Error 1
> make[1]: *** [drivers/hid] Error 2
> make: *** [drivers] Error 2
I have fixed the changelog, added the information that this affects
!CONFIG_DEBUG_FS case, and applied, thanks Alex.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> drivers/hid/hid-picolcd.h | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/hid/hid-picolcd.h b/drivers/hid/hid-picolcd.h
> index 240eb1c..020cef6 100644
> --- a/drivers/hid/hid-picolcd.h
> +++ b/drivers/hid/hid-picolcd.h
> @@ -159,6 +159,10 @@ void picolcd_init_devfs(struct picolcd_data *data,
>
> void picolcd_exit_devfs(struct picolcd_data *data);
> #else
> +static inline void picolcd_debug_out_report(struct picolcd_data *data,
> + struct hid_device *hdev, struct hid_report *report)
> +{
> +}
> static inline void picolcd_debug_raw_event(struct picolcd_data *data,
> struct hid_device *hdev, struct hid_report *report,
> u8 *raw_data, int size)
> @@ -173,11 +177,6 @@ static inline void picolcd_init_devfs(struct picolcd_data *data,
> static inline void picolcd_exit_devfs(struct picolcd_data *data)
> {
> }
> -static inline void picolcd_debug_raw_event(struct picolcd_data *data,
> - struct hid_device *hdev, struct hid_report *report,
> - u8 *raw_data, int size)
> -{
> -}
> #endif /* CONFIG_DEBUG_FS */
>
>
> --
> 1.7.9.5
>
>
>
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-11 14:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 12:29 [PATCH] HID: picolcd: Fix build error due to redefinition of 'picolcd_debug_raw_event' Axel Lin
2012-09-11 14:08 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).