clk: wm831x: Initialise wm831x pointer on init
commit 08442ce993 upstream.
Otherwise any attempt to interact with the hardware will crash. This is
what happens when drivers get written blind.
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
497587f84f
commit
d662986b4f
1 changed files with 2 additions and 0 deletions
|
|
@ -360,6 +360,8 @@ static int wm831x_clk_probe(struct platform_device *pdev)
|
|||
if (!clkdata)
|
||||
return -ENOMEM;
|
||||
|
||||
clkdata->wm831x = wm831x;
|
||||
|
||||
/* XTAL_ENA can only be set via OTP/InstantConfig so just read once */
|
||||
ret = wm831x_reg_read(wm831x, WM831X_CLOCK_CONTROL_2);
|
||||
if (ret < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue