mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ASoC: Remove wm8974 private data
It's only ever referenced when being allocated and freed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
a2bd691c64
commit
c2562a8e3b
1 changed files with 2 additions and 14 deletions
|
@ -48,10 +48,6 @@ static const u16 wm8974_reg[WM8974_CACHEREGNUM] = {
|
||||||
#define WM8974_POWER1_BIASEN 0x08
|
#define WM8974_POWER1_BIASEN 0x08
|
||||||
#define WM8974_POWER1_BUFIOEN 0x04
|
#define WM8974_POWER1_BUFIOEN 0x04
|
||||||
|
|
||||||
struct wm8974_priv {
|
|
||||||
enum snd_soc_control_type control_type;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define wm8974_reset(c) snd_soc_write(c, WM8974_RESET, 0)
|
#define wm8974_reset(c) snd_soc_write(c, WM8974_RESET, 0)
|
||||||
|
|
||||||
static const char *wm8974_companding[] = {"Off", "NC", "u-law", "A-law" };
|
static const char *wm8974_companding[] = {"Off", "NC", "u-law", "A-law" };
|
||||||
|
@ -632,26 +628,18 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8974 = {
|
||||||
static __devinit int wm8974_i2c_probe(struct i2c_client *i2c,
|
static __devinit int wm8974_i2c_probe(struct i2c_client *i2c,
|
||||||
const struct i2c_device_id *id)
|
const struct i2c_device_id *id)
|
||||||
{
|
{
|
||||||
struct wm8974_priv *wm8974;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
wm8974 = kzalloc(sizeof(struct wm8974_priv), GFP_KERNEL);
|
|
||||||
if (wm8974 == NULL)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
i2c_set_clientdata(i2c, wm8974);
|
|
||||||
|
|
||||||
ret = snd_soc_register_codec(&i2c->dev,
|
ret = snd_soc_register_codec(&i2c->dev,
|
||||||
&soc_codec_dev_wm8974, &wm8974_dai, 1);
|
&soc_codec_dev_wm8974, &wm8974_dai, 1);
|
||||||
if (ret < 0)
|
|
||||||
kfree(wm8974);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static __devexit int wm8974_i2c_remove(struct i2c_client *client)
|
static __devexit int wm8974_i2c_remove(struct i2c_client *client)
|
||||||
{
|
{
|
||||||
snd_soc_unregister_codec(&client->dev);
|
snd_soc_unregister_codec(&client->dev);
|
||||||
kfree(i2c_get_clientdata(client));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue