diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-29 06:11:25 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-20 08:58:22 -0500 |
commit | c2562a8e3b5f871ad0b73caf98bb7541e8724efc (patch) | |
tree | cb11f3c277ad2421b522cb394230c64f7c0610a1 /sound/soc/codecs/wm8974.c | |
parent | a2bd691c64383ab290732d771a7404e26c0b9d53 (diff) |
ASoC: Remove wm8974 private data
It's only ever referenced when being allocated and freed.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8974.c')
-rw-r--r-- | sound/soc/codecs/wm8974.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index 1e7a87a56168..d93c03f820c9 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
@@ -48,10 +48,6 @@ static const u16 wm8974_reg[WM8974_CACHEREGNUM] = { | |||
48 | #define WM8974_POWER1_BIASEN 0x08 | 48 | #define WM8974_POWER1_BIASEN 0x08 |
49 | #define WM8974_POWER1_BUFIOEN 0x04 | 49 | #define WM8974_POWER1_BUFIOEN 0x04 |
50 | 50 | ||
51 | struct wm8974_priv { | ||
52 | enum snd_soc_control_type control_type; | ||
53 | }; | ||
54 | |||
55 | #define wm8974_reset(c) snd_soc_write(c, WM8974_RESET, 0) | 51 | #define wm8974_reset(c) snd_soc_write(c, WM8974_RESET, 0) |
56 | 52 | ||
57 | static const char *wm8974_companding[] = {"Off", "NC", "u-law", "A-law" }; | 53 | 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 = { | |||
632 | static __devinit int wm8974_i2c_probe(struct i2c_client *i2c, | 628 | static __devinit int wm8974_i2c_probe(struct i2c_client *i2c, |
633 | const struct i2c_device_id *id) | 629 | const struct i2c_device_id *id) |
634 | { | 630 | { |
635 | struct wm8974_priv *wm8974; | ||
636 | int ret; | 631 | int ret; |
637 | 632 | ||
638 | wm8974 = kzalloc(sizeof(struct wm8974_priv), GFP_KERNEL); | ||
639 | if (wm8974 == NULL) | ||
640 | return -ENOMEM; | ||
641 | |||
642 | i2c_set_clientdata(i2c, wm8974); | ||
643 | |||
644 | ret = snd_soc_register_codec(&i2c->dev, | 633 | ret = snd_soc_register_codec(&i2c->dev, |
645 | &soc_codec_dev_wm8974, &wm8974_dai, 1); | 634 | &soc_codec_dev_wm8974, &wm8974_dai, 1); |
646 | if (ret < 0) | 635 | |
647 | kfree(wm8974); | ||
648 | return ret; | 636 | return ret; |
649 | } | 637 | } |
650 | 638 | ||
651 | static __devexit int wm8974_i2c_remove(struct i2c_client *client) | 639 | static __devexit int wm8974_i2c_remove(struct i2c_client *client) |
652 | { | 640 | { |
653 | snd_soc_unregister_codec(&client->dev); | 641 | snd_soc_unregister_codec(&client->dev); |
654 | kfree(i2c_get_clientdata(client)); | 642 | |
655 | return 0; | 643 | return 0; |
656 | } | 644 | } |
657 | 645 | ||