forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/usb/bcd2000/bcd2000.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Behringer BCD2000 driver
34 *
45 * Copyright (C) 2014 Mario Kicherer (dev@kicherer.org)
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
156 */
167
178 #include <linux/kernel.h>
....@@ -34,9 +25,9 @@
3425 { },
3526 };
3627
37
-static unsigned char device_cmd_prefix[] = {0x03, 0x00};
28
+static const unsigned char device_cmd_prefix[] = {0x03, 0x00};
3829
39
-static unsigned char bcd2000_init_sequence[] = {
30
+static const unsigned char bcd2000_init_sequence[] = {
4031 0x07, 0x00, 0x00, 0x00, 0x78, 0x48, 0x1c, 0x81,
4132 0xc4, 0x00, 0x00, 0x00, 0x5e, 0x53, 0x4a, 0xf7,
4233 0x18, 0xfa, 0x11, 0xff, 0x6c, 0xf3, 0x90, 0xff,
....@@ -357,7 +348,8 @@
357348 static void bcd2000_free_usb_related_resources(struct bcd2000 *bcd2k,
358349 struct usb_interface *interface)
359350 {
360
- /* usb_kill_urb not necessary, urb is aborted automatically */
351
+ usb_kill_urb(bcd2k->midi_out_urb);
352
+ usb_kill_urb(bcd2k->midi_in_urb);
361353
362354 usb_free_urb(bcd2k->midi_out_urb);
363355 usb_free_urb(bcd2k->midi_in_urb);