Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283757
b: refs/heads/master
c: e4e4c18
h: refs/heads/master
i:
  283755: ec943d4
v: v3
  • Loading branch information
Stephen Warren authored and Mark Brown committed Nov 23, 2011
1 parent 6f46b18 commit 42e26fd
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: 186bcda6f6217dc4b5353c3474121bc1194847f6
refs/heads/master: e4e4c18a930ff11940ba2c525676566bd631706f
26 changes: 7 additions & 19 deletions trunk/sound/soc/tegra/tegra_wm8903.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,17 +390,19 @@ static __devinit int tegra_wm8903_driver_probe(struct platform_device *pdev)
return -EINVAL;
}

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

machine->pdata = pdata;

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

card->dev = &pdev->dev;
platform_set_drvdata(pdev, card);
Expand Down Expand Up @@ -431,8 +433,7 @@ static __devinit int tegra_wm8903_driver_probe(struct platform_device *pdev)

err_fini_utils:
tegra_asoc_utils_fini(&machine->util_data);
err_free_machine:
kfree(machine);
err:
return ret;
}

Expand Down Expand Up @@ -460,8 +461,6 @@ static int __devexit tegra_wm8903_driver_remove(struct platform_device *pdev)

tegra_asoc_utils_fini(&machine->util_data);

kfree(machine);

return 0;
}

Expand All @@ -474,18 +473,7 @@ static struct platform_driver tegra_wm8903_driver = {
.probe = tegra_wm8903_driver_probe,
.remove = __devexit_p(tegra_wm8903_driver_remove),
};

static int __init tegra_wm8903_modinit(void)
{
return platform_driver_register(&tegra_wm8903_driver);
}
module_init(tegra_wm8903_modinit);

static void __exit tegra_wm8903_modexit(void)
{
platform_driver_unregister(&tegra_wm8903_driver);
}
module_exit(tegra_wm8903_modexit);
module_platform_driver(tegra_wm8903_driver);

MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>");
MODULE_DESCRIPTION("Tegra+WM8903 machine ASoC driver");
Expand Down

0 comments on commit 42e26fd

Please sign in to comment.