|
@@ -388,7 +388,8 @@ out:
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(wm8350_create_cache);
|
|
EXPORT_SYMBOL_GPL(wm8350_create_cache);
|
|
|
|
|
|
-int wm8350_device_init(struct wm8350 *wm8350)
|
|
|
|
|
|
+int wm8350_device_init(struct wm8350 *wm8350,
|
|
|
|
+ struct wm8350_platform_data *pdata)
|
|
{
|
|
{
|
|
int ret = -EINVAL;
|
|
int ret = -EINVAL;
|
|
u16 id1, id2, mask, mode;
|
|
u16 id1, id2, mask, mode;
|
|
@@ -439,6 +440,15 @@ int wm8350_device_init(struct wm8350 *wm8350)
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (pdata->init) {
|
|
|
|
+ ret = pdata->init(wm8350);
|
|
|
|
+ if (ret != 0) {
|
|
|
|
+ dev_err(wm8350->dev, "Platform init() failed: %d\n",
|
|
|
|
+ ret);
|
|
|
|
+ goto err;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
err:
|
|
err:
|