1316 |
|
|
1317 |
static struct file_operations snd_rawmidi_f_ops = |
static struct file_operations snd_rawmidi_f_ops = |
1318 |
{ |
{ |
|
#ifndef LINUX_2_2 |
|
1319 |
.owner = THIS_MODULE, |
.owner = THIS_MODULE, |
|
#endif |
|
1320 |
.read = snd_rawmidi_read, |
.read = snd_rawmidi_read, |
1321 |
.write = snd_rawmidi_write, |
.write = snd_rawmidi_write, |
1322 |
.open = snd_rawmidi_open, |
.open = snd_rawmidi_open, |
1392 |
init_MUTEX(&rmidi->open_mutex); |
init_MUTEX(&rmidi->open_mutex); |
1393 |
init_waitqueue_head(&rmidi->open_wait); |
init_waitqueue_head(&rmidi->open_wait); |
1394 |
if (id != NULL) |
if (id != NULL) |
1395 |
strncpy(rmidi->id, id, sizeof(rmidi->id) - 1); |
strlcpy(rmidi->id, id, sizeof(rmidi->id)); |
1396 |
if ((err = snd_rawmidi_alloc_substreams(rmidi, &rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT], SNDRV_RAWMIDI_STREAM_INPUT, input_count)) < 0) { |
if ((err = snd_rawmidi_alloc_substreams(rmidi, &rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT], SNDRV_RAWMIDI_STREAM_INPUT, input_count)) < 0) { |
1397 |
snd_rawmidi_free(rmidi); |
snd_rawmidi_free(rmidi); |
1398 |
return err; |
return err; |