]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - sound/ppc/tumbler.c
[PATCH] powerpc: Fix sound driver use of i2c
[linux-2.6.git] / sound / ppc / tumbler.c
index 15c63cb2ccba6d432d05cb44fdae84d189aa09e9..838fc113c441113ed36302f252561500f380892e 100644 (file)
@@ -239,8 +239,8 @@ static int tumbler_set_master_volume(struct pmac_tumbler *mix)
        block[4] = (right_vol >> 8)  & 0xff;
        block[5] = (right_vol >> 0)  & 0xff;
   
-       if (i2c_smbus_write_block_data(mix->i2c.client, TAS_REG_VOL,
-                                      6, block) < 0) {
+       if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_VOL, 6,
+                                          block) < 0) {
                snd_printk("failed to set volume \n");
                return -EINVAL;
        }
@@ -345,8 +345,8 @@ static int tumbler_set_drc(struct pmac_tumbler *mix)
                val[1] = 0;
        }
 
-       if (i2c_smbus_write_block_data(mix->i2c.client, TAS_REG_DRC,
-                                      2, val) < 0) {
+       if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC,
+                                          2, val) < 0) {
                snd_printk("failed to set DRC\n");
                return -EINVAL;
        }
@@ -381,8 +381,8 @@ static int snapper_set_drc(struct pmac_tumbler *mix)
        val[4] = 0x60;
        val[5] = 0xa0;
 
-       if (i2c_smbus_write_block_data(mix->i2c.client, TAS_REG_DRC,
-                                      6, val) < 0) {
+       if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC,
+                                          6, val) < 0) {
                snd_printk("failed to set DRC\n");
                return -EINVAL;
        }
@@ -492,8 +492,8 @@ static int tumbler_set_mono_volume(struct pmac_tumbler *mix,
        vol = info->table[vol];
        for (i = 0; i < info->bytes; i++)
                block[i] = (vol >> ((info->bytes - i - 1) * 8)) & 0xff;
-       if (i2c_smbus_write_block_data(mix->i2c.client, info->reg,
-                                      info->bytes, block) < 0) {
+       if (i2c_smbus_write_i2c_block_data(mix->i2c.client, info->reg,
+                                          info->bytes, block) < 0) {
                snd_printk("failed to set mono volume %d\n", info->index);
                return -EINVAL;
        }
@@ -625,7 +625,8 @@ static int snapper_set_mix_vol1(struct pmac_tumbler *mix, int idx, int ch, int r
                for (j = 0; j < 3; j++)
                        block[i * 3 + j] = (vol >> ((2 - j) * 8)) & 0xff;
        }
-       if (i2c_smbus_write_block_data(mix->i2c.client, reg, 9, block) < 0) {
+       if (i2c_smbus_write_i2c_block_data(mix->i2c.client, reg,
+                                          9, block) < 0) {
                snd_printk("failed to set mono volume %d\n", reg);
                return -EINVAL;
        }