Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114294
b: refs/heads/master
c: 9201d38
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown authored and Liam Girdwood committed Oct 13, 2008
1 parent ab4d05a commit 5883e8e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da09155ac8d3f04c299b3d82a6ab0df8d03da632
refs/heads/master: 9201d38b97c7de1b8e6e40449745acf456cff437
26 changes: 26 additions & 0 deletions trunk/drivers/mfd/wm8350-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,32 @@ static int wm8350_create_cache(struct wm8350 *wm8350, int mode)
}
EXPORT_SYMBOL_GPL(wm8350_create_cache);

/*
* Register a client device. This is non-fatal since there is no need to
* fail the entire device init due to a single platform device failing.
*/
static void wm8350_client_dev_register(struct wm8350 *wm8350,
const char *name,
struct platform_device **pdev)
{
int ret;

*pdev = platform_device_alloc(name, -1);
if (pdev == NULL) {
dev_err(wm8350->dev, "Failed to allocate %s\n", name);
return;
}

(*pdev)->dev.parent = wm8350->dev;
platform_set_drvdata(*pdev, wm8350);
ret = platform_device_add(*pdev);
if (ret != 0) {
dev_err(wm8350->dev, "Failed to register %s: %d\n", name, ret);
platform_device_put(*pdev);
*pdev = NULL;
}
}

int wm8350_device_init(struct wm8350 *wm8350, int irq,
struct wm8350_platform_data *pdata)
{
Expand Down

0 comments on commit 5883e8e

Please sign in to comment.