aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmeya Palande <2ameya@gmail.com>2009-12-11 19:10:12 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 16:42:29 -0800
commit8d4ecdda9870d0999ebb8ed59293f420b5d244fd (patch)
treebc814b42f8c9658646eccbfb10537013566a2fc2
parent2c6211606dafaeec51e471cd6aa277fbf45fe80c (diff)
Staging: mimio: checkpatch.pl line > 80 chars fixes
Rearrange code and cleanup the information to get rid of checkpatch.pl line > 80 chars complaints. Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/mimio/mimio.c96
1 files changed, 51 insertions, 45 deletions
diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c
index 5bdbe02eb79..2cfef4a0851 100644
--- a/drivers/staging/mimio/mimio.c
+++ b/drivers/staging/mimio/mimio.c
@@ -1,47 +1,46 @@
/*
* Hardware event => input event mapping:
*
+ * BTN_TOOL_PEN 0x140 black
+ * BTN_TOOL_RUBBER 0x141 blue
+ * BTN_TOOL_BRUSH 0x142 green
+ * BTN_TOOL_PENCIL 0x143 red
+ * BTN_TOOL_AIRBRUSH 0x144 eraser
+ * BTN_TOOL_FINGER 0x145 small eraser
+ * BTN_TOOL_MOUSE 0x146 mimio interactive
+ * BTN_TOOL_LENS 0x147 mimio interactive but1
+ * LOCALBTN_TOOL_EXTRA1 0x14a mimio interactive but2 == BTN_TOUCH
+ * LOCALBTN_TOOL_EXTRA2 0x14b mimio extra pens (orange, brown, yellow,
+ * purple) == BTN_STYLUS
+ * LOCALBTN_TOOL_EXTRA3 0x14c unused == BTN_STYLUS2
+ * BTN_TOOL_DOUBLETAP 0x14d unused
+ * BTN_TOOL_TRIPLETAP 0x14e unused
*
- *
- input.h:#define BTN_TOOL_PEN 0x140 black
- input.h:#define BTN_TOOL_RUBBER 0x141 blue
- input.h:#define BTN_TOOL_BRUSH 0x142 green
- input.h:#define BTN_TOOL_PENCIL 0x143 red
- input.h:#define BTN_TOOL_AIRBRUSH 0x144 eraser
- input.h:#define BTN_TOOL_FINGER 0x145 small eraser
- input.h:#define BTN_TOOL_MOUSE 0x146 mimio interactive
- input.h:#define BTN_TOOL_LENS 0x147 mimio interactive but1
- input.h:#define LOCALBTN_TOOL_EXTRA1 0x14a mimio interactive but2 == BTN_TOUCH
- input.h:#define LOCALBTN_TOOL_EXTRA2 0x14b mimio extra pens (orange, brown, yellow, purple) == BTN_STYLUS
- input.h:#define LOCALBTN_TOOL_EXTRA3 0x14c unused == BTN_STYLUS2
- input.h:#define BTN_TOOL_DOUBLETAP 0x14d unused
- input.h:#define BTN_TOOL_TRIPLETAP 0x14e unused
- *
- * MIMIO_EV_PENDOWN(MIMIO_PEN_K) => EV_KEY BIT(BTN_TOOL_PEN)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_B) => EV_KEY BIT(BTN_TOOL_RUBBER)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_G) => EV_KEY BIT(BTN_TOOL_BRUSH)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_R) => EV_KEY BIT(BTN_TOOL_PENCIL)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_E) => EV_KEY BIT(BTN_TOOL_AIRBRUSH)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_ES) => EV_KEY BIT(BTN_TOOL_FINGER)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_I) => EV_KEY BIT(BTN_TOOL_MOUSE)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_IL) => EV_KEY BIT(BTN_TOOL_LENS)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_IR) => EV_KEY BIT(BTN_TOOL_DOUBLETAP)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_EX) => EV_KEY BIT(BTN_TOOL_TRIPLETAP)
- * MIMIO_EV_PENDATA => EV_ABS BIT(ABS_X), BIT(ABS_Y)
- * MIMIO_EV_MEMRESET => EV_KEY BIT(BTN_0)
- * MIMIO_EV_ACC(ACC_NEWPAGE) => EV_KEY BIT(BTN_1)
- * MIMIO_EV_ACC(ACC_TAGPAGE) => EV_KEY BIT(BTN_2)
- * MIMIO_EV_ACC(ACC_PRINTPAGE) => EV_KEY BIT(BTN_3)
- * MIMIO_EV_ACC(ACC_MAXIMIZE) => EV_KEY BIT(BTN_4)
- * MIMIO_EV_ACC(ACC_FINDCTLPNL) => EV_KEY BIT(BTN_5)
- *
+ * MIMIO_EV_PENDOWN(MIMIO_PEN_K) => EV_KEY BIT(BTN_TOOL_PEN)
+ * MIMIO_EV_PENDOWN(MIMIO_PEN_B) => EV_KEY BIT(BTN_TOOL_RUBBER)
+ * MIMIO_EV_PENDOWN(MIMIO_PEN_G) => EV_KEY BIT(BTN_TOOL_BRUSH)
+ * MIMIO_EV_PENDOWN(MIMIO_PEN_R) => EV_KEY BIT(BTN_TOOL_PENCIL)
+ * MIMIO_EV_PENDOWN(MIMIO_PEN_E) => EV_KEY BIT(BTN_TOOL_AIRBRUSH)
+ * MIMIO_EV_PENDOWN(MIMIO_PEN_ES) => EV_KEY BIT(BTN_TOOL_FINGER)
+ * MIMIO_EV_PENDOWN(MIMIO_PEN_I) => EV_KEY BIT(BTN_TOOL_MOUSE)
+ * MIMIO_EV_PENDOWN(MIMIO_PEN_IL) => EV_KEY BIT(BTN_TOOL_LENS)
+ * MIMIO_EV_PENDOWN(MIMIO_PEN_IR) => EV_KEY BIT(BTN_TOOL_DOUBLETAP)
+ * MIMIO_EV_PENDOWN(MIMIO_PEN_EX) => EV_KEY BIT(BTN_TOOL_TRIPLETAP)
+ * MIMIO_EV_PENDATA => EV_ABS BIT(ABS_X), BIT(ABS_Y)
+ * MIMIO_EV_MEMRESET => EV_KEY BIT(BTN_0)
+ * MIMIO_EV_ACC(ACC_NEWPAGE) => EV_KEY BIT(BTN_1)
+ * MIMIO_EV_ACC(ACC_TAGPAGE) => EV_KEY BIT(BTN_2)
+ * MIMIO_EV_ACC(ACC_PRINTPAGE) => EV_KEY BIT(BTN_3)
+ * MIMIO_EV_ACC(ACC_MAXIMIZE) => EV_KEY BIT(BTN_4)
+ * MIMIO_EV_ACC(ACC_FINDCTLPNL) => EV_KEY BIT(BTN_5)
*
* open issues:
- * - cold-load of data captured when mimio in standalone mode not yet
- * supported; need to snoop Win32 box to see datastream for this.
- * - mimio mouse not yet supported; need to snoop Win32 box to see the
- * datastream for this.
+ * - cold-load of data captured when mimio in standalone mode not yet
+ * supported; need to snoop Win32 box to see datastream for this.
+ * - mimio mouse not yet supported; need to snoop Win32 box to see the
+ * datastream for this.
*/
+
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
@@ -357,14 +356,21 @@ static int mimio_open(struct input_dev *idev)
rslt = usb_submit_urb(mimio->in.urb, GFP_KERNEL);
if (rslt) {
dev_err(&idev->dev, "usb_submit_urb failure "
- "(res = %d: %s). Not greeting.\n",
- rslt,
- (!urb ? "urb is NULL" :
- (urb->hcpriv ? "urb->hcpriv is non-NULL" :
- (!urb->complete ? "urb is not complete" :
- (urb->number_of_packets <= 0 ? "urb has no packets" :
- (urb->interval <= 0 ? "urb interval too small" :
- "urb interval too large or some other error"))))));
+ "(res = %d: ", rslt);
+ if (!urb)
+ dev_err(&idev->dev, "urb is NULL");
+ else if (urb->hcpriv)
+ dev_err(&idev->dev, "urb->hcpriv is non-NULL");
+ else if (!urb->complete)
+ dev_err(&idev->dev, "urb is not complete");
+ else if (urb->number_of_packets <= 0)
+ dev_err(&idev->dev, "urb has no packets");
+ else if (urb->interval <= 0)
+ dev_err(&idev->dev, "urb interval too small");
+ else
+ dev_err(&idev->dev, "urb interval too large " \
+ "or some other error");
+ dev_err(&idev->dev, "). Not greeting.\n");
rslt = -EIO;
goto exit;
}