Skip to content

Commit 20861fa

Browse files
ristosutiwai
authored andcommitted
[ALSA] snd-powermac: style burgundy.c
Coding style corrections for burgundy.c. Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 44deee1 commit 20861fa

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

‎sound/ppc/burgundy.c‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ snd_pmac_burgundy_rcw(struct snd_pmac *chip, unsigned addr)
102102
}
103103

104104
static void
105-
snd_pmac_burgundy_wcb(struct snd_pmac *chip, unsigned int addr, unsigned int val)
105+
snd_pmac_burgundy_wcb(struct snd_pmac *chip, unsigned int addr,
106+
unsigned int val)
106107
{
107108
out_le32(&chip->awacs->codec_ctrl, addr + 0x300000 + (val & 0xff));
108109
snd_pmac_burgundy_busy_wait(chip);
@@ -126,8 +127,11 @@ snd_pmac_burgundy_rcb(struct snd_pmac *chip, unsigned int addr)
126127
return val;
127128
}
128129

130+
#define BASE2ADDR(base) ((base) << 12)
131+
#define ADDR2BASE(addr) ((addr) >> 12)
132+
129133
/*
130-
* Burgundy volume: 0 - 100, stereo
134+
* Burgundy volume: 0 - 100, stereo, word reg
131135
*/
132136
static void
133137
snd_pmac_burgundy_write_volume(struct snd_pmac *chip, unsigned int address,
@@ -168,13 +172,6 @@ snd_pmac_burgundy_read_volume(struct snd_pmac *chip, unsigned int address,
168172
volume[1] = 0;
169173
}
170174

171-
172-
/*
173-
*/
174-
175-
#define BASE2ADDR(base) ((base) << 12)
176-
#define ADDR2BASE(addr) ((addr) >> 12)
177-
178175
static int snd_pmac_burgundy_info_volume(struct snd_kcontrol *kcontrol,
179176
struct snd_ctl_elem_info *uinfo)
180177
{
@@ -191,8 +188,8 @@ static int snd_pmac_burgundy_get_volume(struct snd_kcontrol *kcontrol,
191188
struct snd_pmac *chip = snd_kcontrol_chip(kcontrol);
192189
unsigned int addr = BASE2ADDR(kcontrol->private_value & 0xff);
193190
int shift = (kcontrol->private_value >> 8) & 0xff;
194-
snd_pmac_burgundy_read_volume(chip, addr, ucontrol->value.integer.value,
195-
shift);
191+
snd_pmac_burgundy_read_volume(chip, addr,
192+
ucontrol->value.integer.value, shift);
196193
return 0;
197194
}
198195

@@ -204,8 +201,8 @@ static int snd_pmac_burgundy_put_volume(struct snd_kcontrol *kcontrol,
204201
int shift = (kcontrol->private_value >> 8) & 0xff;
205202
long nvoices[2];
206203

207-
snd_pmac_burgundy_write_volume(chip, addr, ucontrol->value.integer.value,
208-
shift);
204+
snd_pmac_burgundy_write_volume(chip, addr,
205+
ucontrol->value.integer.value, shift);
209206
snd_pmac_burgundy_read_volume(chip, addr, nvoices, shift);
210207
return (nvoices[0] != ucontrol->value.integer.value[0] ||
211208
nvoices[1] != ucontrol->value.integer.value[1]);
@@ -700,7 +697,8 @@ int __init snd_pmac_burgundy_init(struct snd_pmac *chip)
700697
chip->master_sw_ctl = snd_ctl_new1(imac
701698
? &snd_pmac_burgundy_master_sw_imac
702699
: &snd_pmac_burgundy_master_sw_pmac, chip);
703-
if ((err = snd_ctl_add(chip->card, chip->master_sw_ctl)) < 0)
700+
err = snd_ctl_add(chip->card, chip->master_sw_ctl);
701+
if (err < 0)
704702
return err;
705703
chip->master_sw_ctl = snd_ctl_new1(imac
706704
? &snd_pmac_burgundy_line_sw_imac
@@ -718,10 +716,12 @@ int __init snd_pmac_burgundy_init(struct snd_pmac *chip)
718716
chip->speaker_sw_ctl = snd_ctl_new1(imac
719717
? &snd_pmac_burgundy_speaker_sw_imac
720718
: &snd_pmac_burgundy_speaker_sw_pmac, chip);
721-
if ((err = snd_ctl_add(chip->card, chip->speaker_sw_ctl)) < 0)
719+
err = snd_ctl_add(chip->card, chip->speaker_sw_ctl);
720+
if (err < 0)
722721
return err;
723722
#ifdef PMAC_SUPPORT_AUTOMUTE
724-
if ((err = snd_pmac_add_automute(chip)) < 0)
723+
err = snd_pmac_add_automute(chip);
724+
if (err < 0)
725725
return err;
726726

727727
chip->detect_headphone = snd_pmac_burgundy_detect_headphone;

0 commit comments

Comments
 (0)