From 62b67a5805d3f5d1cf84fbef2cb25983464f63e4 Mon Sep 17 00:00:00 2001 From: Alan Tull Date: Wed, 4 Nov 2009 20:28:36 -0600 Subject: ENGR00118016-3 wm8580: update to 2.6.31 wm8580 is using regulators that can't change state. The regulator driver doesn't handle this case well so it crashes during regulator_bulk_enable. Eventually this will be fixed in the regulator driver. For now, remove regulators from list in wm8580 driver. Fix spi_rw err. hw_write needs to return transferred data length. Signed-off-by: Alan Tull Signed-off-by: Wallace Wang --- sound/soc/codecs/wm8580.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index e314f3cf9ba6..f6627793d98b 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -192,11 +192,8 @@ struct pll_state { unsigned int out; }; -#define WM8580_NUM_SUPPLIES 3 +#define WM8580_NUM_SUPPLIES 0 static const char *wm8580_supply_names[WM8580_NUM_SUPPLIES] = { - "AVDD", - "DVDD", - "PVDD", }; /* codec private data */ @@ -1086,6 +1083,7 @@ static struct i2c_driver wm8580_i2c_driver = { */ static inline int spi_rw(void *control_data, char *data, int length) { + int ret; struct spi_transfer t = { .tx_buf = (const void *)data, .rx_buf = (void *)data, @@ -1100,7 +1098,11 @@ static inline int spi_rw(void *control_data, char *data, int length) spi_message_init(&m); spi_message_add_tail(&t, &m); - return spi_sync((struct spi_device *)control_data, &m); + ret = spi_sync((struct spi_device *)control_data, &m); + if (unlikely(ret < 0)) + return ret; + else + return length; } -- cgit v1.2.3