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

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
Loading
Loading
Loading
Loading
+51 −45
Original line number Diff line number Diff line
/*
 * Hardware event => input event mapping:
 *
 *
 *
 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
 * 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
 *
 * MIMIO_EV_PENDOWN(MIMIO_PEN_K)	=> EV_KEY BIT(BTN_TOOL_PEN)
 * MIMIO_EV_PENDOWN(MIMIO_PEN_B)	=> EV_KEY BIT(BTN_TOOL_RUBBER)
@@ -35,13 +34,13 @@
 * 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.
 */

#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;
		}