Skip to content

Commit 9fd8d36

Browse files
andim2tiwai
authored andcommitted
ALSA: azt3328: cosmetics: use a helper variable for codec setup
Signed-off-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 8d9a114 commit 9fd8d36

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

‎sound/pci/azt3328.c‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,6 +2195,7 @@ snd_azf3328_create(struct snd_card *card,
21952195
};
21962196
u8 dma_init;
21972197
enum snd_azf3328_codec_type codec_type;
2198+
struct snd_azf3328_codec *codec_setup;
21982199

21992200
*rchip = NULL;
22002201

@@ -2232,15 +2233,17 @@ snd_azf3328_create(struct snd_card *card,
22322233
chip->opl3_io = pci_resource_start(pci, 3);
22332234
chip->mixer_io = pci_resource_start(pci, 4);
22342235

2235-
chip->codecs[AZF_CODEC_PLAYBACK].io_base =
2236-
chip->ctrl_io + AZF_IO_OFFS_CODEC_PLAYBACK;
2237-
chip->codecs[AZF_CODEC_PLAYBACK].name = "PLAYBACK";
2238-
chip->codecs[AZF_CODEC_CAPTURE].io_base =
2239-
chip->ctrl_io + AZF_IO_OFFS_CODEC_CAPTURE;
2240-
chip->codecs[AZF_CODEC_CAPTURE].name = "CAPTURE";
2241-
chip->codecs[AZF_CODEC_I2S_OUT].io_base =
2242-
chip->ctrl_io + AZF_IO_OFFS_CODEC_I2S_OUT;
2243-
chip->codecs[AZF_CODEC_I2S_OUT].name = "I2S_OUT";
2236+
codec_setup = &chip->codecs[AZF_CODEC_PLAYBACK];
2237+
codec_setup->io_base = chip->ctrl_io + AZF_IO_OFFS_CODEC_PLAYBACK;
2238+
codec_setup->name = "PLAYBACK";
2239+
2240+
codec_setup = &chip->codecs[AZF_CODEC_CAPTURE];
2241+
codec_setup->io_base = chip->ctrl_io + AZF_IO_OFFS_CODEC_CAPTURE;
2242+
codec_setup->name = "CAPTURE";
2243+
2244+
codec_setup = &chip->codecs[AZF_CODEC_I2S_OUT];
2245+
codec_setup->io_base = chip->ctrl_io + AZF_IO_OFFS_CODEC_I2S_OUT;
2246+
codec_setup->name = "I2S_OUT";
22442247

22452248
if (request_irq(pci->irq, snd_azf3328_interrupt,
22462249
IRQF_SHARED, card->shortname, chip)) {

0 commit comments

Comments
 (0)