Commit 73a97f4f authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: wacom - fix some formatting issues

Fix identation of switch/case statements so they follow style used by the
rest of the kernel.
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 51269fe8
...@@ -99,12 +99,12 @@ static void wacom_sys_irq(struct urb *urb) ...@@ -99,12 +99,12 @@ static void wacom_sys_irq(struct urb *urb)
wcombo.wacom = wacom; wcombo.wacom = wacom;
wcombo.urb = urb; wcombo.urb = urb;
if (wacom_wac_irq(&wacom->wacom_wac, (void *)&wcombo)) if (wacom_wac_irq(&wacom->wacom_wac, &wcombo))
input_sync(get_input_dev(&wcombo)); input_sync(get_input_dev(&wcombo));
exit: exit:
usb_mark_last_busy(wacom->usbdev); usb_mark_last_busy(wacom->usbdev);
retval = usb_submit_urb (urb, GFP_ATOMIC); retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval) if (retval)
err ("%s - usb_submit_urb failed with result %d", err ("%s - usb_submit_urb failed with result %d",
__func__, retval); __func__, retval);
......
...@@ -239,6 +239,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) ...@@ -239,6 +239,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo)
} }
retval = 1; retval = 1;
break; break;
case WACOM_MO: case WACOM_MO:
prox = (data[7] & 0xf8) || data[8]; prox = (data[7] & 0xf8) || data[8];
if (prox || wacom->id[1]) { if (prox || wacom->id[1]) {
...@@ -279,6 +280,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo) ...@@ -279,6 +280,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo)
(data[6] << 4) + (data[7] >> 4); (data[6] << 4) + (data[7] >> 4);
wacom->id[idx] = (data[2] << 4) | (data[3] >> 4); wacom->id[idx] = (data[2] << 4) | (data[3] >> 4);
switch (wacom->id[idx]) { switch (wacom->id[idx]) {
case 0x812: /* Inking pen */ case 0x812: /* Inking pen */
case 0x801: /* Intuos3 Inking pen */ case 0x801: /* Intuos3 Inking pen */
...@@ -286,6 +288,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo) ...@@ -286,6 +288,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo)
case 0x012: case 0x012:
wacom->tool[idx] = BTN_TOOL_PENCIL; wacom->tool[idx] = BTN_TOOL_PENCIL;
break; break;
case 0x822: /* Pen */ case 0x822: /* Pen */
case 0x842: case 0x842:
case 0x852: case 0x852:
...@@ -298,10 +301,12 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo) ...@@ -298,10 +301,12 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo)
case 0x022: case 0x022:
wacom->tool[idx] = BTN_TOOL_PEN; wacom->tool[idx] = BTN_TOOL_PEN;
break; break;
case 0x832: /* Stroke pen */ case 0x832: /* Stroke pen */
case 0x032: case 0x032:
wacom->tool[idx] = BTN_TOOL_BRUSH; wacom->tool[idx] = BTN_TOOL_BRUSH;
break; break;
case 0x007: /* Mouse 4D and 2D */ case 0x007: /* Mouse 4D and 2D */
case 0x09c: case 0x09c:
case 0x094: case 0x094:
...@@ -309,11 +314,13 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo) ...@@ -309,11 +314,13 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo)
case 0x806: /* Intuos4 Mouse */ case 0x806: /* Intuos4 Mouse */
wacom->tool[idx] = BTN_TOOL_MOUSE; wacom->tool[idx] = BTN_TOOL_MOUSE;
break; break;
case 0x096: /* Lens cursor */ case 0x096: /* Lens cursor */
case 0x097: /* Intuos3 Lens cursor */ case 0x097: /* Intuos3 Lens cursor */
case 0x006: /* Intuos4 Lens cursor */ case 0x006: /* Intuos4 Lens cursor */
wacom->tool[idx] = BTN_TOOL_LENS; wacom->tool[idx] = BTN_TOOL_LENS;
break; break;
case 0x82a: /* Eraser */ case 0x82a: /* Eraser */
case 0x85a: case 0x85a:
case 0x91a: case 0x91a:
...@@ -328,6 +335,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo) ...@@ -328,6 +335,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo)
case 0x90a: /* Intuos4 Airbrush Eraser */ case 0x90a: /* Intuos4 Airbrush Eraser */
wacom->tool[idx] = BTN_TOOL_RUBBER; wacom->tool[idx] = BTN_TOOL_RUBBER;
break; break;
case 0xd12: case 0xd12:
case 0x912: case 0x912:
case 0x112: case 0x112:
...@@ -335,8 +343,10 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo) ...@@ -335,8 +343,10 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo)
case 0x902: /* Intuos4 Airbrush */ case 0x902: /* Intuos4 Airbrush */
wacom->tool[idx] = BTN_TOOL_AIRBRUSH; wacom->tool[idx] = BTN_TOOL_AIRBRUSH;
break; break;
default: /* Unknown tool */ default: /* Unknown tool */
wacom->tool[idx] = BTN_TOOL_PEN; wacom->tool[idx] = BTN_TOOL_PEN;
break;
} }
return 1; return 1;
} }
...@@ -406,7 +416,6 @@ static void wacom_intuos_general(struct wacom_wac *wacom, void *wcombo) ...@@ -406,7 +416,6 @@ static void wacom_intuos_general(struct wacom_wac *wacom, void *wcombo)
((data[7] << 1) & 0x7e) | (data[8] >> 7)); ((data[7] << 1) & 0x7e) | (data[8] >> 7));
wacom_report_abs(wcombo, ABS_TILT_Y, data[8] & 0x7f); wacom_report_abs(wcombo, ABS_TILT_Y, data[8] & 0x7f);
} }
return;
} }
static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo)
...@@ -487,7 +496,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) ...@@ -487,7 +496,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo)
/* process in/out prox events */ /* process in/out prox events */
result = wacom_intuos_inout(wacom, wcombo); result = wacom_intuos_inout(wacom, wcombo);
if (result) if (result)
return result-1; return result - 1;
/* don't proceed if we don't know the ID */ /* don't proceed if we don't know the ID */
if (!wacom->id[idx]) if (!wacom->id[idx])
...@@ -635,7 +644,9 @@ static void wacom_tpc_touch_in(struct wacom_wac *wacom, void *wcombo) ...@@ -635,7 +644,9 @@ static void wacom_tpc_touch_in(struct wacom_wac *wacom, void *wcombo)
wacom->tool[1] = BTN_TOOL_TRIPLETAP; wacom->tool[1] = BTN_TOOL_TRIPLETAP;
if (urb->actual_length != WACOM_PKGLEN_TPC1FG) { if (urb->actual_length != WACOM_PKGLEN_TPC1FG) {
switch (data[0]) { switch (data[0]) {
case WACOM_REPORT_TPC1FG: case WACOM_REPORT_TPC1FG:
wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2])); wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2]));
wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4])); wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4]));
...@@ -644,6 +655,7 @@ static void wacom_tpc_touch_in(struct wacom_wac *wacom, void *wcombo) ...@@ -644,6 +655,7 @@ static void wacom_tpc_touch_in(struct wacom_wac *wacom, void *wcombo)
wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]);
wacom_report_key(wcombo, wacom->tool[0], 1); wacom_report_key(wcombo, wacom->tool[0], 1);
break; break;
case WACOM_REPORT_TPC2FG: case WACOM_REPORT_TPC2FG:
/* keep this byte to send proper out-prox event */ /* keep this byte to send proper out-prox event */
wacom->id[1] = data[1] & 0x03; wacom->id[1] = data[1] & 0x03;
...@@ -681,7 +693,6 @@ static void wacom_tpc_touch_in(struct wacom_wac *wacom, void *wcombo) ...@@ -681,7 +693,6 @@ static void wacom_tpc_touch_in(struct wacom_wac *wacom, void *wcombo)
wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]);
wacom_report_key(wcombo, wacom->tool[0], 1); wacom_report_key(wcombo, wacom->tool[0], 1);
} }
return;
} }
static int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo) static int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo)
...@@ -809,51 +820,61 @@ void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_w ...@@ -809,51 +820,61 @@ void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_w
switch (wacom_wac->features.type) { switch (wacom_wac->features.type) {
case WACOM_MO: case WACOM_MO:
input_dev_mo(input_dev, wacom_wac); input_dev_mo(input_dev, wacom_wac);
case WACOM_G4: case WACOM_G4:
input_dev_g4(input_dev, wacom_wac); input_dev_g4(input_dev, wacom_wac);
/* fall through */ /* fall through */
case GRAPHIRE: case GRAPHIRE:
input_dev_g(input_dev, wacom_wac); input_dev_g(input_dev, wacom_wac);
break; break;
case WACOM_BEE: case WACOM_BEE:
input_dev_bee(input_dev, wacom_wac); input_dev_bee(input_dev, wacom_wac);
case INTUOS3: case INTUOS3:
case INTUOS3L: case INTUOS3L:
case CINTIQ: case CINTIQ:
input_dev_i3(input_dev, wacom_wac); input_dev_i3(input_dev, wacom_wac);
/* fall through */ /* fall through */
case INTUOS3S: case INTUOS3S:
input_dev_i3s(input_dev, wacom_wac); input_dev_i3s(input_dev, wacom_wac);
/* fall through */ /* fall through */
case INTUOS: case INTUOS:
input_dev_i(input_dev, wacom_wac); input_dev_i(input_dev, wacom_wac);
break; break;
case INTUOS4: case INTUOS4:
case INTUOS4L: case INTUOS4L:
input_dev_i4(input_dev, wacom_wac); input_dev_i4(input_dev, wacom_wac);
/* fall through */ /* fall through */
case INTUOS4S: case INTUOS4S:
input_dev_i4s(input_dev, wacom_wac); input_dev_i4s(input_dev, wacom_wac);
input_dev_i(input_dev, wacom_wac); input_dev_i(input_dev, wacom_wac);
break; break;
case TABLETPC2FG: case TABLETPC2FG:
input_dev_tpc2fg(input_dev, wacom_wac); input_dev_tpc2fg(input_dev, wacom_wac);
/* fall through */ /* fall through */
case TABLETPC: case TABLETPC:
input_dev_tpc(input_dev, wacom_wac); input_dev_tpc(input_dev, wacom_wac);
if (wacom_wac->features.device_type != BTN_TOOL_PEN) if (wacom_wac->features.device_type != BTN_TOOL_PEN)
break; /* no need to process stylus stuff */ break; /* no need to process stylus stuff */
/* fall through */ /* fall through */
case PL: case PL:
case PTU: case PTU:
input_dev_pl(input_dev, wacom_wac); input_dev_pl(input_dev, wacom_wac);
/* fall through */ /* fall through */
case PENPARTNER: case PENPARTNER:
input_dev_pt(input_dev, wacom_wac); input_dev_pt(input_dev, wacom_wac);
break; break;
} }
return;
} }
static const struct wacom_features wacom_features_0x00 = static const struct wacom_features wacom_features_0x00 =
......
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