diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-08-05 06:30:12 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-08-05 06:30:12 -0400 |
commit | 3d56c8e6b039f2bc1d7c62d3b19e696c3129c8c0 (patch) | |
tree | e53153b7f379a20639aa31a17061dc36524ef043 /sound/pci | |
parent | 02651d1a9725f29e95296c37cf9a4f16e9c01bff (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')
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 6edc67ced905..493e3946756f 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) | |||
1339 | break; | 1339 | break; |
1340 | case MADIface: | 1340 | case MADIface: |
1341 | freq_const = 131072000000000ULL; | 1341 | freq_const = 131072000000000ULL; |
1342 | break; | ||
1343 | default: | ||
1344 | snd_BUG(); | ||
1345 | return 0; | ||
1342 | } | 1346 | } |
1343 | 1347 | ||
1344 | return div_u64(freq_const, period); | 1348 | return div_u64(freq_const, period); |
@@ -1356,16 +1360,19 @@ static void hdspm_set_dds_value(struct hdspm *hdspm, int rate) | |||
1356 | 1360 | ||
1357 | switch (hdspm->io_type) { | 1361 | switch (hdspm->io_type) { |
1358 | case MADIface: | 1362 | case MADIface: |
1359 | n = 131072000000000ULL; /* 125 MHz */ | 1363 | n = 131072000000000ULL; /* 125 MHz */ |
1360 | break; | 1364 | break; |
1361 | case MADI: | 1365 | case MADI: |
1362 | case AES32: | 1366 | case AES32: |
1363 | n = 110069313433624ULL; /* 105 MHz */ | 1367 | n = 110069313433624ULL; /* 105 MHz */ |
1364 | break; | 1368 | break; |
1365 | case RayDAT: | 1369 | case RayDAT: |
1366 | case AIO: | 1370 | case AIO: |
1367 | n = 104857600000000ULL; /* 100 MHz */ | 1371 | n = 104857600000000ULL; /* 100 MHz */ |
1368 | break; | 1372 | break; |
1373 | default: | ||
1374 | snd_BUG(); | ||
1375 | return; | ||
1369 | } | 1376 | } |
1370 | 1377 | ||
1371 | n = div_u64(n, rate); | 1378 | n = div_u64(n, rate); |