summaryrefslogtreecommitdiff
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-02-03 04:44:13 +0400
committerRusty Russell <rusty@rustcorp.com.au>2014-03-13 05:41:00 +0400
commit21bdd17b21b45ea48e06e23918d681afbe0622e9 (patch)
tree6eff7072912ade3ba7722d98acc753c65477b169 /include/linux/module.h
parent27bba4d6bb3779a6678b31f9c9b9c1553c63fa95 (diff)
downloadlinux-21bdd17b21b45ea48e06e23918d681afbe0622e9.tar.xz
module: allow multiple calls to MODULE_DEVICE_TABLE() per module
Commit 78551277e4df5: "Input: i8042 - add PNP modaliases" had a bug, where the second call to MODULE_DEVICE_TABLE() overrode the first resulting in not all the modaliases being exposed. This fixes the problem by including the name of the device_id table in the __mod_*_device_table alias, allowing us to export several device_id tables per module. Suggested-by: Kay Sievers <kay@vrfy.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index eaf60ff9ba94..ad18f6006f86 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -142,7 +142,7 @@ extern const struct gtype##_id __mod_##gtype##_table \
#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
#define MODULE_DEVICE_TABLE(type, name) \
- MODULE_GENERIC_TABLE(type##_device, name)
+ MODULE_GENERIC_TABLE(type##__##name##_device, name)
/* Version of form [<epoch>:]<version>[-<extra-version>].
* Or for CVS/RCS ID version, everything but the number is stripped.