aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/rme9652
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-08-05 12:30:12 +0200
committerTakashi Iwai <tiwai@suse.de>2011-08-05 12:30:12 +0200
commit3d56c8e6b039f2bc1d7c62d3b19e696c3129c8c0 (patch)
treee53153b7f379a20639aa31a17061dc36524ef043 /sound/pci/rme9652
parent02651d1a9725f29e95296c37cf9a4f16e9c01bff (diff)
ALSA: hdspm - Fix uninitialized compile warnings
Put the exception checks for io_type switch() for possible mistakes in future. Also this shuts up annoying compile warnings. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/rme9652')
-rw-r--r--sound/pci/rme9652/hdspm.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 6edc67ced90..493e3946756 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -1339,6 +1339,10 @@ static u64 hdspm_calc_dds_value(struct hdspm *hdspm, u64 period)
break;
case MADIface:
freq_const = 131072000000000ULL;
+ break;
+ default:
+ snd_BUG();
+ return 0;
}
return div_u64(freq_const, period);
@@ -1356,16 +1360,19 @@ static void hdspm_set_dds_value(struct hdspm *hdspm, int rate)
switch (hdspm->io_type) {
case MADIface:
- n = 131072000000000ULL; /* 125 MHz */
- break;
+ n = 131072000000000ULL; /* 125 MHz */
+ break;
case MADI:
case AES32:
- n = 110069313433624ULL; /* 105 MHz */
- break;
+ n = 110069313433624ULL; /* 105 MHz */
+ break;
case RayDAT:
case AIO:
- n = 104857600000000ULL; /* 100 MHz */
- break;
+ n = 104857600000000ULL; /* 100 MHz */
+ break;
+ default:
+ snd_BUG();
+ return;
}
n = div_u64(n, rate);