Title: [7941] trunk/sound/soc/codecs/adau1371.c: bug[#5741]implement the new I2C read method
- Revision
- 7941
- Author
- cliff
- Date
- 2009-12-07 04:36:28 -0500 (Mon, 07 Dec 2009)
Log Message
bug[#5741]implement the new I2C read method
Modified Paths
Diff
Modified: trunk/sound/soc/codecs/adau1371.c (7940 => 7941)
--- trunk/sound/soc/codecs/adau1371.c 2009-12-07 09:09:55 UTC (rev 7940)
+++ trunk/sound/soc/codecs/adau1371.c 2009-12-07 09:36:28 UTC (rev 7941)
@@ -89,11 +89,7 @@
dev_err(codec->dev, "writing to 0x%x failed.\n", reg);
return -EIO;
}
- /* perform the read */
- if (codec->hw_read(codec->control_data, buf, 1) != 1) {
- dev_err(codec->dev, "hw_read failed.\n");
- return -EIO;
- }
+ buf[0] = i2c_smbus_read_byte_data(codec->control_data, buf[0]);
adau1371_write_reg_cache(codec, reg, (unsigned int)buf[0]);
return 0;
}
@@ -1086,7 +1082,6 @@
codec = &adau1371->codec;
codec->private_data = adau1371;
codec->hw_write = (hw_write_t)i2c_master_send;
- codec->hw_read = (hw_read_t)i2c_master_recv;
i2c_set_clientdata(i2c, adau1371);
codec->control_data = i2c;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits