From mboxrd@z Thu Jan 1 00:00:00 1970 From: mturquette@linaro.org (Mike Turquette) Date: Fri, 30 Aug 2013 12:39:06 -0700 Subject: [PATCH] clk: wm831x: Initialise wm831x pointer on init In-Reply-To: <1377775261-3190-1-git-send-email-broonie@kernel.org> References: <1377775261-3190-1-git-send-email-broonie@kernel.org> Message-ID: <20130830193906.10934.31659@quantum> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Quoting Mark Brown (2013-08-29 04:21:01) > From: Mark Brown > > 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 > > Signed-off-by: Mark Brown > Cc: stable at vger.kernel.org > --- > drivers/clk/clk-wm831x.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c > index 1b3f8c9..1d5af3f 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) > 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) { > -- > 1.8.4.rc3