Commit 8d4ecdda authored by Ameya Palande's avatar Ameya Palande Committed by Greg Kroah-Hartman

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: default avatarAmeya Palande <2ameya@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2c621160
/* /*
* Hardware event => input event mapping: * Hardware event => input event mapping:
* *
* * BTN_TOOL_PEN 0x140 black
* * BTN_TOOL_RUBBER 0x141 blue
input.h:#define BTN_TOOL_PEN 0x140 black * BTN_TOOL_BRUSH 0x142 green
input.h:#define BTN_TOOL_RUBBER 0x141 blue * BTN_TOOL_PENCIL 0x143 red
input.h:#define BTN_TOOL_BRUSH 0x142 green * BTN_TOOL_AIRBRUSH 0x144 eraser
input.h:#define BTN_TOOL_PENCIL 0x143 red * BTN_TOOL_FINGER 0x145 small eraser
input.h:#define BTN_TOOL_AIRBRUSH 0x144 eraser * BTN_TOOL_MOUSE 0x146 mimio interactive
input.h:#define BTN_TOOL_FINGER 0x145 small eraser * BTN_TOOL_LENS 0x147 mimio interactive but1
input.h:#define BTN_TOOL_MOUSE 0x146 mimio interactive * LOCALBTN_TOOL_EXTRA1 0x14a mimio interactive but2 == BTN_TOUCH
input.h:#define BTN_TOOL_LENS 0x147 mimio interactive but1 * LOCALBTN_TOOL_EXTRA2 0x14b mimio extra pens (orange, brown, yellow,
input.h:#define LOCALBTN_TOOL_EXTRA1 0x14a mimio interactive but2 == BTN_TOUCH * purple) == BTN_STYLUS
input.h:#define LOCALBTN_TOOL_EXTRA2 0x14b mimio extra pens (orange, brown, yellow, purple) == BTN_STYLUS * LOCALBTN_TOOL_EXTRA3 0x14c unused == BTN_STYLUS2
input.h:#define LOCALBTN_TOOL_EXTRA3 0x14c unused == BTN_STYLUS2 * BTN_TOOL_DOUBLETAP 0x14d unused
input.h:#define BTN_TOOL_DOUBLETAP 0x14d unused * BTN_TOOL_TRIPLETAP 0x14e 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_K) => EV_KEY BIT(BTN_TOOL_PEN)
* MIMIO_EV_PENDOWN(MIMIO_PEN_B) => EV_KEY BIT(BTN_TOOL_RUBBER) * MIMIO_EV_PENDOWN(MIMIO_PEN_B) => EV_KEY BIT(BTN_TOOL_RUBBER)
...@@ -35,13 +34,13 @@ ...@@ -35,13 +34,13 @@
* MIMIO_EV_ACC(ACC_MAXIMIZE) => EV_KEY BIT(BTN_4) * MIMIO_EV_ACC(ACC_MAXIMIZE) => EV_KEY BIT(BTN_4)
* MIMIO_EV_ACC(ACC_FINDCTLPNL) => EV_KEY BIT(BTN_5) * MIMIO_EV_ACC(ACC_FINDCTLPNL) => EV_KEY BIT(BTN_5)
* *
*
* open issues: * open issues:
* - cold-load of data captured when mimio in standalone mode not yet * - cold-load of data captured when mimio in standalone mode not yet
* supported; need to snoop Win32 box to see datastream for this. * supported; need to snoop Win32 box to see datastream for this.
* - mimio mouse not yet supported; need to snoop Win32 box to see the * - mimio mouse not yet supported; need to snoop Win32 box to see the
* datastream for this. * datastream for this.
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -357,14 +356,21 @@ static int mimio_open(struct input_dev *idev) ...@@ -357,14 +356,21 @@ static int mimio_open(struct input_dev *idev)
rslt = usb_submit_urb(mimio->in.urb, GFP_KERNEL); rslt = usb_submit_urb(mimio->in.urb, GFP_KERNEL);
if (rslt) { if (rslt) {
dev_err(&idev->dev, "usb_submit_urb failure " dev_err(&idev->dev, "usb_submit_urb failure "
"(res = %d: %s). Not greeting.\n", "(res = %d: ", rslt);
rslt, if (!urb)
(!urb ? "urb is NULL" : dev_err(&idev->dev, "urb is NULL");
(urb->hcpriv ? "urb->hcpriv is non-NULL" : else if (urb->hcpriv)
(!urb->complete ? "urb is not complete" : dev_err(&idev->dev, "urb->hcpriv is non-NULL");
(urb->number_of_packets <= 0 ? "urb has no packets" : else if (!urb->complete)
(urb->interval <= 0 ? "urb interval too small" : dev_err(&idev->dev, "urb is not complete");
"urb interval too large or some other error")))))); 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; rslt = -EIO;
goto exit; goto exit;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment