diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2020-05-19 13:16:31 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-05-22 16:52:12 +0200 |
commit | ff222b7e45eb1ffb2931269abf66b9d3576c9eeb (patch) | |
tree | cd619cfc50db20990d80d7b830644235a51b80e8 /sound/firewire/motu/motu-proc.c | |
parent | ALSA: firewire-motu: localize protocol data (diff) | |
download | linux-ff222b7e45eb1ffb2931269abf66b9d3576c9eeb.tar.xz linux-ff222b7e45eb1ffb2931269abf66b9d3576c9eeb.zip |
ALSA: firewire-motu: add wrapper functions for protocol-dependent operations
This commit adds helper functions which wraps function call for each
protocol.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200519111641.123211-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/motu/motu-proc.c')
-rw-r--r-- | sound/firewire/motu/motu-proc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/firewire/motu/motu-proc.c b/sound/firewire/motu/motu-proc.c index 187f6abd878c..71d02602d84d 100644 --- a/sound/firewire/motu/motu-proc.c +++ b/sound/firewire/motu/motu-proc.c @@ -28,13 +28,12 @@ static void proc_read_clock(struct snd_info_entry *entry, { struct snd_motu *motu = entry->private_data; - const struct snd_motu_protocol *const protocol = motu->spec->protocol; unsigned int rate; enum snd_motu_clock_source source; - if (protocol->get_clock_rate(motu, &rate) < 0) + if (snd_motu_protocol_get_clock_rate(motu, &rate) < 0) return; - if (protocol->get_clock_source(motu, &source) < 0) + if (snd_motu_protocol_get_clock_source(motu, &source) < 0) return; snd_iprintf(buffer, "Rate:\t%d\n", rate); @@ -45,12 +44,11 @@ static void proc_read_format(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_motu *motu = entry->private_data; - const struct snd_motu_protocol *const protocol = motu->spec->protocol; unsigned int mode; struct snd_motu_packet_format *formats; int i; - if (protocol->cache_packet_formats(motu) < 0) + if (snd_motu_protocol_cache_packet_formats(motu) < 0) return; snd_iprintf(buffer, "tx:\tmsg\tfixed\tdiffered\n"); |