Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284033
b: refs/heads/master
c: 6e4f17c
h: refs/heads/master
i:
  284031: cc028c4
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Dec 28, 2011
1 parent ff67223 commit 6435b3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 80c2f9da4ecba2ba2ab65ddc058190b1be28d9e5
refs/heads/master: 6e4f17cb2b7e8a5327ccc5a6a32442acd408c190
7 changes: 3 additions & 4 deletions trunk/sound/soc/codecs/ad1836.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ static int __devinit ad1836_spi_probe(struct spi_device *spi)
struct ad1836_priv *ad1836;
int ret;

ad1836 = kzalloc(sizeof(struct ad1836_priv), GFP_KERNEL);
ad1836 = devm_kzalloc(&spi->dev, sizeof(struct ad1836_priv),
GFP_KERNEL);
if (ad1836 == NULL)
return -ENOMEM;

Expand All @@ -351,17 +352,15 @@ static int __devinit ad1836_spi_probe(struct spi_device *spi)

ret = snd_soc_register_codec(&spi->dev,
&soc_codec_dev_ad1836, &ad183x_dais[ad1836->type], 1);
if (ret < 0)
kfree(ad1836);
return ret;
}

static int __devexit ad1836_spi_remove(struct spi_device *spi)
{
snd_soc_unregister_codec(&spi->dev);
kfree(spi_get_drvdata(spi));
return 0;
}

static const struct spi_device_id ad1836_ids[] = {
{ "ad1835", AD1835 },
{ "ad1836", AD1836 },
Expand Down

0 comments on commit 6435b3c

Please sign in to comment.