Commit 1753187e authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai
Browse files

ALSA: oxfw: enclose identifiers referred by single function for scs1x feature



Some identifiers are referred just by one functions. In this case, they
can be put into the function definition. This brings two merits; readers
can easily follow codes related to the identifiers, developers are free
from name conflict.

This commit moves such identifiers to each function definition.
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f43e5407
...@@ -338,12 +338,6 @@ static void midi_playback_drain(struct snd_rawmidi_substream *stream) ...@@ -338,12 +338,6 @@ static void midi_playback_drain(struct snd_rawmidi_substream *stream)
wait_event(scs->idle_wait, scs->output_idle); wait_event(scs->idle_wait, scs->output_idle);
} }
static const struct snd_rawmidi_ops midi_playback_ops = {
.open = midi_playback_open,
.close = midi_playback_close,
.trigger = midi_playback_trigger,
.drain = midi_playback_drain,
};
static int register_address(struct snd_oxfw *oxfw) static int register_address(struct snd_oxfw *oxfw)
{ {
struct fw_scs1x *scs = oxfw->spec; struct fw_scs1x *scs = oxfw->spec;
...@@ -369,6 +363,12 @@ void snd_oxfw_scs1x_update(struct snd_oxfw *oxfw) ...@@ -369,6 +363,12 @@ void snd_oxfw_scs1x_update(struct snd_oxfw *oxfw)
int snd_oxfw_scs1x_add(struct snd_oxfw *oxfw) int snd_oxfw_scs1x_add(struct snd_oxfw *oxfw)
{ {
static const struct snd_rawmidi_ops midi_playback_ops = {
.open = midi_playback_open,
.close = midi_playback_close,
.trigger = midi_playback_trigger,
.drain = midi_playback_drain,
};
struct snd_rawmidi *rmidi; struct snd_rawmidi *rmidi;
struct fw_scs1x *scs; struct fw_scs1x *scs;
int err; int err;
......
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