ALSA: via82xx: Fix endianness annotations
[linux-2.6-microblaze.git] / sound / pci / via82xx_modem.c
index 84e5898..607b710 100644 (file)
@@ -267,6 +267,7 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
 {
        unsigned int i, idx, ofs, rest;
        struct via82xx_modem *chip = snd_pcm_substream_chip(substream);
+       __le32 *pgtbl;
 
        if (dev->table.area == NULL) {
                /* the start of each lists must be aligned to 8 bytes,
@@ -288,6 +289,7 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
        /* fill the entries */
        idx = 0;
        ofs = 0;
+       pgtbl = (__le32 *)dev->table.area;
        for (i = 0; i < periods; i++) {
                rest = fragsize;
                /* fill descriptors for a period.
@@ -304,7 +306,7 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
                                return -EINVAL;
                        }
                        addr = snd_pcm_sgbuf_get_addr(substream, ofs);
-                       ((u32 *)dev->table.area)[idx << 1] = cpu_to_le32(addr);
+                       pgtbl[idx << 1] = cpu_to_le32(addr);
                        r = PAGE_SIZE - (ofs % PAGE_SIZE);
                        if (rest < r)
                                r = rest;
@@ -321,7 +323,7 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
                                "tbl %d: at %d  size %d (rest %d)\n",
                                idx, ofs, r, rest);
                        */
-                       ((u32 *)dev->table.area)[(idx<<1) + 1] = cpu_to_le32(r | flag);
+                       pgtbl[(idx<<1) + 1] = cpu_to_le32(r | flag);
                        dev->idx_table[idx].offset = ofs;
                        dev->idx_table[idx].size = r;
                        ofs += r;