diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-29 07:21:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-26 20:18:30 -0400 |
commit | d662986b4f282ed5d9e42e6dbd5e6dbb2b5e7d0b (patch) | |
tree | 922d09dc2f43c18460f3a636fa7f1fd5b0eb54e4 | |
parent | 497587f84f16a5775b91d0a1051930ae8997d02d (diff) |
clk: wm831x: Initialise wm831x pointer on init
commit 08442ce993deeb15a070c14cc3f3459e87d111e0 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>
-rw-r--r-- | drivers/clk/clk-wm831x.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c index 16ed06808554..917a3ab482f9 100644 --- a/drivers/clk/clk-wm831x.c +++ b/drivers/clk/clk-wm831x.c | |||
@@ -360,6 +360,8 @@ static int wm831x_clk_probe(struct platform_device *pdev) | |||
360 | if (!clkdata) | 360 | if (!clkdata) |
361 | return -ENOMEM; | 361 | return -ENOMEM; |
362 | 362 | ||
363 | clkdata->wm831x = wm831x; | ||
364 | |||
363 | /* XTAL_ENA can only be set via OTP/InstantConfig so just read once */ | 365 | /* XTAL_ENA can only be set via OTP/InstantConfig so just read once */ |
364 | ret = wm831x_reg_read(wm831x, WM831X_CLOCK_CONTROL_2); | 366 | ret = wm831x_reg_read(wm831x, WM831X_CLOCK_CONTROL_2); |
365 | if (ret < 0) { | 367 | if (ret < 0) { |