Commit 698c03b4 authored by Julia Lawall's avatar Julia Lawall Committed by Dmitry Torokhov
Browse files

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: default avatarJulia 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: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 77ecf14e
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -84,9 +84,6 @@
#include <linux/usb/input.h>
#include <linux/usb/quirks.h>

#define DRIVER_AUTHOR "Marko Friedemann <mfr@bmx-chemnitz.de>"
#define DRIVER_DESC "X-Box pad driver"

#define XPAD_PKT_LEN 64

/* xbox d-pads should map to buttons, as is required for DDR pads
@@ -1924,6 +1921,6 @@ static struct usb_driver xpad_driver = {

module_usb_driver(xpad_driver);

MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("Marko Friedemann <mfr@bmx-chemnitz.de>");
MODULE_DESCRIPTION("X-Box pad driver");
MODULE_LICENSE("GPL");
+2 −6
Original line number Diff line number Diff line
@@ -17,10 +17,6 @@
#include <linux/module.h>
#include <linux/usb/input.h>

#define DRIVER_VERSION	"v0.1"
#define DRIVER_AUTHOR	"Michael Downey <downey@zymeta.com>"
#define DRIVER_DESC	"Driver for the USB Keyspan remote control."

/* Parameters that can be passed to the driver. */
static int debug;
module_param(debug, int, 0444);
@@ -589,6 +585,6 @@ static struct usb_driver keyspan_driver =
module_usb_driver(keyspan_driver);

MODULE_DEVICE_TABLE(usb, keyspan_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("Michael Downey <downey@zymeta.com>");
MODULE_DESCRIPTION("Driver for the USB Keyspan remote control.");
MODULE_LICENSE("GPL");
+2 −4
Original line number Diff line number Diff line
@@ -56,8 +56,6 @@
#include "yealink.h"

#define DRIVER_VERSION "yld-20051230"
#define DRIVER_AUTHOR "Henk Vergonet"
#define DRIVER_DESC "Yealink phone driver"

#define YEALINK_POLLING_FREQUENCY	10	/* in [Hz] */

@@ -1006,6 +1004,6 @@ module_usb_driver(yealink_driver);

MODULE_DEVICE_TABLE (usb, usb_table);

MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("Henk Vergonet");
MODULE_DESCRIPTION("Yealink phone driver");
MODULE_LICENSE("GPL");
+2 −9
Original line number Diff line number Diff line
@@ -30,15 +30,8 @@
#include <linux/module.h>
#include <linux/usb/input.h>

/*
 * Version Information
 */
#define DRIVER_VERSION "v3.2"
#define DRIVER_DESC    "USB Acecad Flair tablet driver"
#define DRIVER_AUTHOR  "Edouard TISSERANT <edouard.tisserant@wanadoo.fr>"

MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("Edouard TISSERANT <edouard.tisserant@wanadoo.fr>");
MODULE_DESCRIPTION("USB Acecad Flair tablet driver");
MODULE_LICENSE("GPL");

#define USB_VENDOR_ID_ACECAD	0x0460
+2 −9
Original line number Diff line number Diff line
@@ -78,13 +78,6 @@
#include <linux/uaccess.h>
#include <asm/unaligned.h>

/*
 * Version Information
 */
#define DRIVER_VERSION "v2.3 (May 2, 2007)"
#define DRIVER_AUTHOR  "Bryan W. Headley/Chris Atenasio/Cedric Brun/Rene van Paassen"
#define DRIVER_DESC    "Aiptek HyperPen USB Tablet Driver (Linux 2.6.x)"

/*
 * Aiptek status packet:
 *
@@ -1941,8 +1934,8 @@ static struct usb_driver aiptek_driver = {

module_usb_driver(aiptek_driver);

MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("Bryan W. Headley/Chris Atenasio/Cedric Brun/Rene van Paassen");
MODULE_DESCRIPTION("Aiptek HyperPen USB Tablet Driver");
MODULE_LICENSE("GPL");

module_param(programmableDelay, int, 0);
Loading