diff options
| -rw-r--r-- | drivers/staging/line6/driver.c | 33 | ||||
| -rw-r--r-- | drivers/staging/line6/driver.h | 2 | ||||
| -rw-r--r-- | drivers/staging/line6/pod.c | 4 | ||||
| -rw-r--r-- | drivers/staging/line6/pod.h | 1 | ||||
| -rw-r--r-- | drivers/staging/line6/variax.c | 4 | ||||
| -rw-r--r-- | drivers/staging/line6/variax.h | 1 |
6 files changed, 10 insertions, 35 deletions
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index 369e60e070e1..f7629cbe01a3 100644 --- a/drivers/staging/line6/driver.c +++ b/drivers/staging/line6/driver.c | |||
| @@ -537,37 +537,8 @@ static void line6_data_received(struct urb *urb) | |||
| 537 | line6->message_length = done; | 537 | line6->message_length = done; |
| 538 | line6_midi_receive(line6, line6->buffer_message, done); | 538 | line6_midi_receive(line6, line6->buffer_message, done); |
| 539 | 539 | ||
| 540 | switch (line6->type) { | 540 | if (line6->process_message) |
| 541 | case LINE6_BASSPODXT: | 541 | line6->process_message(line6); |
| 542 | case LINE6_BASSPODXTLIVE: | ||
| 543 | case LINE6_BASSPODXTPRO: | ||
| 544 | case LINE6_PODXT: | ||
| 545 | case LINE6_PODXTPRO: | ||
| 546 | case LINE6_POCKETPOD: | ||
| 547 | line6_pod_process_message(line6); | ||
| 548 | break; | ||
| 549 | |||
| 550 | case LINE6_PODHD300: | ||
| 551 | case LINE6_PODHD400: | ||
| 552 | case LINE6_PODHD500_0: | ||
| 553 | case LINE6_PODHD500_1: | ||
| 554 | break; /* let userspace handle MIDI */ | ||
| 555 | |||
| 556 | case LINE6_PODXTLIVE_POD: | ||
| 557 | line6_pod_process_message(line6); | ||
| 558 | break; | ||
| 559 | |||
| 560 | case LINE6_PODXTLIVE_VARIAX: | ||
| 561 | line6_variax_process_message(line6); | ||
| 562 | break; | ||
| 563 | |||
| 564 | case LINE6_VARIAX: | ||
| 565 | line6_variax_process_message(line6); | ||
| 566 | break; | ||
| 567 | |||
| 568 | default: | ||
| 569 | MISSING_CASE; | ||
| 570 | } | ||
| 571 | } | 542 | } |
| 572 | 543 | ||
| 573 | line6_start_listen(line6); | 544 | line6_start_listen(line6); |
diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h index a4bde717e790..220813f1cbb9 100644 --- a/drivers/staging/line6/driver.h +++ b/drivers/staging/line6/driver.h | |||
| @@ -194,6 +194,8 @@ struct usb_line6 { | |||
| 194 | Length of message to be processed. | 194 | Length of message to be processed. |
| 195 | */ | 195 | */ |
| 196 | int message_length; | 196 | int message_length; |
| 197 | |||
| 198 | void (*process_message)(struct usb_line6 *); | ||
| 197 | }; | 199 | }; |
| 198 | 200 | ||
| 199 | extern char *line6_alloc_sysex_buffer(struct usb_line6 *line6, int code1, | 201 | extern char *line6_alloc_sysex_buffer(struct usb_line6 *line6, int code1, |
diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c index aa8977d1814f..79dcff4ae5a7 100644 --- a/drivers/staging/line6/pod.c +++ b/drivers/staging/line6/pod.c | |||
| @@ -131,7 +131,7 @@ static char *pod_alloc_sysex_buffer(struct usb_line6_pod *pod, int code, | |||
| 131 | /* | 131 | /* |
| 132 | Process a completely received message. | 132 | Process a completely received message. |
| 133 | */ | 133 | */ |
| 134 | void line6_pod_process_message(struct usb_line6 *line6) | 134 | static void line6_pod_process_message(struct usb_line6 *line6) |
| 135 | { | 135 | { |
| 136 | struct usb_line6_pod *pod = (struct usb_line6_pod *) line6; | 136 | struct usb_line6_pod *pod = (struct usb_line6_pod *) line6; |
| 137 | const unsigned char *buf = pod->line6.buffer_message; | 137 | const unsigned char *buf = pod->line6.buffer_message; |
| @@ -359,6 +359,8 @@ static int pod_try_init(struct usb_interface *interface, | |||
| 359 | int err; | 359 | int err; |
| 360 | struct usb_line6_pod *pod = (struct usb_line6_pod *) line6; | 360 | struct usb_line6_pod *pod = (struct usb_line6_pod *) line6; |
| 361 | 361 | ||
| 362 | line6->process_message = line6_pod_process_message; | ||
| 363 | |||
| 362 | init_timer(&pod->startup_timer); | 364 | init_timer(&pod->startup_timer); |
| 363 | INIT_WORK(&pod->startup_work, pod_startup4); | 365 | INIT_WORK(&pod->startup_work, pod_startup4); |
| 364 | 366 | ||
diff --git a/drivers/staging/line6/pod.h b/drivers/staging/line6/pod.h index 984a00bd294d..0d78ca76a72f 100644 --- a/drivers/staging/line6/pod.h +++ b/drivers/staging/line6/pod.h | |||
| @@ -89,6 +89,5 @@ struct usb_line6_pod { | |||
| 89 | extern void line6_pod_disconnect(struct usb_interface *interface); | 89 | extern void line6_pod_disconnect(struct usb_interface *interface); |
| 90 | extern int line6_pod_init(struct usb_interface *interface, | 90 | extern int line6_pod_init(struct usb_interface *interface, |
| 91 | struct usb_line6 *line6); | 91 | struct usb_line6 *line6); |
| 92 | extern void line6_pod_process_message(struct usb_line6 *line6); | ||
| 93 | 92 | ||
| 94 | #endif | 93 | #endif |
diff --git a/drivers/staging/line6/variax.c b/drivers/staging/line6/variax.c index 4d419940a6bb..ccb1f689e335 100644 --- a/drivers/staging/line6/variax.c +++ b/drivers/staging/line6/variax.c | |||
| @@ -130,7 +130,7 @@ static void variax_startup6(struct work_struct *work) | |||
| 130 | /* | 130 | /* |
| 131 | Process a completely received message. | 131 | Process a completely received message. |
| 132 | */ | 132 | */ |
| 133 | void line6_variax_process_message(struct usb_line6 *line6) | 133 | static void line6_variax_process_message(struct usb_line6 *line6) |
| 134 | { | 134 | { |
| 135 | struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; | 135 | struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; |
| 136 | const unsigned char *buf = variax->line6.buffer_message; | 136 | const unsigned char *buf = variax->line6.buffer_message; |
| @@ -180,6 +180,8 @@ static int variax_try_init(struct usb_interface *interface, | |||
| 180 | struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; | 180 | struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; |
| 181 | int err; | 181 | int err; |
| 182 | 182 | ||
| 183 | line6->process_message = line6_variax_process_message; | ||
| 184 | |||
| 183 | init_timer(&variax->startup_timer1); | 185 | init_timer(&variax->startup_timer1); |
| 184 | init_timer(&variax->startup_timer2); | 186 | init_timer(&variax->startup_timer2); |
| 185 | INIT_WORK(&variax->startup_work, variax_startup6); | 187 | INIT_WORK(&variax->startup_work, variax_startup6); |
diff --git a/drivers/staging/line6/variax.h b/drivers/staging/line6/variax.h index 7d445ff8c9dc..f21ff2030f01 100644 --- a/drivers/staging/line6/variax.h +++ b/drivers/staging/line6/variax.h | |||
| @@ -67,6 +67,5 @@ struct usb_line6_variax { | |||
| 67 | extern void line6_variax_disconnect(struct usb_interface *interface); | 67 | extern void line6_variax_disconnect(struct usb_interface *interface); |
| 68 | extern int line6_variax_init(struct usb_interface *interface, | 68 | extern int line6_variax_init(struct usb_interface *interface, |
| 69 | struct usb_line6 *line6); | 69 | struct usb_line6 *line6); |
| 70 | extern void line6_variax_process_message(struct usb_line6 *line6); | ||
| 71 | 70 | ||
| 72 | #endif | 71 | #endif |
