diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-05-08 07:01:32 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-05-19 07:19:15 -0400 |
commit | 48008b598bb9cfffbd871512f49d84eb5b885a00 (patch) | |
tree | 9114d0b1f1effcf0fdf613b098e461249e1cb767 /sound/i2c/cs8427.c | |
parent | 87af38dafe4f930921b9217c21ec6d72cad56bcc (diff) |
[ALSA] i2c: cs8427.c use put_unaligned helper
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/i2c/cs8427.c')
-rw-r--r-- | sound/i2c/cs8427.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c index e57e9cbe6a0f..9c3d361accfb 100644 --- a/sound/i2c/cs8427.c +++ b/sound/i2c/cs8427.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <asm/unaligned.h> | ||
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
27 | #include <sound/control.h> | 28 | #include <sound/control.h> |
28 | #include <sound/pcm.h> | 29 | #include <sound/pcm.h> |
@@ -264,10 +265,7 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, | |||
264 | goto __fail; | 265 | goto __fail; |
265 | } | 266 | } |
266 | /* write default channel status bytes */ | 267 | /* write default channel status bytes */ |
267 | buf[0] = ((unsigned char)(SNDRV_PCM_DEFAULT_CON_SPDIF >> 0)); | 268 | put_unaligned_le32(SNDRV_PCM_DEFAULT_CON_SPDIF, buf); |
268 | buf[1] = ((unsigned char)(SNDRV_PCM_DEFAULT_CON_SPDIF >> 8)); | ||
269 | buf[2] = ((unsigned char)(SNDRV_PCM_DEFAULT_CON_SPDIF >> 16)); | ||
270 | buf[3] = ((unsigned char)(SNDRV_PCM_DEFAULT_CON_SPDIF >> 24)); | ||
271 | memset(buf + 4, 0, 24 - 4); | 269 | memset(buf + 4, 0, 24 - 4); |
272 | if (snd_cs8427_send_corudata(device, 0, buf, 24) < 0) | 270 | if (snd_cs8427_send_corudata(device, 0, buf, 24) < 0) |
273 | goto __fail; | 271 | goto __fail; |