diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2018-01-16 19:56:54 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-01-17 12:52:22 -0500 |
commit | 698c03b4745006e14eccb8270f714d52fac1c97e (patch) | |
tree | 5432e1f38da57af40039f4a99cff24b74c84c722 | |
parent | 77ecf14e9e878eb87ecb5449711ca979712798be (diff) |
Input: inline macros for MODULE_LICENSE, etc
Inline macro for MODULE_LICENSE to make the license information easy to
find, eg with grep. Inline the other module-related macros at the same
time.
A simplified version of the semantic patch for the MODULE_LICENSE
case is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@s@
identifier i; expression e;
@@
@@
declarer name MODULE_LICENSE;
identifier s.i;
expression s.e;
@@
MODULE_LICENSE(
- i
+ e
);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
[dtor: added a couple of drivers missed by the script, removed a few unused
DRIVER_VERSION macros]
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/joystick/xpad.c | 7 | ||||
-rw-r--r-- | drivers/input/misc/keyspan_remote.c | 8 | ||||
-rw-r--r-- | drivers/input/misc/yealink.c | 6 | ||||
-rw-r--r-- | drivers/input/tablet/acecad.c | 11 | ||||
-rw-r--r-- | drivers/input/tablet/aiptek.c | 11 | ||||
-rw-r--r-- | drivers/input/tablet/hanwang.c | 7 | ||||
-rw-r--r-- | drivers/input/tablet/kbtab.c | 14 | ||||
-rw-r--r-- | drivers/input/touchscreen/usbtouchscreen.c | 9 |
8 files changed, 17 insertions, 56 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index d86e59515b9c..0434a1369188 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -84,9 +84,6 @@ | |||
84 | #include <linux/usb/input.h> | 84 | #include <linux/usb/input.h> |
85 | #include <linux/usb/quirks.h> | 85 | #include <linux/usb/quirks.h> |
86 | 86 | ||
87 | #define DRIVER_AUTHOR "Marko Friedemann <mfr@bmx-chemnitz.de>" | ||
88 | #define DRIVER_DESC "X-Box pad driver" | ||
89 | |||
90 | #define XPAD_PKT_LEN 64 | 87 | #define XPAD_PKT_LEN 64 |
91 | 88 | ||
92 | /* xbox d-pads should map to buttons, as is required for DDR pads | 89 | /* xbox d-pads should map to buttons, as is required for DDR pads |
@@ -1924,6 +1921,6 @@ static struct usb_driver xpad_driver = { | |||
1924 | 1921 | ||
1925 | module_usb_driver(xpad_driver); | 1922 | module_usb_driver(xpad_driver); |
1926 | 1923 | ||
1927 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1924 | MODULE_AUTHOR("Marko Friedemann <mfr@bmx-chemnitz.de>"); |
1928 | MODULE_DESCRIPTION(DRIVER_DESC); | 1925 | MODULE_DESCRIPTION("X-Box pad driver"); |
1929 | MODULE_LICENSE("GPL"); | 1926 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c index 4f13b2f7bf4f..67482b248b2d 100644 --- a/drivers/input/misc/keyspan_remote.c +++ b/drivers/input/misc/keyspan_remote.c | |||
@@ -17,10 +17,6 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/usb/input.h> | 18 | #include <linux/usb/input.h> |
19 | 19 | ||
20 | #define DRIVER_VERSION "v0.1" | ||
21 | #define DRIVER_AUTHOR "Michael Downey <downey@zymeta.com>" | ||
22 | #define DRIVER_DESC "Driver for the USB Keyspan remote control." | ||
23 | |||
24 | /* Parameters that can be passed to the driver. */ | 20 | /* Parameters that can be passed to the driver. */ |
25 | static int debug; | 21 | static int debug; |
26 | module_param(debug, int, 0444); | 22 | module_param(debug, int, 0444); |
@@ -589,6 +585,6 @@ static struct usb_driver keyspan_driver = | |||
589 | module_usb_driver(keyspan_driver); | 585 | module_usb_driver(keyspan_driver); |
590 | 586 | ||
591 | MODULE_DEVICE_TABLE(usb, keyspan_table); | 587 | MODULE_DEVICE_TABLE(usb, keyspan_table); |
592 | MODULE_AUTHOR(DRIVER_AUTHOR); | 588 | MODULE_AUTHOR("Michael Downey <downey@zymeta.com>"); |
593 | MODULE_DESCRIPTION(DRIVER_DESC); | 589 | MODULE_DESCRIPTION("Driver for the USB Keyspan remote control."); |
594 | MODULE_LICENSE("GPL"); | 590 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index a1e0ff59d2f2..f0c9bf87b4e3 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c | |||
@@ -56,8 +56,6 @@ | |||
56 | #include "yealink.h" | 56 | #include "yealink.h" |
57 | 57 | ||
58 | #define DRIVER_VERSION "yld-20051230" | 58 | #define DRIVER_VERSION "yld-20051230" |
59 | #define DRIVER_AUTHOR "Henk Vergonet" | ||
60 | #define DRIVER_DESC "Yealink phone driver" | ||
61 | 59 | ||
62 | #define YEALINK_POLLING_FREQUENCY 10 /* in [Hz] */ | 60 | #define YEALINK_POLLING_FREQUENCY 10 /* in [Hz] */ |
63 | 61 | ||
@@ -1006,6 +1004,6 @@ module_usb_driver(yealink_driver); | |||
1006 | 1004 | ||
1007 | MODULE_DEVICE_TABLE (usb, usb_table); | 1005 | MODULE_DEVICE_TABLE (usb, usb_table); |
1008 | 1006 | ||
1009 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1007 | MODULE_AUTHOR("Henk Vergonet"); |
1010 | MODULE_DESCRIPTION(DRIVER_DESC); | 1008 | MODULE_DESCRIPTION("Yealink phone driver"); |
1011 | MODULE_LICENSE("GPL"); | 1009 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index fcb67c7cd86b..a86255d08a6b 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c | |||
@@ -30,15 +30,8 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/usb/input.h> | 31 | #include <linux/usb/input.h> |
32 | 32 | ||
33 | /* | 33 | MODULE_AUTHOR("Edouard TISSERANT <edouard.tisserant@wanadoo.fr>"); |
34 | * Version Information | 34 | MODULE_DESCRIPTION("USB Acecad Flair tablet driver"); |
35 | */ | ||
36 | #define DRIVER_VERSION "v3.2" | ||
37 | #define DRIVER_DESC "USB Acecad Flair tablet driver" | ||
38 | #define DRIVER_AUTHOR "Edouard TISSERANT <edouard.tisserant@wanadoo.fr>" | ||
39 | |||
40 | MODULE_AUTHOR(DRIVER_AUTHOR); | ||
41 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
42 | MODULE_LICENSE("GPL"); | 35 | MODULE_LICENSE("GPL"); |
43 | 36 | ||
44 | #define USB_VENDOR_ID_ACECAD 0x0460 | 37 | #define USB_VENDOR_ID_ACECAD 0x0460 |
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index 0b55e1f375b3..545fa6e89035 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c | |||
@@ -79,13 +79,6 @@ | |||
79 | #include <asm/unaligned.h> | 79 | #include <asm/unaligned.h> |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Version Information | ||
83 | */ | ||
84 | #define DRIVER_VERSION "v2.3 (May 2, 2007)" | ||
85 | #define DRIVER_AUTHOR "Bryan W. Headley/Chris Atenasio/Cedric Brun/Rene van Paassen" | ||
86 | #define DRIVER_DESC "Aiptek HyperPen USB Tablet Driver (Linux 2.6.x)" | ||
87 | |||
88 | /* | ||
89 | * Aiptek status packet: | 82 | * Aiptek status packet: |
90 | * | 83 | * |
91 | * (returned as Report 1 - relative coordinates from mouse and stylus) | 84 | * (returned as Report 1 - relative coordinates from mouse and stylus) |
@@ -1941,8 +1934,8 @@ static struct usb_driver aiptek_driver = { | |||
1941 | 1934 | ||
1942 | module_usb_driver(aiptek_driver); | 1935 | module_usb_driver(aiptek_driver); |
1943 | 1936 | ||
1944 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1937 | MODULE_AUTHOR("Bryan W. Headley/Chris Atenasio/Cedric Brun/Rene van Paassen"); |
1945 | MODULE_DESCRIPTION(DRIVER_DESC); | 1938 | MODULE_DESCRIPTION("Aiptek HyperPen USB Tablet Driver"); |
1946 | MODULE_LICENSE("GPL"); | 1939 | MODULE_LICENSE("GPL"); |
1947 | 1940 | ||
1948 | module_param(programmableDelay, int, 0); | 1941 | module_param(programmableDelay, int, 0); |
diff --git a/drivers/input/tablet/hanwang.c b/drivers/input/tablet/hanwang.c index 70cb26bbfe1d..4042c41160f4 100644 --- a/drivers/input/tablet/hanwang.c +++ b/drivers/input/tablet/hanwang.c | |||
@@ -28,11 +28,8 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/usb/input.h> | 29 | #include <linux/usb/input.h> |
30 | 30 | ||
31 | #define DRIVER_AUTHOR "Xing Wei <weixing@hanwang.com.cn>" | 31 | MODULE_AUTHOR("Xing Wei <weixing@hanwang.com.cn>"); |
32 | #define DRIVER_DESC "USB Hanwang tablet driver" | 32 | MODULE_DESCRIPTION("USB Hanwang tablet driver"); |
33 | |||
34 | MODULE_AUTHOR(DRIVER_AUTHOR); | ||
35 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
36 | MODULE_LICENSE("GPL"); | 33 | MODULE_LICENSE("GPL"); |
37 | 34 | ||
38 | #define USB_VENDOR_ID_HANWANG 0x0b57 | 35 | #define USB_VENDOR_ID_HANWANG 0x0b57 |
diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index bee18e33e261..75b500651e4e 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c | |||
@@ -5,19 +5,11 @@ | |||
5 | #include <asm/unaligned.h> | 5 | #include <asm/unaligned.h> |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Version Information | 8 | * Pressure-threshold modules param code from Alex Perry <alex.perry@ieee.org> |
9 | * v0.0.1 - Original, extremely basic version, 2.4.xx only | ||
10 | * v0.0.2 - Updated, works with 2.5.62 and 2.4.20; | ||
11 | * - added pressure-threshold modules param code from | ||
12 | * Alex Perry <alex.perry@ieee.org> | ||
13 | */ | 9 | */ |
14 | 10 | ||
15 | #define DRIVER_VERSION "v0.0.2" | 11 | MODULE_AUTHOR("Josh Myer <josh@joshisanerd.com>"); |
16 | #define DRIVER_AUTHOR "Josh Myer <josh@joshisanerd.com>" | 12 | MODULE_DESCRIPTION("USB KB Gear JamStudio Tablet driver"); |
17 | #define DRIVER_DESC "USB KB Gear JamStudio Tablet driver" | ||
18 | |||
19 | MODULE_AUTHOR(DRIVER_AUTHOR); | ||
20 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
21 | MODULE_LICENSE("GPL"); | 13 | MODULE_LICENSE("GPL"); |
22 | 14 | ||
23 | #define USB_VENDOR_ID_KBGEAR 0x084e | 15 | #define USB_VENDOR_ID_KBGEAR 0x084e |
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 2c41107240de..aa77d243b786 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c | |||
@@ -55,11 +55,6 @@ | |||
55 | #include <linux/usb/input.h> | 55 | #include <linux/usb/input.h> |
56 | #include <linux/hid.h> | 56 | #include <linux/hid.h> |
57 | 57 | ||
58 | |||
59 | #define DRIVER_VERSION "v0.6" | ||
60 | #define DRIVER_AUTHOR "Daniel Ritz <daniel.ritz@gmx.ch>" | ||
61 | #define DRIVER_DESC "USB Touchscreen Driver" | ||
62 | |||
63 | static bool swap_xy; | 58 | static bool swap_xy; |
64 | module_param(swap_xy, bool, 0644); | 59 | module_param(swap_xy, bool, 0644); |
65 | MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped."); | 60 | MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped."); |
@@ -1763,8 +1758,8 @@ static struct usb_driver usbtouch_driver = { | |||
1763 | 1758 | ||
1764 | module_usb_driver(usbtouch_driver); | 1759 | module_usb_driver(usbtouch_driver); |
1765 | 1760 | ||
1766 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1761 | MODULE_AUTHOR("Daniel Ritz <daniel.ritz@gmx.ch>"); |
1767 | MODULE_DESCRIPTION(DRIVER_DESC); | 1762 | MODULE_DESCRIPTION("USB Touchscreen Driver"); |
1768 | MODULE_LICENSE("GPL"); | 1763 | MODULE_LICENSE("GPL"); |
1769 | 1764 | ||
1770 | MODULE_ALIAS("touchkitusb"); | 1765 | MODULE_ALIAS("touchkitusb"); |