Skip to content

Commit

Permalink
HID: picolcd: fix build error if !CONFIG_DEBUG_FS
Browse files Browse the repository at this point in the history
Current code missed the definition for picolcd_debug_out_report, 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

if CONFIG_DEBUG_FS is unset.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Axel Lin authored and Jiri Kosina committed Sep 11, 2012
1 parent 02d9be1 commit e9a7c79
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/hid/hid-picolcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 */


Expand Down

0 comments on commit e9a7c79

Please sign in to comment.