summaryrefslogtreecommitdiffstats
path: root/sound/oss/sh_dac_audio.c
diff options
context:
space:
mode:
authorAndriy Skulysh <askulysh@gmail.com>2006-09-27 13:07:38 +0900
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 13:07:38 +0900
commit4bcac20a7a01d49dffb5e88a8140efa34927c383 (patch)
treec931d2d1ef979b431f297265ea386083e13aeefa /sound/oss/sh_dac_audio.c
parente4c2cfee5d5cf3e4c16b423be23551aeddf2717b (diff)
downloadlinux-4bcac20a7a01d49dffb5e88a8140efa34927c383.tar.gz
linux-4bcac20a7a01d49dffb5e88a8140efa34927c383.tar.bz2
linux-4bcac20a7a01d49dffb5e88a8140efa34927c383.zip
sh: hp6xx mach-type cleanups.
Some minor cleanups for the updated consolidated hp6xx mach-type. Signed-off-by: Andriy Skulysh <askulysh@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'sound/oss/sh_dac_audio.c')
-rw-r--r--sound/oss/sh_dac_audio.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
index 7b168d85f4ab..ae7fccc510a1 100644
--- a/sound/oss/sh_dac_audio.c
+++ b/sound/oss/sh_dac_audio.c
@@ -6,18 +6,15 @@
#include <linux/fs.h>
#include <linux/sound.h>
#include <linux/soundcard.h>
+#include <linux/interrupt.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/irq.h>
#include <asm/delay.h>
-#include <linux/interrupt.h>
-
#include <asm/cpu/dac.h>
-
-#ifdef MACH_HP600
+#include <asm/machvec.h>
#include <asm/hp6xx/hp6xx.h>
#include <asm/hd64461/hd64461.h>
-#endif
#define MODNAME "sh_dac_audio"
@@ -71,26 +68,25 @@ static void dac_audio_sync(void)
static void dac_audio_start(void)
{
-#ifdef MACH_HP600
- u16 v;
- v = inw(HD64461_GPADR);
- v &= ~HD64461_GPADR_SPEAKER;
- outw(v, HD64461_GPADR);
-#endif
+ if (mach_is_hp6xx()) {
+ u16 v = inw(HD64461_GPADR);
+ v &= ~HD64461_GPADR_SPEAKER;
+ outw(v, HD64461_GPADR);
+ }
+
sh_dac_enable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL);
ctrl_outw(TMU1_TCR_INIT, TMU1_TCR);
}
static void dac_audio_stop(void)
{
-#ifdef MACH_HP600
- u16 v;
-#endif
dac_audio_stop_timer();
-#ifdef MACH_HP600
- v = inw(HD64461_GPADR);
- v |= HD64461_GPADR_SPEAKER;
- outw(v, HD64461_GPADR);
-#endif
+
+ if (mach_is_hp6xx()) {
+ u16 v = inw(HD64461_GPADR);
+ v |= HD64461_GPADR_SPEAKER;
+ outw(v, HD64461_GPADR);
+ }
+
sh_dac_disable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL);
}