clk: wm831x: Initialise wm831x pointer on init
Subsystems (2)
PATCH 1/1 clk: wm831x: Initialise wm831x pointer on init
From: Mark Brown <[email protected]>
Otherwise any attempt to interact with the hardware will crash. This is what happens when drivers get written blind.
Signed-off-by Mark Brown <[email protected]>
Cc stable at vger.kernel.org
--- drivers/clk/clk-wm831x.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clk/clk-wm831x.c +2 -0
@@ -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 ) {
Signature · 1 line
1.8.4.rc3
PATCH 1/1 clk: wm831x: Initialise wm831x pointer on init
Quoting Mark Brown (2013-08-29 04:21:01)
Quoted 4 lines
From: Mark Brown <[email protected]>
Otherwise any attempt to interact with the hardware will crash. This is what happens when drivers get written blind.
Taken into clk-next.
Regards,
Mike
Quoted 22 lines
Signed-off-by Mark Brown <[email protected]>Cc stable at vger.kernel.org--- drivers/clk/clk-wm831x.c | 2 ++ 1 file changed, 2 insertions(+)drivers/clk/clk-wm831x.c +2
-0@@ -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 ) {Signature · 1 line
1.8.4.rc3