diff options
Diffstat (limited to 'drivers/media/rc')
-rw-r--r-- | drivers/media/rc/ati_remote.c | 33 | ||||
-rw-r--r-- | drivers/media/rc/ene_ir.c | 2 | ||||
-rw-r--r-- | drivers/media/rc/ene_ir.h | 2 | ||||
-rw-r--r-- | drivers/media/rc/imon.c | 21 | ||||
-rw-r--r-- | drivers/media/rc/lirc_dev.c | 2 | ||||
-rw-r--r-- | drivers/media/rc/mceusb.c | 24 | ||||
-rw-r--r-- | drivers/media/rc/rc-main.c | 2 | ||||
-rw-r--r-- | drivers/media/rc/redrat3.c | 20 | ||||
-rw-r--r-- | drivers/media/rc/streamzap.c | 32 | ||||
-rw-r--r-- | drivers/media/rc/winbond-cir.c | 6 |
10 files changed, 16 insertions, 128 deletions
diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c index 01bb8daf4b09..baf907b3ce76 100644 --- a/drivers/media/rc/ati_remote.c +++ b/drivers/media/rc/ati_remote.c @@ -899,38 +899,7 @@ static void ati_remote_disconnect(struct usb_interface *interface) kfree(ati_remote); } -/* - * ati_remote_init - */ -static int __init ati_remote_init(void) -{ - int result; - - result = usb_register(&ati_remote_driver); - if (result) - printk(KERN_ERR KBUILD_MODNAME - ": usb_register error #%d\n", result); - else - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" - DRIVER_DESC "\n"); - - return result; -} - -/* - * ati_remote_exit - */ -static void __exit ati_remote_exit(void) -{ - usb_deregister(&ati_remote_driver); -} - -/* - * module specification - */ - -module_init(ati_remote_init); -module_exit(ati_remote_exit); +module_usb_driver(ati_remote_driver); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c index cf10ecf5acec..860c112e0fd2 100644 --- a/drivers/media/rc/ene_ir.c +++ b/drivers/media/rc/ene_ir.c @@ -324,7 +324,7 @@ static int ene_rx_get_sample_reg(struct ene_device *dev) return dev->extra_buf2_address + r_pointer; } - dbg("attempt to read beyong ring bufer end"); + dbg("attempt to read beyond ring buffer end"); return 0; } diff --git a/drivers/media/rc/ene_ir.h b/drivers/media/rc/ene_ir.h index fd108d90f750..6f978e85db8c 100644 --- a/drivers/media/rc/ene_ir.h +++ b/drivers/media/rc/ene_ir.h @@ -227,7 +227,7 @@ struct ene_device { /* TX buffer */ unsigned *tx_buffer; /* input samples buffer*/ - int tx_pos; /* position in that bufer */ + int tx_pos; /* position in that buffer */ int tx_len; /* current len of tx buffer */ int tx_done; /* done transmitting */ /* one more sample pending*/ diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 6ed96465137a..3aeb29a7ce11 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c @@ -2458,23 +2458,4 @@ static int imon_resume(struct usb_interface *intf) return rc; } -static int __init imon_init(void) -{ - int rc; - - rc = usb_register(&imon_driver); - if (rc) { - pr_err("usb register failed(%d)\n", rc); - rc = -ENODEV; - } - - return rc; -} - -static void __exit imon_exit(void) -{ - usb_deregister(&imon_driver); -} - -module_init(imon_init); -module_exit(imon_exit); +module_usb_driver(imon_driver); diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 27997a9ceb0d..ca12d3289bfe 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -38,7 +38,7 @@ #include <media/lirc.h> #include <media/lirc_dev.h> -static int debug; +static bool debug; #define IRCTL_DEV_NAME "BaseRemoteCtl" #define NOPLUG -1 diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 60d3c1e09712..21105bf9594d 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -156,9 +156,9 @@ /* module parameters */ #ifdef CONFIG_USB_DEBUG -static int debug = 1; +static bool debug = 1; #else -static int debug; +static bool debug; #endif #define mce_dbg(dev, fmt, ...) \ @@ -1448,25 +1448,7 @@ static struct usb_driver mceusb_dev_driver = { .id_table = mceusb_dev_table }; -static int __init mceusb_dev_init(void) -{ - int ret; - - ret = usb_register(&mceusb_dev_driver); - if (ret < 0) - printk(KERN_ERR DRIVER_NAME - ": usb register failed, result = %d\n", ret); - - return ret; -} - -static void __exit mceusb_dev_exit(void) -{ - usb_deregister(&mceusb_dev_driver); -} - -module_init(mceusb_dev_init); -module_exit(mceusb_dev_exit); +module_usb_driver(mceusb_dev_driver); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR(DRIVER_AUTHOR); diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 0ea55ea2b71d..f6a930b70c69 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -715,7 +715,7 @@ static void ir_close(struct input_dev *idev) } /* class for /sys/class/rc */ -static char *ir_devnode(struct device *dev, mode_t *mode) +static char *ir_devnode(struct device *dev, umode_t *mode) { return kasprintf(GFP_KERNEL, "rc/%s", dev_name(dev)); } diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 9bff23cb0a5b..ad95c67a4dba 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c @@ -1284,25 +1284,7 @@ static struct usb_driver redrat3_dev_driver = { .id_table = redrat3_dev_table }; -static int __init redrat3_dev_init(void) -{ - int ret; - - ret = usb_register(&redrat3_dev_driver); - if (ret < 0) - pr_err(DRIVER_NAME - ": usb register failed, result = %d\n", ret); - - return ret; -} - -static void __exit redrat3_dev_exit(void) -{ - usb_deregister(&redrat3_dev_driver); -} - -module_init(redrat3_dev_init); -module_exit(redrat3_dev_exit); +module_usb_driver(redrat3_dev_driver); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR(DRIVER_AUTHOR); diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c index e435d94c0776..d6f4bfe09391 100644 --- a/drivers/media/rc/streamzap.c +++ b/drivers/media/rc/streamzap.c @@ -43,9 +43,9 @@ #define DRIVER_DESC "Streamzap Remote Control driver" #ifdef CONFIG_USB_DEBUG -static int debug = 1; +static bool debug = 1; #else -static int debug; +static bool debug; #endif #define USB_STREAMZAP_VENDOR_ID 0x0e9c @@ -523,33 +523,7 @@ static int streamzap_resume(struct usb_interface *intf) return 0; } -/** - * streamzap_init - */ -static int __init streamzap_init(void) -{ - int ret; - - /* register this driver with the USB subsystem */ - ret = usb_register(&streamzap_driver); - if (ret < 0) - printk(KERN_ERR DRIVER_NAME ": usb register failed, " - "result = %d\n", ret); - - return ret; -} - -/** - * streamzap_exit - */ -static void __exit streamzap_exit(void) -{ - usb_deregister(&streamzap_driver); -} - - -module_init(streamzap_init); -module_exit(streamzap_exit); +module_usb_driver(streamzap_driver); MODULE_AUTHOR("Jarod Wilson <jarod@wilsonet.com>"); MODULE_DESCRIPTION(DRIVER_DESC); diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index 13f54b51194a..b09c5fae489b 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -226,11 +226,11 @@ module_param(protocol, uint, 0444); MODULE_PARM_DESC(protocol, "IR protocol to use for the power-on command " "(0 = RC5, 1 = NEC, 2 = RC6A, default)"); -static int invert; /* default = 0 */ +static bool invert; /* default = 0 */ module_param(invert, bool, 0444); MODULE_PARM_DESC(invert, "Invert the signal from the IR receiver"); -static int txandrx; /* default = 0 */ +static bool txandrx; /* default = 0 */ module_param(txandrx, bool, 0444); MODULE_PARM_DESC(invert, "Allow simultaneous TX and RX"); @@ -1176,6 +1176,6 @@ wbcir_exit(void) module_init(wbcir_init); module_exit(wbcir_exit); -MODULE_AUTHOR("David Härdeman <david@hardeman.nu>"); +MODULE_AUTHOR("David Härdeman <david@hardeman.nu>"); MODULE_DESCRIPTION("Winbond SuperI/O Consumer IR Driver"); MODULE_LICENSE("GPL"); |