Skip to content

Commit

Permalink
HID: avoid sparse warning in HID_COMPAT_LOAD_DRIVER
Browse files Browse the repository at this point in the history
Impact: include a prototype for the exported function in the macro

Fix about 20 of this warnings:

  drivers/hid/hid-a4tech.c:162:1: warning: symbol 'hid_compat_a4tech' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Hannes Eder authored and Jiri Kosina committed Jan 4, 2009
1 parent 0790340 commit 725cf0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,8 @@ dbg_hid(const char *fmt, ...)

#ifdef CONFIG_HID_COMPAT
#define HID_COMPAT_LOAD_DRIVER(name) \
/* prototype to avoid sparse warning */ \
extern void hid_compat_##name(void); \
void hid_compat_##name(void) { } \
EXPORT_SYMBOL(hid_compat_##name)
#else
Expand Down

0 comments on commit 725cf0f

Please sign in to comment.