diff options
-rw-r--r-- | sound/soc/soc-cache.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index 83cd8ed944b..b856177ea28 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c @@ -584,11 +584,19 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, #endif if (io_types[i].i2c_read) codec->hw_read = io_types[i].i2c_read; + + codec->control_data = container_of(codec->dev, + struct i2c_client, + dev); break; case SND_SOC_SPI: if (io_types[i].spi_write) codec->hw_write = io_types[i].spi_write; + + codec->control_data = container_of(codec->dev, + struct spi_device, + dev); break; } |