Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Julia Lawall and committed by
Dmitry Torokhov
698c03b4 77ecf14e

+17 -56
+2 -5
drivers/input/joystick/xpad.c
··· 84 84 #include <linux/usb/input.h> 85 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 87 #define XPAD_PKT_LEN 64 91 88 92 89 /* xbox d-pads should map to buttons, as is required for DDR pads ··· 1921 1924 1922 1925 module_usb_driver(xpad_driver); 1923 1926 1924 - MODULE_AUTHOR(DRIVER_AUTHOR); 1925 - MODULE_DESCRIPTION(DRIVER_DESC); 1927 + MODULE_AUTHOR("Marko Friedemann <mfr@bmx-chemnitz.de>"); 1928 + MODULE_DESCRIPTION("X-Box pad driver"); 1926 1929 MODULE_LICENSE("GPL");
+2 -6
drivers/input/misc/keyspan_remote.c
··· 17 17 #include <linux/module.h> 18 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 20 /* Parameters that can be passed to the driver. */ 25 21 static int debug; 26 22 module_param(debug, int, 0444); ··· 585 589 module_usb_driver(keyspan_driver); 586 590 587 591 MODULE_DEVICE_TABLE(usb, keyspan_table); 588 - MODULE_AUTHOR(DRIVER_AUTHOR); 589 - MODULE_DESCRIPTION(DRIVER_DESC); 592 + MODULE_AUTHOR("Michael Downey <downey@zymeta.com>"); 593 + MODULE_DESCRIPTION("Driver for the USB Keyspan remote control."); 590 594 MODULE_LICENSE("GPL");
+2 -4
drivers/input/misc/yealink.c
··· 56 56 #include "yealink.h" 57 57 58 58 #define DRIVER_VERSION "yld-20051230" 59 - #define DRIVER_AUTHOR "Henk Vergonet" 60 - #define DRIVER_DESC "Yealink phone driver" 61 59 62 60 #define YEALINK_POLLING_FREQUENCY 10 /* in [Hz] */ 63 61 ··· 1004 1006 1005 1007 MODULE_DEVICE_TABLE (usb, usb_table); 1006 1008 1007 - MODULE_AUTHOR(DRIVER_AUTHOR); 1008 - MODULE_DESCRIPTION(DRIVER_DESC); 1009 + MODULE_AUTHOR("Henk Vergonet"); 1010 + MODULE_DESCRIPTION("Yealink phone driver"); 1009 1011 MODULE_LICENSE("GPL");
+2 -9
drivers/input/tablet/acecad.c
··· 30 30 #include <linux/module.h> 31 31 #include <linux/usb/input.h> 32 32 33 - /* 34 - * Version Information 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); 33 + MODULE_AUTHOR("Edouard TISSERANT <edouard.tisserant@wanadoo.fr>"); 34 + MODULE_DESCRIPTION("USB Acecad Flair tablet driver"); 42 35 MODULE_LICENSE("GPL"); 43 36 44 37 #define USB_VENDOR_ID_ACECAD 0x0460
+2 -9
drivers/input/tablet/aiptek.c
··· 79 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 82 * Aiptek status packet: 90 83 * 91 84 * (returned as Report 1 - relative coordinates from mouse and stylus) ··· 1934 1941 1935 1942 module_usb_driver(aiptek_driver); 1936 1943 1937 - MODULE_AUTHOR(DRIVER_AUTHOR); 1938 - MODULE_DESCRIPTION(DRIVER_DESC); 1944 + MODULE_AUTHOR("Bryan W. Headley/Chris Atenasio/Cedric Brun/Rene van Paassen"); 1945 + MODULE_DESCRIPTION("Aiptek HyperPen USB Tablet Driver"); 1939 1946 MODULE_LICENSE("GPL"); 1940 1947 1941 1948 module_param(programmableDelay, int, 0);
+2 -5
drivers/input/tablet/hanwang.c
··· 28 28 #include <linux/module.h> 29 29 #include <linux/usb/input.h> 30 30 31 - #define DRIVER_AUTHOR "Xing Wei <weixing@hanwang.com.cn>" 32 - #define DRIVER_DESC "USB Hanwang tablet driver" 33 - 34 - MODULE_AUTHOR(DRIVER_AUTHOR); 35 - MODULE_DESCRIPTION(DRIVER_DESC); 31 + MODULE_AUTHOR("Xing Wei <weixing@hanwang.com.cn>"); 32 + MODULE_DESCRIPTION("USB Hanwang tablet driver"); 36 33 MODULE_LICENSE("GPL"); 37 34 38 35 #define USB_VENDOR_ID_HANWANG 0x0b57
+3 -11
drivers/input/tablet/kbtab.c
··· 5 5 #include <asm/unaligned.h> 6 6 7 7 /* 8 - * Version Information 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> 8 + * Pressure-threshold modules param code from Alex Perry <alex.perry@ieee.org> 13 9 */ 14 10 15 - #define DRIVER_VERSION "v0.0.2" 16 - #define DRIVER_AUTHOR "Josh Myer <josh@joshisanerd.com>" 17 - #define DRIVER_DESC "USB KB Gear JamStudio Tablet driver" 18 - 19 - MODULE_AUTHOR(DRIVER_AUTHOR); 20 - MODULE_DESCRIPTION(DRIVER_DESC); 11 + MODULE_AUTHOR("Josh Myer <josh@joshisanerd.com>"); 12 + MODULE_DESCRIPTION("USB KB Gear JamStudio Tablet driver"); 21 13 MODULE_LICENSE("GPL"); 22 14 23 15 #define USB_VENDOR_ID_KBGEAR 0x084e
+2 -7
drivers/input/touchscreen/usbtouchscreen.c
··· 55 55 #include <linux/usb/input.h> 56 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 58 static bool swap_xy; 64 59 module_param(swap_xy, bool, 0644); 65 60 MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped."); ··· 1758 1763 1759 1764 module_usb_driver(usbtouch_driver); 1760 1765 1761 - MODULE_AUTHOR(DRIVER_AUTHOR); 1762 - MODULE_DESCRIPTION(DRIVER_DESC); 1766 + MODULE_AUTHOR("Daniel Ritz <daniel.ritz@gmx.ch>"); 1767 + MODULE_DESCRIPTION("USB Touchscreen Driver"); 1763 1768 MODULE_LICENSE("GPL"); 1764 1769 1765 1770 MODULE_ALIAS("touchkitusb");