Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283758
b: refs/heads/master
c: 45c2609
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Warren authored and Mark Brown committed Nov 23, 2011
1 parent 42e26fd commit 4a47e6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 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: e4e4c18a930ff11940ba2c525676566bd631706f
refs/heads/master: 45c26091205eb6ad737329c5973f46fd7c122595
26 changes: 7 additions & 19 deletions trunk/sound/soc/tegra/trimslice.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,17 @@ static __devinit int tegra_snd_trimslice_probe(struct platform_device *pdev)
struct tegra_trimslice *trimslice;
int ret;

trimslice = kzalloc(sizeof(struct tegra_trimslice), GFP_KERNEL);
trimslice = devm_kzalloc(&pdev->dev, sizeof(struct tegra_trimslice),
GFP_KERNEL);
if (!trimslice) {
dev_err(&pdev->dev, "Can't allocate tegra_trimslice\n");
return -ENOMEM;
ret = -ENOMEM;
goto err;
}

ret = tegra_asoc_utils_init(&trimslice->util_data, &pdev->dev);
if (ret)
goto err_free_trimslice;
goto err;

card->dev = &pdev->dev;
platform_set_drvdata(pdev, card);
Expand All @@ -195,8 +197,7 @@ static __devinit int tegra_snd_trimslice_probe(struct platform_device *pdev)

err_fini_utils:
tegra_asoc_utils_fini(&trimslice->util_data);
err_free_trimslice:
kfree(trimslice);
err:
return ret;
}

Expand All @@ -209,8 +210,6 @@ static int __devexit tegra_snd_trimslice_remove(struct platform_device *pdev)

tegra_asoc_utils_fini(&trimslice->util_data);

kfree(trimslice);

return 0;
}

Expand All @@ -222,18 +221,7 @@ static struct platform_driver tegra_snd_trimslice_driver = {
.probe = tegra_snd_trimslice_probe,
.remove = __devexit_p(tegra_snd_trimslice_remove),
};

static int __init snd_tegra_trimslice_init(void)
{
return platform_driver_register(&tegra_snd_trimslice_driver);
}
module_init(snd_tegra_trimslice_init);

static void __exit snd_tegra_trimslice_exit(void)
{
platform_driver_unregister(&tegra_snd_trimslice_driver);
}
module_exit(snd_tegra_trimslice_exit);
module_platform_driver(tegra_snd_trimslice_driver);

MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
MODULE_DESCRIPTION("Trimslice machine ASoC driver");
Expand Down

0 comments on commit 4a47e6f

Please sign in to comment.