Skip to content

Commit 562f0c6

Browse files
takaswietiwai
authored andcommitted
ALSA: firewire-motu: drop protocol structure
Now protocol structure becomes useless. This commit drops it. Signed-off-by: Takashi Sakamoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent ff222b7 commit 562f0c6

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

sound/firewire/motu/motu-protocol-v2.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,9 @@ int snd_motu_protocol_v2_cache_packet_formats(struct snd_motu *motu)
296296
return 0;
297297
}
298298

299-
static const struct snd_motu_protocol snd_motu_protocol_v2 = {
300-
};
301-
302299
const struct snd_motu_spec snd_motu_spec_828mk2 = {
303300
.name = "828mk2",
304301
.protocol_version = SND_MOTU_PROTOCOL_V2,
305-
.protocol = &snd_motu_protocol_v2,
306302
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
307303
SND_MOTU_SPEC_TX_MICINST_CHUNK |
308304
SND_MOTU_SPEC_TX_RETURN_CHUNK |
@@ -317,7 +313,6 @@ const struct snd_motu_spec snd_motu_spec_828mk2 = {
317313

318314
const struct snd_motu_spec snd_motu_spec_traveler = {
319315
.name = "Traveler",
320-
.protocol = &snd_motu_protocol_v2,
321316
.protocol_version = SND_MOTU_PROTOCOL_V2,
322317
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
323318
SND_MOTU_SPEC_SUPPORT_CLOCK_X4 |
@@ -334,7 +329,6 @@ const struct snd_motu_spec snd_motu_spec_traveler = {
334329
const struct snd_motu_spec snd_motu_spec_ultralite = {
335330
.name = "UltraLite",
336331
.protocol_version = SND_MOTU_PROTOCOL_V2,
337-
.protocol = &snd_motu_protocol_v2,
338332
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
339333
SND_MOTU_SPEC_TX_MICINST_CHUNK | // padding.
340334
SND_MOTU_SPEC_TX_RETURN_CHUNK |
@@ -348,7 +342,6 @@ const struct snd_motu_spec snd_motu_spec_ultralite = {
348342
const struct snd_motu_spec snd_motu_spec_8pre = {
349343
.name = "8pre",
350344
.protocol_version = SND_MOTU_PROTOCOL_V2,
351-
.protocol = &snd_motu_protocol_v2,
352345
// In tx, use coax chunks for mix-return 1/2. In rx, use coax chunks for
353346
// dummy 1/2.
354347
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |

sound/firewire/motu/motu-protocol-v3.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,10 @@ int snd_motu_protocol_v3_cache_packet_formats(struct snd_motu *motu)
310310
return 0;
311311
}
312312

313-
static const struct snd_motu_protocol snd_motu_protocol_v3 = {
314-
};
315313

316314
const struct snd_motu_spec snd_motu_spec_828mk3 = {
317315
.name = "828mk3",
318316
.protocol_version = SND_MOTU_PROTOCOL_V3,
319-
.protocol = &snd_motu_protocol_v3,
320317
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
321318
SND_MOTU_SPEC_SUPPORT_CLOCK_X4 |
322319
SND_MOTU_SPEC_TX_MICINST_CHUNK |
@@ -335,7 +332,6 @@ const struct snd_motu_spec snd_motu_spec_828mk3 = {
335332
const struct snd_motu_spec snd_motu_spec_audio_express = {
336333
.name = "AudioExpress",
337334
.protocol_version = SND_MOTU_PROTOCOL_V3,
338-
.protocol = &snd_motu_protocol_v3,
339335
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
340336
SND_MOTU_SPEC_TX_MICINST_CHUNK |
341337
SND_MOTU_SPEC_TX_RETURN_CHUNK |
@@ -349,7 +345,6 @@ const struct snd_motu_spec snd_motu_spec_audio_express = {
349345
const struct snd_motu_spec snd_motu_spec_4pre = {
350346
.name = "4pre",
351347
.protocol_version = SND_MOTU_PROTOCOL_V3,
352-
.protocol = &snd_motu_protocol_v3,
353348
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
354349
SND_MOTU_SPEC_TX_MICINST_CHUNK |
355350
SND_MOTU_SPEC_TX_RETURN_CHUNK |

sound/firewire/motu/motu.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,13 @@ enum snd_motu_protocol_version {
113113
SND_MOTU_PROTOCOL_V3,
114114
};
115115

116-
struct snd_motu_protocol {
117-
int (*get_clock_rate)(struct snd_motu *motu, unsigned int *rate);
118-
int (*set_clock_rate)(struct snd_motu *motu, unsigned int rate);
119-
int (*get_clock_source)(struct snd_motu *motu,
120-
enum snd_motu_clock_source *source);
121-
int (*switch_fetching_mode)(struct snd_motu *motu, bool enable);
122-
int (*cache_packet_formats)(struct snd_motu *motu);
123-
};
124-
125116
struct snd_motu_spec {
126117
const char *const name;
127118
enum snd_motu_protocol_version protocol_version;
128119
enum snd_motu_spec_flags flags;
129120

130121
unsigned char analog_in_ports;
131122
unsigned char analog_out_ports;
132-
133-
const struct snd_motu_protocol *const protocol;
134123
};
135124

136125
extern const struct snd_motu_spec snd_motu_spec_828mk2;

0 commit comments

Comments
 (0)