rpms/kernel/devel kernel.spec, 1.923, 1.924 linux-2.6-lirc.patch, 1.10, 1.11
Jarod Wilson
jwilson at fedoraproject.org
Wed Sep 3 19:20:19 UTC 2008
Author: jwilson
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28890
Modified Files:
kernel.spec linux-2.6-lirc.patch
Log Message:
* Wed Sep 03 2008 Jarod Wilson <jarod at redhat.com>
- Another series of checkpatch cleanups to lirc code,
courtesy of Janne Grunau. This stuff might actually
finally get upstream soon...
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.923
retrieving revision 1.924
diff -u -r1.923 -r1.924
--- kernel.spec 3 Sep 2008 00:41:31 -0000 1.923
+++ kernel.spec 3 Sep 2008 19:19:48 -0000 1.924
@@ -1753,6 +1753,11 @@
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Wed Sep 03 2008 Jarod Wilson <jarod at redhat.com>
+- Another series of checkpatch cleanups to lirc code,
+ courtesy of Janne Grunau. This stuff might actually
+ finally get upstream soon...
+
* Tue Sep 02 2008 Dave Jones <davej at redhat.com>
- 2.6.27-rc5-git3
linux-2.6-lirc.patch:
Index: linux-2.6-lirc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-lirc.patch,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- linux-2.6-lirc.patch 2 Sep 2008 22:27:18 -0000 1.10
+++ linux-2.6-lirc.patch 3 Sep 2008 19:19:48 -0000 1.11
@@ -4,30 +4,30 @@
drivers/input/lirc/Makefile | 24 +
drivers/input/lirc/commandir.c | 1009 +++++++++++++++++++++++
drivers/input/lirc/commandir.h | 41 +
- drivers/input/lirc/kcompat.h | 152 ++++
+ drivers/input/lirc/kcompat.h | 142 ++++
drivers/input/lirc/lirc.h | 102 +++
- drivers/input/lirc/lirc_atiusb.c | 1326 ++++++++++++++++++++++++++++++
+ drivers/input/lirc/lirc_atiusb.c | 1328 +++++++++++++++++++++++++++++++
drivers/input/lirc/lirc_bt829.c | 393 +++++++++
drivers/input/lirc/lirc_cmdir.c | 605 ++++++++++++++
drivers/input/lirc/lirc_cmdir.h | 27 +
drivers/input/lirc/lirc_dev.c | 827 +++++++++++++++++++
drivers/input/lirc/lirc_dev.h | 264 ++++++
- drivers/input/lirc/lirc_i2c.c | 668 +++++++++++++++
+ drivers/input/lirc/lirc_i2c.c | 668 ++++++++++++++++
drivers/input/lirc/lirc_igorplugusb.c | 624 +++++++++++++++
drivers/input/lirc/lirc_imon.c | 1248 +++++++++++++++++++++++++++++
drivers/input/lirc/lirc_it87.c | 1012 +++++++++++++++++++++++
drivers/input/lirc/lirc_it87.h | 116 +++
- drivers/input/lirc/lirc_mceusb.c | 890 ++++++++++++++++++++
+ drivers/input/lirc/lirc_mceusb.c | 890 +++++++++++++++++++++
drivers/input/lirc/lirc_mceusb2.c | 1060 ++++++++++++++++++++++++
drivers/input/lirc/lirc_parallel.c | 745 +++++++++++++++++
drivers/input/lirc/lirc_parallel.h | 26 +
- drivers/input/lirc/lirc_sasem.c | 971 ++++++++++++++++++++++
+ drivers/input/lirc/lirc_sasem.c | 972 ++++++++++++++++++++++
drivers/input/lirc/lirc_serial.c | 1348 +++++++++++++++++++++++++++++++
drivers/input/lirc/lirc_sir.c | 1323 ++++++++++++++++++++++++++++++
- drivers/input/lirc/lirc_streamzap.c | 810 +++++++++++++++++++
+ drivers/input/lirc/lirc_streamzap.c | 804 +++++++++++++++++++
drivers/input/lirc/lirc_ttusbir.c | 393 +++++++++
- drivers/input/lirc/lirc_zilog.c | 1425 +++++++++++++++++++++++++++++++++
- 29 files changed, 17561 insertions(+), 0 deletions(-)
+ drivers/input/lirc/lirc_zilog.c | 1416 +++++++++++++++++++++++++++++++++
+ 29 files changed, 17539 insertions(+), 0 deletions(-)
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index 5f9d860..747633c 100644
@@ -217,7 +217,7 @@
+obj-$(CONFIG_LIRC_TTUSBIR) += lirc_ttusbir.o
diff --git a/drivers/input/lirc/commandir.c b/drivers/input/lirc/commandir.c
new file mode 100644
-index 0000000..a49d996
+index 0000000..eb63980
--- /dev/null
+++ b/drivers/input/lirc/commandir.c
@@ -0,0 +1,1009 @@
@@ -257,7 +257,7 @@
+#define USB_CMDIR_MINOR_BASE 192
+
+/* table of devices that work with this driver */
-+static struct usb_device_id cmdir_table [] =
++static struct usb_device_id cmdir_table[] =
+{
+ { USB_DEVICE(USB_CMDIR_VENDOR_ID, USB_CMDIR_PRODUCT_ID) },
+ { } /* Terminating entry */
@@ -389,7 +389,7 @@
+ interface = usb_find_interface(&cmdir_driver, subminor);
+ if (!interface) {
+ err("%s - error, can't find device for minor %d",
-+ __FUNCTION__, subminor);
++ __func__, subminor);
+ retval = -ENODEV;
+ goto exit;
+ }
@@ -1187,7 +1187,7 @@
+ retval = usb_submit_urb(urb, GFP_KERNEL);
+ if (retval) {
+ err("%s - failed submitting write urb, error %d",
-+ __FUNCTION__, retval);
++ __func__, retval);
+ goto error;
+ }
+
@@ -1279,10 +1279,10 @@
+
diff --git a/drivers/input/lirc/kcompat.h b/drivers/input/lirc/kcompat.h
new file mode 100644
-index 0000000..da2e7eb
+index 0000000..db392a8
--- /dev/null
+++ b/drivers/input/lirc/kcompat.h
-@@ -0,0 +1,152 @@
+@@ -0,0 +1,142 @@
+/* $Id$ */
+
+#ifndef _KCOMPAT_H
@@ -1304,8 +1304,6 @@
+#define LIRC_DEVFS_PREFIX
+
+
-+typedef struct class lirc_class_t;
-+
+#define lirc_device_destroy device_destroy
+
+
@@ -1366,14 +1364,6 @@
+#define MODULE_DEVICE_TABLE(x, y)
+#endif
+
-+#include <linux/interrupt.h>
-+#ifndef IRQ_RETVAL
-+typedef void irqreturn_t;
-+#define IRQ_NONE
-+#define IRQ_HANDLED
-+#define IRQ_RETVAL(x)
-+#endif
-+
+#ifndef MOD_IN_USE
+#ifdef CONFIG_MODULE_UNLOAD
+#define MOD_IN_USE module_refcount(THIS_MODULE)
@@ -1437,7 +1427,7 @@
+#endif /* _KCOMPAT_H */
diff --git a/drivers/input/lirc/lirc.h b/drivers/input/lirc/lirc.h
new file mode 100644
-index 0000000..accd2cd
+index 0000000..73425c1
--- /dev/null
+++ b/drivers/input/lirc/lirc.h
@@ -0,0 +1,102 @@
@@ -1446,7 +1436,7 @@
+#ifndef _LINUX_LIRC_H
+#define _LINUX_LIRC_H
+
-+#include <asm/types.h>
++#include <linux/types.h>
+#include <linux/ioctl.h>
+
+#define PULSE_BIT 0x01000000
@@ -1545,10 +1535,10 @@
+#endif
diff --git a/drivers/input/lirc/lirc_atiusb.c b/drivers/input/lirc/lirc_atiusb.c
new file mode 100644
-index 0000000..9a78d13
+index 0000000..ff91277
--- /dev/null
+++ b/drivers/input/lirc/lirc_atiusb.c
-@@ -0,0 +1,1326 @@
+@@ -0,0 +1,1328 @@
+/* lirc_atiusb - USB remote support for LIRC
+ * (currently only supports X10 USB remotes)
+ * (supports ATI Remote Wonder and ATI Remote Wonder II, too)
@@ -1614,9 +1604,9 @@
+#define DRIVER_DESC "USB remote driver for LIRC"
+#define DRIVER_NAME "lirc_atiusb"
+
-+#define CODE_LENGTH code_length[ir->remote_type]
-+#define CODE_MIN_LENGTH code_min_length[ir->remote_type]
-+#define DECODE_LENGTH decode_length[ir->remote_type]
++#define CODE_LENGTH (code_length[ir->remote_type])
++#define CODE_MIN_LENGTH (code_min_length[ir->remote_type])
++#define DECODE_LENGTH (decode_length[ir->remote_type])
+
+#define RW2_MODENAV_KEYCODE 0x3F
+#define RW2_NULL_MODE 0xFF
@@ -1683,7 +1673,7 @@
+#define VENDOR_MS2 0x045e
+#define VENDOR_MS3 0xFFFF
+
-+static struct usb_device_id usb_remote_table [] = {
++static struct usb_device_id usb_remote_table[] = {
+ /* X10 USB Firecracker Interface */
+ { USB_DEVICE(VENDOR_ATI1, 0x0002) },
+
@@ -1987,7 +1977,8 @@
+ dprintk(DRIVER_NAME "[%d]: accept channel %d\n", ir->devnum, chan+1);
+
+ if (ir->remote_type == ATI1_COMPATIBLE) {
-+ for (i = len; i < CODE_LENGTH; i++) iep->buf[i] = 0;
++ for (i = len; i < CODE_LENGTH; i++)
++ iep->buf[i] = 0;
+ /* check for repeats */
+ if (memcmp(iep->old, iep->buf, len) == 0) {
+ if (iep->old_jiffies + repeat_jiffies > jiffies)
@@ -2090,7 +2081,8 @@
+ ir->devnum, len);
+ return -1;
+ }
-+ for (i = len; i < CODE_LENGTH; i++) iep->buf[i] = 0;
++ for (i = len; i < CODE_LENGTH; i++)
++ iep->buf[i] = 0;
+
+ mode = buf[0];
+
@@ -2765,7 +2757,7 @@
+ usb_set_intfdata(intf, NULL);
+
+ dprintk(DRIVER_NAME ": disconnecting remote %d:\n",
-+ (ir? ir->devnum: -1));
++ ir ? ir->devnum : -1);
+ if (!ir || !ir->p)
+ return;
+
@@ -2877,7 +2869,7 @@
+EXPORT_NO_SYMBOLS;
diff --git a/drivers/input/lirc/lirc_bt829.c b/drivers/input/lirc/lirc_bt829.c
new file mode 100644
-index 0000000..d9e65e7
+index 0000000..08ea957
--- /dev/null
+++ b/drivers/input/lirc/lirc_bt829.c
@@ -0,0 +1,393 @@
@@ -3206,11 +3198,11 @@
+ write_index(0x34, reg_val);
+
+ reg_val = read_index(0x31);
-+ if (new_bits & 1) {
++ if (new_bits & 1)
+ reg_val |= 0x1000000;
-+ } else {
++ else
+ reg_val &= 0xFEFFFFFF;
-+ }
++
+ reg_val |= 0x8000000;
+ write_index(0x31, reg_val);
+}
@@ -3227,17 +3219,17 @@
+
+ reg_val = read_index(0x34);
+ bits = 0;
-+ if (reg_val & 8) {
++ if (reg_val & 8)
+ bits |= 2;
-+ } else {
++ else
+ bits &= 0xFD;
-+ }
++
+ reg_val = read_index(0x31);
-+ if (reg_val & 0x1000000) {
++ if (reg_val & 0x1000000)
+ bits |= 1;
-+ } else {
++ else
+ bits &= 0xFE;
-+ }
++
+ return bits;
+}
+
@@ -3276,7 +3268,7 @@
+ */
diff --git a/drivers/input/lirc/lirc_cmdir.c b/drivers/input/lirc/lirc_cmdir.c
new file mode 100644
-index 0000000..6b906f1
+index 0000000..f131caa
--- /dev/null
+++ b/drivers/input/lirc/lirc_cmdir.c
@@ -0,0 +1,605 @@
@@ -3730,7 +3722,7 @@
+ safe_udelay(wait_this);
+#endif
+
-+ return(n);
++ return n;
+}
+
+
@@ -3920,7 +3912,7 @@
+#endif
diff --git a/drivers/input/lirc/lirc_dev.c b/drivers/input/lirc/lirc_dev.c
new file mode 100644
-index 0000000..93ac8de
+index 0000000..43c9ee9
--- /dev/null
+++ b/drivers/input/lirc/lirc_dev.c
@@ -0,0 +1,827 @@
@@ -4009,7 +4001,7 @@
+static struct file_operations fops;
+
+/* Only used for sysfs but defined to void otherwise */
-+static lirc_class_t *lirc_class;
++static struct class *lirc_class;
+
+/* helper function
+ * initializes the irctl structure
@@ -4076,7 +4068,7 @@
+ if (res == -ENODEV)
+ kthread_stop(ir->task);
+
-+ return (got_data ? SUCCESS : res);
++ return got_data ? SUCCESS : res;
+ }
+
+ return SUCCESS;
@@ -4753,7 +4745,7 @@
+ */
diff --git a/drivers/input/lirc/lirc_dev.h b/drivers/input/lirc/lirc_dev.h
new file mode 100644
-index 0000000..c3a0c0f
+index 0000000..16daf58
--- /dev/null
+++ b/drivers/input/lirc/lirc_dev.h
@@ -0,0 +1,264 @@
@@ -4829,7 +4821,7 @@
+}
+static inline int lirc_buffer_full(struct lirc_buffer *buf)
+{
-+ return (buf->fill >= buf->size);
++ return buf->fill >= buf->size;
+}
+static inline int lirc_buffer_empty(struct lirc_buffer *buf)
+{
@@ -4837,7 +4829,7 @@
+}
+static inline int lirc_buffer_available(struct lirc_buffer *buf)
+{
-+ return (buf->size - buf->fill);
++ return buf->size - buf->fill;
+}
+static inline void lirc_buffer_lock(struct lirc_buffer *buf,
+ unsigned long *flags)
@@ -5023,7 +5015,7 @@
+#endif
diff --git a/drivers/input/lirc/lirc_i2c.c b/drivers/input/lirc/lirc_i2c.c
new file mode 100644
-index 0000000..3d107f6
+index 0000000..b9d89af
--- /dev/null
+++ b/drivers/input/lirc/lirc_i2c.c
@@ -0,0 +1,668 @@
@@ -5122,7 +5114,7 @@
+ int c;
+
+ for (c = 0, i = 0; i < bits; i++)
-+ c |= (((data & (1<<i)) ? 1:0)) << (bits-1-i);
++ c |= ((data & (1<<i)) ? 1 : 0) << (bits-1-i);
+
+ return c;
+}
@@ -5697,7 +5689,7 @@
+ */
diff --git a/drivers/input/lirc/lirc_igorplugusb.c b/drivers/input/lirc/lirc_igorplugusb.c
new file mode 100644
-index 0000000..0c2ca5a
+index 0000000..978483b
--- /dev/null
+++ b/drivers/input/lirc/lirc_igorplugusb.c
@@ -0,0 +1,624 @@
@@ -6264,7 +6256,7 @@
+ unregister_from_lirc(ir);
+}
+
-+static struct usb_device_id usb_remote_id_table [] = {
++static struct usb_device_id usb_remote_id_table[] = {
+ /* Igor Plug USB (Atmel's Manufact. ID) */
+ { USB_DEVICE(0x03eb, 0x0002) },
+
@@ -6327,7 +6319,7 @@
+ */
diff --git a/drivers/input/lirc/lirc_imon.c b/drivers/input/lirc/lirc_imon.c
new file mode 100644
-index 0000000..776c742
+index 0000000..a2236dd
--- /dev/null
+++ b/drivers/input/lirc/lirc_imon.c
@@ -0,0 +1,1248 @@
@@ -6576,7 +6568,7 @@
+ kfree(context);
+
+ if (debug)
-+ info("%s: context deleted", __FUNCTION__);
++ info("%s: context deleted", __func__);
+}
+
+static inline void deregister_from_lirc(struct imon_context *context)
@@ -6587,7 +6579,7 @@
+ retval = lirc_unregister_plugin(minor);
+ if (retval)
+ err("%s: unable to deregister from lirc(%d)",
-+ __FUNCTION__, retval);
++ __func__, retval);
+ else
+ info("Deregistered iMON plugin(minor:%d)", minor);
+
@@ -6611,7 +6603,7 @@
+ interface = usb_find_interface(&imon_driver, subminor);
+ if (!interface) {
+ err("%s: could not find interface for minor %d",
-+ __FUNCTION__, subminor);
++ __func__, subminor);
+ retval = -ENODEV;
+ goto exit;
+ }
@@ -6619,7 +6611,7 @@
+
+ if (!context) {
+ err("%s: no context found for minor %d",
-+ __FUNCTION__, subminor);
++ __func__, subminor);
+ retval = -ENODEV;
+ goto exit;
+ }
@@ -6627,10 +6619,10 @@
+ LOCK_CONTEXT;
+
+ if (!context->vfd_supported) {
-+ err("%s: VFD not supported by device", __FUNCTION__);
++ err("%s: VFD not supported by device", __func__);
+ retval = -ENODEV;
+ } else if (context->vfd_isopen) {
-+ err("%s: VFD port is already open", __FUNCTION__);
++ err("%s: VFD port is already open", __func__);
+ retval = -EBUSY;
+ } else {
+ MOD_INC_USE_COUNT;
@@ -6658,17 +6650,17 @@
+ context = (struct imon_context *) file->private_data;
+
+ if (!context) {
-+ err("%s: no context for device", __FUNCTION__);
++ err("%s: no context for device", __func__);
+ return -ENODEV;
+ }
+
+ LOCK_CONTEXT;
+
+ if (!context->vfd_supported) {
-+ err("%s: VFD not supported by device", __FUNCTION__);
++ err("%s: VFD not supported by device", __func__);
+ retval = -ENODEV;
+ } else if (!context->vfd_isopen) {
-+ err("%s: VFD is not open", __FUNCTION__);
++ err("%s: VFD is not open", __func__);
+ retval = -EIO;
+ } else {
+ context->vfd_isopen = FALSE;
@@ -6713,7 +6705,7 @@
+ retval = usb_submit_urb(context->tx_urb, GFP_KERNEL);
+ if (retval != SUCCESS) {
+ atomic_set(&(context->tx.busy), 0);
-+ err("%s: error submitting urb(%d)", __FUNCTION__, retval);
++ err("%s: error submitting urb(%d)", __func__, retval);
+ } else {
+ /* Wait for tranmission to complete(or abort) */
+ UNLOCK_CONTEXT;
@@ -6722,7 +6714,7 @@
+
+ retval = context->tx.status;
+ if (retval != SUCCESS)
-+ err("%s: packet tx failed(%d)", __FUNCTION__, retval);
++ err("%s: packet tx failed(%d)", __func__, retval);
+ }
+
+ return retval;
@@ -6744,14 +6736,14 @@
+ 0x00, 0x00, 0x00, 0x20 };
+
+ if (!context) {
-+ err("%s: no context for device", __FUNCTION__);
++ err("%s: no context for device", __func__);
+ return -ENODEV;
+ }
+
+ LOCK_CONTEXT;
+
+ if (!context->dev_present) {
-+ err("%s: no iMON device present", __FUNCTION__);
++ err("%s: no iMON device present", __func__);
+ retval = -ENODEV;
+ goto exit;
+ }
@@ -6853,20 +6845,20 @@
+
+ context = (struct imon_context *) file->private_data;
+ if (!context) {
-+ err("%s: no context for device", __FUNCTION__);
++ err("%s: no context for device", __func__);
+ return -ENODEV;
+ }
+
+ LOCK_CONTEXT;
+
+ if (!context->dev_present) {
-+ err("%s: no iMON device present", __FUNCTION__);
++ err("%s: no iMON device present", __func__);
+ retval = -ENODEV;
+ goto exit;
+ }
+
+ if (n_bytes <= 0 || n_bytes > 32) {
-+ err("%s: invalid payload size", __FUNCTION__);
++ err("%s: invalid payload size", __func__);
+ retval = -EINVAL;
+ goto exit;
+ }
@@ -6893,7 +6885,7 @@
+ retval = send_packet(context);
+ if (retval != SUCCESS) {
+ err("%s: send packet failed for packet #%d",
-+ __FUNCTION__, seq/2);
++ __func__, seq/2);
+ goto exit;
+ } else {
+ seq += 2;
@@ -6909,13 +6901,13 @@
+ retval = send_packet(context);
+ if (retval != SUCCESS)
+ err("%s: send packet failed for packet #%d",
-+ __FUNCTION__, seq/2);
++ __func__, seq/2);
+ }
+
+exit:
+ UNLOCK_CONTEXT;
+
-+ return(retval == SUCCESS) ? n_bytes : retval;
++ return (retval == SUCCESS) ? n_bytes : retval;
+}
+
+/**
@@ -6939,21 +6931,21 @@
+
+ context = (struct imon_context *) file->private_data;
+ if (!context) {
-+ err("%s: no context for device", __FUNCTION__);
++ err("%s: no context for device", __func__);
+ return -ENODEV;
+ }
+
+ LOCK_CONTEXT;
+
+ if (!context->dev_present) {
-+ err("%s: no iMON device present", __FUNCTION__);
++ err("%s: no iMON device present", __func__);
+ retval = -ENODEV;
+ goto exit;
+ }
+
+ if (n_bytes != 8) {
+ err("%s: invalid payload size: %d (expecting 8)",
-+ __FUNCTION__, (int) n_bytes);
++ __func__, (int) n_bytes);
+ retval = -EINVAL;
+ goto exit;
+ }
@@ -6965,10 +6957,10 @@
+
+ retval = send_packet(context);
+ if (retval != SUCCESS) {
-+ err("%s: send packet failed!", __FUNCTION__);
++ err("%s: send packet failed!", __func__);
+ goto exit;
+ } else if (debug) {
-+ info("%s: write %d bytes to LCD", __FUNCTION__, (int) n_bytes);
++ info("%s: write %d bytes to LCD", __func__, (int) n_bytes);
+ }
+exit:
+ UNLOCK_CONTEXT;
@@ -7013,7 +7005,7 @@
+ LOCK_CONTEXT;
+
+ if (context->ir_isopen) {
-+ err("%s: IR port is already open", __FUNCTION__);
++ err("%s: IR port is already open", __func__);
+ retval = -EBUSY;
+ goto exit;
+ }
@@ -7033,7 +7025,7 @@
+
+ if (retval)
+ err("%s: usb_submit_urb failed for ir_open(%d)",
-+ __FUNCTION__, retval);
++ __func__, retval);
+ else {
+ MOD_INC_USE_COUNT;
+ context->ir_isopen = TRUE;
@@ -7056,7 +7048,7 @@
+
+ context = (struct imon_context *)data;
+ if (!context) {
-+ err("%s: no context for device", __FUNCTION__);
++ err("%s: no context for device", __func__);
+ return;
+ }
+
@@ -7129,7 +7121,7 @@
+
+ if (len != 8) {
+ warn("%s: invalid incoming packet size(%d)",
-+ __FUNCTION__, len);
++ __func__, len);
+ return;
+ }
+
@@ -7141,7 +7133,7 @@
+ buf[5] == 0xFF && /* iMON 2.4G */
+ ((buf[6] == 0x4E && buf[7] == 0xDF) || /* LT */
+ (buf[6] == 0x5E && buf[7] == 0xDF))) { /* DT */
-+ warn("%s: remote associated refid=%02X", __FUNCTION__, buf[1]);
++ warn("%s: remote associated refid=%02X", __func__, buf[1]);
+ context->ir_isassociating = FALSE;
+ }
+
@@ -7238,8 +7230,8 @@
+ if (context->ir_isopen)
+ incoming_packet(context, urb);
+ break;
-+ default :
-+ warn("%s: status(%d): ignored", __FUNCTION__, urb->status);
++ default:
++ warn("%s: status(%d): ignored", __func__, urb->status);
+ break;
+ }
+
@@ -7274,7 +7266,7 @@
+ struct imon_context *context = NULL;
+ int i;
+
-+ info("%s: found IMON device", __FUNCTION__);
++ info("%s: found IMON device", __func__);
+
+ /*
+ * If it's the LCD, as opposed to the VFD, we just need to replace
@@ -7311,7 +7303,7 @@
+ rx_endpoint = ep;
+ ir_ep_found = TRUE;
+ if (debug)
-+ info("%s: found IR endpoint", __FUNCTION__);
++ info("%s: found IR endpoint", __func__);
+
+ } else if (!vfd_ep_found &&
+ ep_dir == USB_DIR_OUT &&
@@ -7319,13 +7311,13 @@
+ tx_endpoint = ep;
+ vfd_ep_found = TRUE;
+ if (debug)
-+ info("%s: found VFD endpoint", __FUNCTION__);
++ info("%s: found VFD endpoint", __func__);
+ }
+ }
+
+ /* Input endpoint is mandatory */
+ if (!ir_ep_found) {
-+ err("%s: no valid input(IR) endpoint found.", __FUNCTION__);
++ err("%s: no valid input(IR) endpoint found.", __func__);
+ retval = -ENODEV;
+ goto exit;
+ } else {
@@ -7371,30 +7363,30 @@
+
+ context = kmalloc(sizeof(struct imon_context), GFP_KERNEL);
+ if (!context) {
-+ err("%s: kmalloc failed for context", __FUNCTION__);
++ err("%s: kmalloc failed for context", __func__);
+ alloc_status = 1;
+ goto alloc_status_switch;
+ }
+ plugin = kmalloc(sizeof(struct lirc_plugin), GFP_KERNEL);
+ if (!plugin) {
-+ err("%s: kmalloc failed for lirc_plugin", __FUNCTION__);
++ err("%s: kmalloc failed for lirc_plugin", __func__);
+ alloc_status = 2;
+ goto alloc_status_switch;
+ }
+ rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL);
+ if (!rbuf) {
-+ err("%s: kmalloc failed for lirc_buffer", __FUNCTION__);
++ err("%s: kmalloc failed for lirc_buffer", __func__);
+ alloc_status = 3;
+ goto alloc_status_switch;
+ }
+ if (lirc_buffer_init(rbuf, BUF_CHUNK_SIZE, BUF_SIZE)) {
-+ err("%s: lirc_buffer_init failed", __FUNCTION__);
++ err("%s: lirc_buffer_init failed", __func__);
+ alloc_status = 4;
+ goto alloc_status_switch;
+ }
+ rx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!rx_urb) {
-+ err("%s: usb_alloc_urb failed for IR urb", __FUNCTION__);
++ err("%s: usb_alloc_urb failed for IR urb", __func__);
+ alloc_status = 5;
+ goto alloc_status_switch;
+ }
@@ -7402,7 +7394,7 @@
+ tx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!tx_urb) {
+ err("%s: usb_alloc_urb failed for VFD urb",
-+ __FUNCTION__);
++ __func__);
+ alloc_status = 6;
+ goto alloc_status_switch;
+ }
@@ -7434,13 +7426,13 @@
+
+ lirc_minor = lirc_register_plugin(plugin);
+ if (lirc_minor < 0) {
-+ err("%s: lirc_register_plugin failed", __FUNCTION__);
++ err("%s: lirc_register_plugin failed", __func__);
+ alloc_status = 7;
+ UNLOCK_CONTEXT;
+ goto alloc_status_switch;
+ } else
+ info("%s: Registered iMON plugin(minor:%d)",
-+ __FUNCTION__, lirc_minor);
++ __func__, lirc_minor);
+
+ /* Needed while unregistering! */
+ plugin->minor = lirc_minor;
@@ -7465,7 +7457,7 @@
+ &imon_attribute_group);
+ if (err)
+ err("%s: Could not create sysfs entries(%d)",
-+ __FUNCTION__, err);
++ __func__, err);
+ }
+
+ if (vfd_ep_found) {
@@ -7474,12 +7466,12 @@
+ if (usb_register_dev(interface, &imon_class)) {
+ /* Not a fatal error, so ignore */
+ info("%s: could not get a minor number for VFD",
-+ __FUNCTION__);
++ __func__);
+ }
+ }
+
+ info("%s: iMON device on usb<%d:%d> initialized",
-+ __FUNCTION__, dev->bus->busnum, dev->devnum);
++ __func__, dev->bus->busnum, dev->devnum);
+
+ UNLOCK_CONTEXT;
+
@@ -7521,7 +7513,7 @@
+ context = usb_get_intfdata(interface);
+ LOCK_CONTEXT;
+
-+ info("%s: iMON device disconnected", __FUNCTION__);
++ info("%s: iMON device disconnected", __func__);
+
+ /* sysfs_remove_group is safe to call even if sysfs_create_group
+ * hasn't been called */
@@ -7563,7 +7555,7 @@
+
+ rc = usb_register(&imon_driver);
+ if (rc) {
-+ err("%s: usb register failed(%d)", __FUNCTION__, rc);
++ err("%s: usb register failed(%d)", __func__, rc);
+ return -ENODEV;
+ }
+ return SUCCESS;
@@ -7581,7 +7573,7 @@
+
diff --git a/drivers/input/lirc/lirc_it87.c b/drivers/input/lirc/lirc_it87.c
new file mode 100644
-index 0000000..003c249
+index 0000000..d6d0397
--- /dev/null
+++ b/drivers/input/lirc/lirc_it87.c
@@ -0,0 +1,1012 @@
@@ -8207,7 +8199,7 @@
+ static unsigned char byte_out;
+ unsigned long hw_flags;
+
-+ dprintk("%s: len=%ld, sb=%d\n", __FUNCTION__, len, send_byte);
++ dprintk("%s: len=%ld, sb=%d\n", __func__, len, send_byte);
+
+ time_left = (long)len - (long)count * (long)stime;
+ count += ((2 * time_left) / stime);
@@ -8375,7 +8367,7 @@
+ unsigned long hw_flags;
+ int retval = 0;
+
-+ unsigned char init_bytes[4] = {IT87_INIT};
++ unsigned char init_bytes[4] = IT87_INIT;
+ unsigned char it87_chipid = 0;
+ unsigned char ldn = 0;
+ unsigned int it87_io = 0;
@@ -8484,7 +8476,7 @@
+static void drop_port(void)
+{
+/*
-+ unsigned char init_bytes[4] = {IT87_INIT};
++ unsigned char init_bytes[4] = IT87_INIT;
+
+ / * Enter MB PnP Mode * /
+ outb(init_bytes[0], IT87_ADRPORT);
@@ -8599,7 +8591,7 @@
+ */
diff --git a/drivers/input/lirc/lirc_it87.h b/drivers/input/lirc/lirc_it87.h
new file mode 100644
-index 0000000..2bbbfa3
+index 0000000..a997204
--- /dev/null
+++ b/drivers/input/lirc/lirc_it87.h
@@ -0,0 +1,116 @@
@@ -8617,13 +8609,13 @@
+/* IT8712/05 Ports: */
+#define IT87_ADRPORT 0x2e
+#define IT87_DATAPORT 0x2f
-+#define IT87_INIT 0x87, 0x01, 0x55, 0x55
++#define IT87_INIT {0x87, 0x01, 0x55, 0x55}
+
+/* alternate Ports: */
+/*
+#define IT87_ADRPORT 0x4e
+#define IT87_DATAPORT 0x4f
-+#define IT87_INIT 0x87, 0x01, 0x55, 0xaa
++#define IT87_INIT {0x87, 0x01, 0x55, 0xaa}
+ */
+
+/* IT8712/05 Registers */
@@ -8721,7 +8713,7 @@
+/********************************* ITE IT87xx ************************/
diff --git a/drivers/input/lirc/lirc_mceusb.c b/drivers/input/lirc/lirc_mceusb.c
new file mode 100644
-index 0000000..aed3f6f
+index 0000000..5b9c8b0
--- /dev/null
+++ b/drivers/input/lirc/lirc_mceusb.c
@@ -0,0 +1,890 @@
@@ -9081,7 +9073,7 @@
+ int partial, this_read = 0;
+ int bulkidx = 0;
+ int bytes_left_in_packet = 0;
-+ signed char *signedp = (signed char*)dev->bulk_in_buffer;
++ signed char *signedp = (signed char *)dev->bulk_in_buffer;
+
+ if (words_to_read == 0)
+ return dev->lirccnt;
@@ -9617,7 +9609,7 @@
+EXPORT_NO_SYMBOLS;
diff --git a/drivers/input/lirc/lirc_mceusb2.c b/drivers/input/lirc/lirc_mceusb2.c
new file mode 100644
-index 0000000..2f78da8
+index 0000000..47b2b78
--- /dev/null
+++ b/drivers/input/lirc/lirc_mceusb2.c
@@ -0,0 +1,1060 @@
@@ -9748,7 +9740,7 @@
+#define VENDOR_FINTEK 0x1934
+#define VENDOR_PINNACLE 0x2304
+
-+static struct usb_device_id usb_remote_table [] = {
++static struct usb_device_id usb_remote_table[] = {
+ /* Philips eHome Infrared Transceiver */
+ { USB_DEVICE(VENDOR_PHILIPS, 0x0815) },
+ /* Philips Infrared Transceiver - HP branded */
@@ -10183,12 +10175,12 @@
+ return -EFAULT;
+
+ if (n % sizeof(lirc_t))
-+ return(-EINVAL);
++ return -EINVAL;
+ count = n / sizeof(lirc_t);
+
+ /* Check if command is within limits */
+ if (count > LIRCBUF_SIZE || count%2 == 0)
-+ return(-EINVAL);
++ return -EINVAL;
+ if (copy_from_user(wbuf, buf, n))
+ return -EFAULT;
+
@@ -10683,7 +10675,7 @@
+EXPORT_NO_SYMBOLS;
diff --git a/drivers/input/lirc/lirc_parallel.c b/drivers/input/lirc/lirc_parallel.c
new file mode 100644
-index 0000000..dec0f94
+index 0000000..b46d109
--- /dev/null
+++ b/drivers/input/lirc/lirc_parallel.c
@@ -0,0 +1,745 @@
@@ -10810,11 +10802,11 @@
+{
+ switch (offset) {
+ case LIRC_LP_BASE:
-+ return (parport_read_data(pport));
++ return parport_read_data(pport);
+ case LIRC_LP_STATUS:
-+ return (parport_read_status(pport));
++ return parport_read_status(pport);
+ case LIRC_LP_CONTROL:
-+ return (parport_read_control(pport));
++ return parport_read_control(pport);
+ }
+ return 0; /* make compiler happy */
+}
@@ -10837,12 +10829,12 @@
+
+static inline unsigned int lirc_get_timer(void)
+{
-+ return (in(LIRC_PORT_TIMER)&LIRC_PORT_TIMER_BIT);
++ return in(LIRC_PORT_TIMER) & LIRC_PORT_TIMER_BIT;
+}
+
+static inline unsigned int lirc_get_signal(void)
+{
-+ return (in(LIRC_PORT_SIGNAL)&LIRC_PORT_SIGNAL_BIT);
++ return in(LIRC_PORT_SIGNAL) & LIRC_PORT_SIGNAL_BIT;
+}
+
+static inline void lirc_on(void)
@@ -11008,8 +11000,8 @@
+ printk(KERN_NOTICE "%s: timeout\n", LIRC_DRIVER_NAME);
+ break;
+ }
-+ }
-+ while (lirc_get_signal());
++ } while (lirc_get_signal());
++
+ if (signal != 0) {
+ /* ajust value to usecs */
+ unsigned long long helper;
@@ -11082,7 +11074,7 @@
+ }
+ remove_wait_queue(&lirc_wait, &wait);
+ set_current_state(TASK_RUNNING);
-+ return (count ? count : result);
++ return count ? count : result;
+}
+
+static ssize_t lirc_write(struct file *filep, const char *buf, size_t n,
@@ -11095,15 +11087,15 @@
+ lirc_t counttimer;
+
+ if (!is_claimed)
-+ return(-EBUSY);
++ return -EBUSY;
+
+ if (n % sizeof(lirc_t))
-+ return(-EINVAL);
++ return -EINVAL;
+
+ count = n / sizeof(lirc_t);
+
+ if (count > WBUF_SIZE || count % 2 == 0)
-+ return(-EINVAL);
++ return -EINVAL;
+
+ if (copy_from_user(wbuf, buf, n))
+ return -EFAULT;
@@ -11113,7 +11105,7 @@
+ /* try again if device is ready */
+ timer = init_lirc_timer();
+ if (timer == 0)
-+ return(-EIO);
++ return -EIO;
+ }
+
+ /* ajust values from usecs */
@@ -11172,7 +11164,7 @@
+{
+ poll_wait(file, &lirc_wait, wait);
+ if (rptr != wptr)
-+ return (POLLIN|POLLRDNORM);
++ return POLLIN | POLLRDNORM;
+ return 0;
+}
+
@@ -11466,10 +11458,10 @@
+#endif
diff --git a/drivers/input/lirc/lirc_sasem.c b/drivers/input/lirc/lirc_sasem.c
new file mode 100644
-index 0000000..0d3e55f
+index 0000000..2c0a278
--- /dev/null
+++ b/drivers/input/lirc/lirc_sasem.c
-@@ -0,0 +1,971 @@
+@@ -0,0 +1,972 @@
+/* $Id$ */
+
+/* lirc_sasem.c - USB remote support for LIRC
@@ -11551,7 +11543,7 @@
+#define MOD_VERSION "0.5"
+
+#define VFD_MINOR_BASE 144 /* Same as LCD */
-+#define DEVFS_MODE S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
++#define DEVFS_MODE (S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
+#define DEVFS_NAME LIRC_DEVFS_PREFIX "lcd%d"
+
+#define BUF_CHUNK_SIZE 8
@@ -11611,11 +11603,11 @@
+ struct usb_endpoint_descriptor *tx_endpoint;
+ struct urb *rx_urb;
+ struct urb *tx_urb;
-+ unsigned char usb_rx_buf [8];
-+ unsigned char usb_tx_buf [8];
++ unsigned char usb_rx_buf[8];
++ unsigned char usb_tx_buf[8];
+
+ struct tx_t {
-+ unsigned char data_buf [32]; /* user data buffer */
++ unsigned char data_buf[32]; /* user data buffer */
+ struct completion finished; /* wait for write to finish */
+ atomic_t busy; /* write in progress */
+ int status; /* status of tx completion */
@@ -11641,7 +11633,7 @@
+};
+
+/* USB Device ID for Sasem USB Control Board */
-+static struct usb_device_id sasem_usb_id_table [] = {
++static struct usb_device_id sasem_usb_id_table[] = {
+ { USB_DEVICE(0x11ba, 0x0101) }, /* Sasem */
+ {}
+};
@@ -11688,7 +11680,7 @@
+ kfree(context);
+
+ if (debug)
-+ info("%s: context deleted", __FUNCTION__);
++ info("%s: context deleted", __func__);
+}
+
+static inline void deregister_from_lirc(struct sasem_context *context)
@@ -11699,7 +11691,7 @@
+ retval = lirc_unregister_plugin(minor);
+ if (retval)
+ err("%s: unable to deregister from lirc (%d)",
-+ __FUNCTION__, retval);
++ __func__, retval);
+ else
+ info("Deregistered Sasem plugin (minor:%d)", minor);
+
@@ -11723,7 +11715,7 @@
+ interface = usb_find_interface(&sasem_driver, subminor);
+ if (!interface) {
+ err("%s: could not find interface for minor %d",
-+ __FUNCTION__, subminor);
++ __func__, subminor);
+ retval = -ENODEV;
+ goto exit;
+ }
@@ -11731,7 +11723,7 @@
+
+ if (!context) {
+ err("%s: no context found for minor %d",
-+ __FUNCTION__, subminor);
++ __func__, subminor);
+ retval = -ENODEV;
+ goto exit;
+ }
@@ -11739,7 +11731,7 @@
+ LOCK_CONTEXT;
+
+ if (context->vfd_isopen) {
-+ err("%s: VFD port is already open", __FUNCTION__);
++ err("%s: VFD port is already open", __func__);
+ retval = -EBUSY;
+ } else {
+ MOD_INC_USE_COUNT;
@@ -11767,7 +11759,7 @@
+ context = (struct sasem_context *) file->private_data;
+
+ if (!context) {
-+ err("%s: no context for device", __FUNCTION__);
++ err("%s: no context for device", __func__);
+ return -ENODEV;
+ }
+
@@ -11803,14 +11795,14 @@
+ context = (struct sasem_context *) file->private_data;
+
+ if (!context) {
-+ err("%s: no context for device", __FUNCTION__);
++ err("%s: no context for device", __func__);
+ return -ENODEV;
+ }
+
+ LOCK_CONTEXT;
+
+ if (!context->vfd_isopen) {
-+ err("%s: VFD is not open", __FUNCTION__);
++ err("%s: VFD is not open", __func__);
+ retval = -EIO;
+ } else {
+ context->vfd_isopen = FALSE;
@@ -11856,7 +11848,7 @@
+ retval = usb_submit_urb(context->tx_urb, GFP_KERNEL);
+ if (retval != SUCCESS) {
+ atomic_set(&(context->tx.busy), 0);
-+ err("%s: error submitting urb (%d)", __FUNCTION__, retval);
++ err("%s: error submitting urb (%d)", __func__, retval);
+ } else {
+ /* Wait for tranmission to complete (or abort) */
+ UNLOCK_CONTEXT;
@@ -11865,7 +11857,7 @@
+
+ retval = context->tx.status;
+ if (retval != SUCCESS)
-+ err("%s: packet tx failed (%d)", __FUNCTION__, retval);
++ err("%s: packet tx failed (%d)", __func__, retval);
+ }
+
+ return retval;
@@ -11885,20 +11877,20 @@
+
+ context = (struct sasem_context *) file->private_data;
+ if (!context) {
-+ err("%s: no context for device", __FUNCTION__);
++ err("%s: no context for device", __func__);
+ return -ENODEV;
+ }
+
+ LOCK_CONTEXT;
+
+ if (!context->dev_present) {
-+ err("%s: no Sasem device present", __FUNCTION__);
++ err("%s: no Sasem device present", __func__);
+ retval = -ENODEV;
+ goto exit;
+ }
+
+ if (n_bytes <= 0 || n_bytes > 32) {
-+ err("%s: invalid payload size", __FUNCTION__);
++ err("%s: invalid payload size", __func__);
+ retval = -EINVAL;
+ goto exit;
+ }
@@ -11907,7 +11899,7 @@
+
+ /* Pad with spaces */
+ for (i = n_bytes; i < 32; ++i)
-+ context->tx.data_buf [i] = ' ';
++ context->tx.data_buf[i] = ' ';
+
+ /* Nine 8 byte packets to be sent */
+ /* NOTE: "\x07\x01\0\0\0\0\0\0" or "\x0c\0\0\0\0\0\0\0"
@@ -11917,7 +11909,8 @@
+ case 0:
+ memcpy(context->usb_tx_buf, "\x07\0\0\0\0\0\0\0", 8);
+ context->usb_tx_buf[1] = (context->vfd_contrast) ?
-+ (0x2B - (context->vfd_contrast - 1) / 250):0x2B;
++ (0x2B - (context->vfd_contrast - 1) / 250)
++ : 0x2B;
+ break;
+ case 1:
+ memcpy(context->usb_tx_buf, "\x09\x01\0\0\0\0\0\0", 8);
@@ -11951,7 +11944,7 @@
+ if (retval != SUCCESS) {
+
+ err("%s: send packet failed for packet #%d",
-+ __FUNCTION__, i);
++ __func__, i);
+ goto exit;
+ }
+ }
@@ -12000,7 +11993,7 @@
+ LOCK_CONTEXT;
+
+ if (context->ir_isopen) {
-+ err("%s: IR port is already open", __FUNCTION__);
++ err("%s: IR port is already open", __func__);
+ retval = -EBUSY;
+ goto exit;
+ }
@@ -12015,7 +12008,7 @@
+
+ if (retval)
+ err("%s: usb_submit_urb failed for ir_open (%d)",
-+ __FUNCTION__, retval);
++ __func__, retval);
+ else {
+ MOD_INC_USE_COUNT;
+ context->ir_isopen = TRUE;
@@ -12038,7 +12031,7 @@
+
+ context = (struct sasem_context *)data;
+ if (!context) {
-+ err("%s: no context for device", __FUNCTION__);
++ err("%s: no context for device", __func__);
+ return;
+ }
+
@@ -12084,14 +12077,14 @@
+
+ if (len != 8) {
+ warn("%s: invalid incoming packet size (%d)",
-+ __FUNCTION__, len);
++ __func__, len);
+ return;
+ }
+
+#ifdef DEBUG
+ int i;
+ for (i = 0; i < 8; ++i)
-+ printk(KERN_INFO "%02x ", buf [i]);
++ printk(KERN_INFO "%02x ", buf[i]);
+ printk(KERN_INFO "\n");
+#endif
+
@@ -12155,7 +12148,7 @@
+
+ default:
+ warn("%s: status (%d): ignored",
-+ __FUNCTION__, urb->status);
++ __func__, urb->status);
+ break;
+ }
+
@@ -12188,7 +12181,7 @@
+ struct sasem_context *context = NULL;
+ int i;
+
-+ info("%s: found Sasem device", __FUNCTION__);
++ info("%s: found Sasem device", __func__);
+
+
+ dev = usb_get_dev(interface_to_usbdev(interface));
@@ -12220,7 +12213,7 @@
+ rx_endpoint = ep;
+ ir_ep_found = TRUE;
+ if (debug)
-+ info("%s: found IR endpoint", __FUNCTION__);
++ info("%s: found IR endpoint", __func__);
+
+ } else if (!vfd_ep_found &&
+ ep_dir == USB_DIR_OUT &&
@@ -12229,21 +12222,21 @@
+ tx_endpoint = ep;
+ vfd_ep_found = TRUE;
+ if (debug)
-+ info("%s: found VFD endpoint", __FUNCTION__);
++ info("%s: found VFD endpoint", __func__);
+ }
+ }
+
+ /* Input endpoint is mandatory */
+ if (!ir_ep_found) {
+
-+ err("%s: no valid input (IR) endpoint found.", __FUNCTION__);
++ err("%s: no valid input (IR) endpoint found.", __func__);
+ retval = -ENODEV;
+ goto exit;
+ }
+
+ /* Warning if no VFD endpoint */
+ if (!vfd_ep_found)
-+ info("%s: no valid output (VFD) endpoint found.", __FUNCTION__);
++ info("%s: no valid output (VFD) endpoint found.", __func__);
+
+
+ /* Allocate memory */
@@ -12251,30 +12244,30 @@
+
+ context = kmalloc(sizeof(struct sasem_context), GFP_KERNEL);
+ if (!context) {
-+ err("%s: kmalloc failed for context", __FUNCTION__);
++ err("%s: kmalloc failed for context", __func__);
+ alloc_status = 1;
+ goto alloc_status_switch;
+ }
+ plugin = kmalloc(sizeof(struct lirc_plugin), GFP_KERNEL);
+ if (!plugin) {
-+ err("%s: kmalloc failed for lirc_plugin", __FUNCTION__);
++ err("%s: kmalloc failed for lirc_plugin", __func__);
+ alloc_status = 2;
+ goto alloc_status_switch;
+ }
+ rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL);
+ if (!rbuf) {
-+ err("%s: kmalloc failed for lirc_buffer", __FUNCTION__);
++ err("%s: kmalloc failed for lirc_buffer", __func__);
+ alloc_status = 3;
+ goto alloc_status_switch;
+ }
+ if (lirc_buffer_init(rbuf, BUF_CHUNK_SIZE, BUF_SIZE)) {
-+ err("%s: lirc_buffer_init failed", __FUNCTION__);
++ err("%s: lirc_buffer_init failed", __func__);
+ alloc_status = 4;
+ goto alloc_status_switch;
+ }
+ rx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!rx_urb) {
-+ err("%s: usb_alloc_urb failed for IR urb", __FUNCTION__);
++ err("%s: usb_alloc_urb failed for IR urb", __func__);
+ alloc_status = 5;
+ goto alloc_status_switch;
+ }
@@ -12282,7 +12275,7 @@
+ tx_urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!tx_urb) {
+ err("%s: usb_alloc_urb failed for VFD urb",
-+ __FUNCTION__);
++ __func__);
+ alloc_status = 6;
+ goto alloc_status_switch;
+ }
@@ -12310,12 +12303,12 @@
+
+ lirc_minor = lirc_register_plugin(plugin);
+ if (lirc_minor < 0) {
-+ err("%s: lirc_register_plugin failed", __FUNCTION__);
++ err("%s: lirc_register_plugin failed", __func__);
+ alloc_status = 7;
+ UNLOCK_CONTEXT;
+ } else
+ info("%s: Registered Sasem plugin (minor:%d)",
-+ __FUNCTION__, lirc_minor);
++ __func__, lirc_minor);
+
+alloc_status_switch:
+
@@ -12363,11 +12356,11 @@
+ if (usb_register_dev(interface, &sasem_class))
+ /* Not a fatal error, so ignore */
+ info("%s: could not get a minor number for VFD",
-+ __FUNCTION__);
++ __func__);
+ }
+
+ info("%s: Sasem device on usb<%d:%d> initialized",
-+ __FUNCTION__, dev->bus->busnum, dev->devnum);
++ __func__, dev->bus->busnum, dev->devnum);
+
+ UNLOCK_CONTEXT;
+exit:
@@ -12387,7 +12380,7 @@
+ context = usb_get_intfdata(interface);
+ LOCK_CONTEXT;
+
-+ info("%s: Sasem device disconnected", __FUNCTION__);
++ info("%s: Sasem device disconnected", __func__);
+
+ usb_set_intfdata(interface, NULL);
+ context->dev_present = FALSE;
@@ -12425,7 +12418,7 @@
+
+ rc = usb_register(&sasem_driver);
+ if (rc < 0) {
-+ err("%s: usb register failed (%d)", __FUNCTION__, rc);
++ err("%s: usb register failed (%d)", __func__, rc);
+ return -ENODEV;
+ }
+ return SUCCESS;
@@ -12443,7 +12436,7 @@
+
diff --git a/drivers/input/lirc/lirc_serial.c b/drivers/input/lirc/lirc_serial.c
new file mode 100644
-index 0000000..1a28a5c
+index 0000000..b7cd5e6
--- /dev/null
+++ b/drivers/input/lirc/lirc_serial.c
@@ -0,0 +1,1348 @@
@@ -13004,9 +12997,9 @@
+ }
+
+ if (i == 0)
-+ return ((-rawbits)*10000/1152);
++ return (-rawbits)*10000/1152;
+ else
-+ return ((3-i)*3*10000/1152+(-rawbits)*10000/1152);
++ return (3-i)*3*10000/1152 + (-rawbits)*10000/1152;
+}
+
+#ifdef USE_RDTSC
@@ -13032,9 +13025,9 @@
+ flag = 1;
+ while ((now-start) < length) {
+ /* Delay till flip time */
-+ do
++ do {
+ rdtscl(now);
-+ while ((now-start) < target);
++ } while ((now-start) < target);
+
+ /* flip */
+ if (flag) {
@@ -13047,7 +13040,7 @@
+ flag = !flag;
+ }
+ rdtscl(now);
-+ return (((now-start)-length)/conv_us_to_clocks);
++ return ((now-start)-length) / conv_us_to_clocks;
+}
+#else /* ! USE_RDTSC */
+/* Version using udelay() */
@@ -13080,7 +13073,7 @@
+ actual += (d<<8)+LIRC_SERIAL_TRANSMITTER_LATENCY;
+ flag = !flag;
+ }
-+ return ((actual-length)>>8);
++ return (actual-length)>>8;
+}
+#endif /* USE_RDTSC */
+
@@ -13216,7 +13209,7 @@
+
+ /* calculate time since last interrupt in
+ microseconds */
-+ dcd = (status & hardware[type].signal_pin) ? 1:0;
++ dcd = (status & hardware[type].signal_pin) ? 1 : 0;
+
+ if (dcd == last_dcd) {
+ printk(KERN_WARNING LIRC_DRIVER_NAME
@@ -13252,7 +13245,7 @@
+ tv.tv_usec, lasttv.tv_usec);
+ /* detecting pulse while this
+ MUST be a space! */
-+ sense = sense ? 0:1;
++ sense = sense ? 0 : 1;
+ }
+ } else
+ data = (lirc_t) (deltv*1000000 +
@@ -13372,7 +13365,7 @@
+ active high/low */
+ nlow = 0;
+ nhigh = 0;
-+ for (i = 0; i < 9; i ++) {
++ for (i = 0; i < 9; i++) {
+ if (sinp(UART_MSR) & hardware[type].signal_pin)
+ nlow++;
+ else
@@ -13381,10 +13374,10 @@
+ }
+ sense = (nlow >= nhigh ? 1 : 0);
+ printk(KERN_INFO LIRC_DRIVER_NAME ": auto-detected active "
-+ "%s receiver\n", sense ? "low":"high");
++ "%s receiver\n", sense ? "low" : "high");
+ } else
+ printk(KERN_INFO LIRC_DRIVER_NAME ": Manually using active "
-+ "%s receiver\n", sense ? "low":"high");
++ "%s receiver\n", sense ? "low" : "high");
+
+ return 0;
+}
@@ -13402,7 +13395,7 @@
+ do_gettimeofday(&lasttv);
+
+ result = request_irq(irq, irq_handler,
-+ IRQF_DISABLED | (share_irq ? IRQF_SHARED:0),
++ IRQF_DISABLED | (share_irq ? IRQF_SHARED : 0),
+ LIRC_DRIVER_NAME, (void *)&hardware);
+
+ switch (result) {
@@ -13797,7 +13790,7 @@
+#endif /* MODULE */
diff --git a/drivers/input/lirc/lirc_sir.c b/drivers/input/lirc/lirc_sir.c
new file mode 100644
-index 0000000..2553316
+index 0000000..fb98b10
--- /dev/null
+++ b/drivers/input/lirc/lirc_sir.c
@@ -0,0 +1,1323 @@
@@ -13873,10 +13866,10 @@
+#include <linux/delay.h>
+#include <linux/poll.h>
+#include <asm/system.h>
-+#include <asm/uaccess.h>
-+#include <asm/io.h>
++#include <linux/uaccess.h>
++#include <linux/io.h>
+#include <asm/irq.h>
-+#include <asm/fcntl.h>
++#include <linux/fcntl.h>
+#ifdef LIRC_ON_SA1100
+#include <asm/hardware.h>
+#ifdef CONFIG_SA1100_COLLIE
@@ -14132,7 +14125,7 @@
+ }
+ remove_wait_queue(&lirc_read_queue, &wait);
+ set_current_state(TASK_RUNNING);
-+ return (n ? n : retval);
++ return n ? n : retval;
+}
+static ssize_t lirc_write(struct file *file, const char *buf, size_t n,
+ loff_t *pos)
@@ -14525,9 +14518,9 @@
+ SIR_TIMEOUT;
+ add_timer(&timerlist);
+ }
-+ }
-+ while ((lsr = inb(io + UART_LSR))
-+ & UART_LSR_DR); /* data ready */
++
++ lsr = inb(io + UART_LSR);
++ } while (lsr & UART_LSR_DR); /* data ready */
+ spin_unlock_irqrestore(&timer_lock, flags);
+ break;
+ default:
@@ -15126,10 +15119,10 @@
+#endif /* MODULE */
diff --git a/drivers/input/lirc/lirc_streamzap.c b/drivers/input/lirc/lirc_streamzap.c
new file mode 100644
-index 0000000..147f3a9
+index 0000000..d73314f
--- /dev/null
+++ b/drivers/input/lirc/lirc_streamzap.c
-@@ -0,0 +1,810 @@
+@@ -0,0 +1,804 @@
+/* $Id$ */
+
+/*
@@ -15202,7 +15195,7 @@
+/*
+ * table of devices that work with this driver
+ */
-+static struct usb_device_id streamzap_table [] = {
++static struct usb_device_id streamzap_table[] = {
+ { USB_DEVICE(USB_STREAMZAP_VENDOR_ID, USB_STREAMZAP_PRODUCT_ID) },
+ { } /* Terminating entry */
+};
@@ -15332,7 +15325,7 @@
+ unsigned long flags;
+ /* deliver data every 10 ms */
+ static unsigned long timer_inc =
-+ (10000/(1000000/HZ)) == 0 ? 1:(10000/(1000000/HZ));
++ (10000/(1000000/HZ)) == 0 ? 1 : (10000/(1000000/HZ));
+ struct usb_streamzap *sz = (struct usb_streamzap *) arg;
+ lirc_t data;
+
@@ -15590,7 +15583,7 @@
+ iface_host = interface->cur_altsetting;
+
+ if (iface_host->desc.bNumEndpoints != 1) {
-+ err("%s: Unexpected desc.bNumEndpoints (%d)", __FUNCTION__,
++ err("%s: Unexpected desc.bNumEndpoints (%d)", __func__,
+ iface_host->desc.bNumEndpoints);
+ retval = -ENODEV;
+ goto error;
@@ -15600,7 +15593,7 @@
+ if ((sz->endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
+ != USB_DIR_IN) {
+ err("%s: endpoint doesn't match input device 02%02x",
-+ __FUNCTION__, sz->endpoint->bEndpointAddress);
++ __func__, sz->endpoint->bEndpointAddress);
+ retval = -ENODEV;
+ goto error;
+ }
@@ -15608,13 +15601,13 @@
+ if ((sz->endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+ != USB_ENDPOINT_XFER_INT) {
+ err("%s: endpoint attributes don't match xfer 02%02x",
-+ __FUNCTION__, sz->endpoint->bmAttributes);
++ __func__, sz->endpoint->bmAttributes);
+ retval = -ENODEV;
+ goto error;
+ }
+
+ if (sz->endpoint->wMaxPacketSize == 0) {
-+ err("%s: endpoint message size==0? ", __FUNCTION__);
++ err("%s: endpoint message size==0? ", __func__);
+ retval = -ENODEV;
+ goto error;
+ }
@@ -15720,14 +15713,8 @@
+ err("Out of memory");
+
+ if (sz) {
-+
-+ if (sz->urb_in)
-+ usb_free_urb(sz->urb_in);
-+
-+ if (sz->buf_in) {
-+ usb_buffer_free(udev, sz->buf_in_len,
-+ sz->buf_in, sz->dma_in);
-+ }
++ usb_free_urb(sz->urb_in);
++ usb_buffer_free(udev, sz->buf_in_len, sz->buf_in, sz->dma_in);
+ kfree(sz);
+ }
+
@@ -15739,7 +15726,7 @@
+ struct usb_streamzap *sz = data;
+
+ if (!sz) {
-+ dprintk("%s called with no context", -1, __FUNCTION__);
++ dprintk("%s called with no context", -1, __func__);
+ return -EINVAL;
+ }
+ dprintk("set use inc", sz->plugin.minor);
@@ -15772,7 +15759,7 @@
+ struct usb_streamzap *sz = data;
+
+ if (!sz) {
-+ dprintk("%s called with no context", -1, __FUNCTION__);
++ dprintk("%s called with no context", -1, __func__);
+ return;
+ }
+ dprintk("set use dec", sz->plugin.minor);
@@ -15799,7 +15786,7 @@
+ case LIRC_GET_REC_RESOLUTION:
+ result = put_user(STREAMZAP_RESOLUTION, (unsigned long *) arg);
+ if (result)
-+ return(result);
++ return result;
+ break;
+ default:
+ return -ENOIOCTLCMD;
@@ -16341,10 +16328,10 @@
+module_exit(ttusbir_exit_module);
diff --git a/drivers/input/lirc/lirc_zilog.c b/drivers/input/lirc/lirc_zilog.c
new file mode 100644
-index 0000000..e3c96b6
+index 0000000..a9d738e
--- /dev/null
+++ b/drivers/input/lirc/lirc_zilog.c
-@@ -0,0 +1,1425 @@
+@@ -0,0 +1,1416 @@
+/* $Id$ */
+
+/*
@@ -16435,7 +16422,7 @@
+ struct completion *t_notify;
+ struct completion *t_notify2;
+ int shutdown;
-+ int tpid;
++ struct task_struct *task;
+
+ /* RX read data */
+ unsigned char b[3];
@@ -16455,7 +16442,7 @@
+#define TX_BLOCK_SIZE 99
+
+/* Hauppuage IR transmitter data */
-+typedef struct TX_DATA_s {
++struct tx_data_struct {
+ /* Boot block */
+ unsigned char *boot_data;
+
@@ -16473,15 +16460,16 @@
+
+ /* Global fixed data template */
+ int fixed[TX_BLOCK_SIZE];
-+} TX_DATA;
++};
+
-+static TX_DATA *tx_data;
++static struct tx_data_struct *tx_data;
+struct semaphore tx_data_lock;
+
+/* ----------------------------------------------------------------------- */
+
+#define DEVICE_NAME "lirc_zilog"
-+#define zilog_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args)
++#define zilog_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, \
++ ## args)
+#define zilog_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args)
+
+/* ----------------------------------------------------------------------- */
@@ -16594,11 +16582,6 @@
+{
+ struct IR *ir = arg;
+
-+ /* This thread doesn't need any user-level access,
-+ * so get rid of all our resources
-+ */
-+ daemonize("lirc_zilog");
-+
+ if (ir->t_notify != NULL)
+ complete(ir->t_notify);
+
@@ -16631,10 +16614,10 @@
+ }
+ } while (!ir->shutdown);
+
-+ if (ir->t_notify2 != NULL) {
++ if (ir->t_notify2 != NULL)
+ wait_for_completion(ir->t_notify2);
+
-+ ir->tpid = -1;
++ ir->task = NULL;
+ if (ir->t_notify != NULL)
+ complete(ir->t_notify);
+
@@ -16675,7 +16658,7 @@
+}
+
+/* safe read of a uint32 (always network byte order) */
-+static __inline int read_uint32(unsigned char **data,
++static inline int read_uint32(unsigned char **data,
+ unsigned char *endp, unsigned int *val)
+{
+ if (*data + 4 > endp)
@@ -16687,7 +16670,7 @@
+}
+
+/* safe read of a uint8 */
-+static __inline int read_uint8(unsigned char **data,
++static inline int read_uint8(unsigned char **data,
+ unsigned char *endp, unsigned char *val)
+{
+ if (*data + 1 > endp)
@@ -16697,7 +16680,7 @@
+}
+
+/* safe skipping of N bytes */
-+static __inline int skip(unsigned char **data,
++static inline int skip(unsigned char **data,
+ unsigned char *endp, unsigned int distance)
+{
+ if (*data + distance > endp)
@@ -16924,7 +16907,7 @@
+ zilog_notify("firmware of size %d loaded\n", fw_entry->size);
+
+ /* Parse the file */
-+ tx_data = vmalloc(sizeof(TX_DATA));
++ tx_data = vmalloc(sizeof(*tx_data));
+ if (tx_data == NULL) {
+ zilog_error("out of memory\n");
+ release_firmware(fw_entry);
@@ -17521,7 +17504,7 @@
+ init_MUTEX(&ir->buf_sem);
+ ir->open = 0;
+ ir->devs = 0;
-+ ir->tpid = 0;
++ ir->task = NULL;
+ ir->need_boot = 1;
+ ir->shutdown = 0;
+ ir->t_notify = ir->t_notify2 = NULL;
@@ -17546,11 +17529,11 @@
+
+ /* try to fire up polling thread */
+ ir->t_notify = &tn;
-+ ir->tpid = kernel_thread(lirc_thread, ir, 0);
-+ if (ir->tpid < 0) {
++ ir->task = kthread_run(lirc_thread, ir, "lirc_zilog");
++ ret = PTR_ERR(ir->task);
++ if (ret <= 0) {
+ zilog_error("lirc_register_plugin: cannot run "
+ "poll thread\n");
-+ ret = -ECHILD;
+ goto err;
+ }
+ wait_for_completion(&tn);
@@ -17619,16 +17602,11 @@
+ DECLARE_COMPLETION(tn2);
+
+ /* end up polling thread */
-+ if (ir->tpid >= 0) {
++ if (ir->task && !IS_ERR(ir->task)) {
+ ir->t_notify = &tn;
+ ir->t_notify2 = &tn2;
+ ir->shutdown = 1;
-+ {
-+ struct task_struct *p;
-+
-+ p = find_task_by_pid(ir->tpid);
-+ wake_up_process(p);
-+ }
++ wake_up_process(ir->task);
+ complete(&tn2);
+ wait_for_completion(&tn);
+ ir->t_notify = NULL;
More information about the fedora-extras-commits
mailing list