midi.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) | midi.c (75b1a8f9d62e50f05d0e4e9f3c8bcde32527ffc1) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) 2006,2007 Daniel Mack 4*/ 5 6#include <linux/device.h> 7#include <linux/usb.h> 8#include <linux/gfp.h> --- 111 unchanged lines hidden (view full) --- 120 ret = snd_rawmidi_new(device->chip.card, device->product_name, 0, 121 device->spec.num_midi_out, 122 device->spec.num_midi_in, 123 &rmidi); 124 125 if (ret < 0) 126 return ret; 127 | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) 2006,2007 Daniel Mack 4*/ 5 6#include <linux/device.h> 7#include <linux/usb.h> 8#include <linux/gfp.h> --- 111 unchanged lines hidden (view full) --- 120 ret = snd_rawmidi_new(device->chip.card, device->product_name, 0, 121 device->spec.num_midi_out, 122 device->spec.num_midi_in, 123 &rmidi); 124 125 if (ret < 0) 126 return ret; 127 |
128 strlcpy(rmidi->name, device->product_name, sizeof(rmidi->name)); | 128 strscpy(rmidi->name, device->product_name, sizeof(rmidi->name)); |
129 130 rmidi->info_flags = SNDRV_RAWMIDI_INFO_DUPLEX; 131 rmidi->private_data = device; 132 133 if (device->spec.num_midi_out > 0) { 134 rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT; 135 snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, 136 &snd_usb_caiaq_midi_output); --- 26 unchanged lines hidden --- | 129 130 rmidi->info_flags = SNDRV_RAWMIDI_INFO_DUPLEX; 131 rmidi->private_data = device; 132 133 if (device->spec.num_midi_out > 0) { 134 rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT; 135 snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, 136 &snd_usb_caiaq_midi_output); --- 26 unchanged lines hidden --- |