diff mbox

linux-next oops in windfarm startup

Message ID 1336435741.2540.184.camel@pasglop (mailing list archive)
State Accepted, archived
Commit 9525a08b30b1c8e39578938fc3420ac0b56f3a3d
Headers show

Commit Message

Benjamin Herrenschmidt May 8, 2012, 12:09 a.m. UTC
On Mon, 2012-05-07 at 08:57 -0700, Hugh Dickins wrote:
> Hi Ben,
> 
> 3.4.0-rc5-next-20120504 and 3.4.0-rc6-next-20120507
> crash while booting the PowerMac G5: I have to revert
> your commit e326b30fda9985a2e7fda6fb9212b86bf025c39
> powerpc/pmac: Convert windfarm_smu_sat to new i2c probing
> to get a working system.

Argh, stoopid me ... and I thought I had tested it .... just
on the wrong machine. Oh well try this and let me know:

powerpc/windfarm: Fix crash on SMU based machine after i2c conversion

We no longer get the device node in platform_data but instead
where it belongs in struct device, so get it from there instead
of blowing up.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

Comments

Hugh Dickins May 8, 2012, 1:13 a.m. UTC | #1
On Tue, 8 May 2012, Benjamin Herrenschmidt wrote:
> On Mon, 2012-05-07 at 08:57 -0700, Hugh Dickins wrote:
> > Hi Ben,
> > 
> > 3.4.0-rc5-next-20120504 and 3.4.0-rc6-next-20120507
> > crash while booting the PowerMac G5: I have to revert
> > your commit e326b30fda9985a2e7fda6fb9212b86bf025c39
> > powerpc/pmac: Convert windfarm_smu_sat to new i2c probing
> > to get a working system.
> 
> Argh, stoopid me ... and I thought I had tested it .... just
> on the wrong machine. Oh well try this and let me know:
> 
> powerpc/windfarm: Fix crash on SMU based machine after i2c conversion
> 
> We no longer get the device node in platform_data but instead
> where it belongs in struct device, so get it from there instead
> of blowing up.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Yep, that fixes it for me: thanks a lot!

Hugh

> ---
> 
> diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c
> index e2989ce..426e810 100644
> --- a/drivers/macintosh/windfarm_smu_sat.c
> +++ b/drivers/macintosh/windfarm_smu_sat.c
> @@ -204,7 +204,7 @@ static struct wf_sensor_ops wf_sat_ops = {
>  static int wf_sat_probe(struct i2c_client *client,
>  			const struct i2c_device_id *id)
>  {
> -	struct device_node *dev = client->dev.platform_data;
> +	struct device_node *dev = client->dev.of_node;
>  	struct wf_sat *sat;
>  	struct wf_sat_sensor *sens;
>  	const u32 *reg;
diff mbox

Patch

diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c
index e2989ce..426e810 100644
--- a/drivers/macintosh/windfarm_smu_sat.c
+++ b/drivers/macintosh/windfarm_smu_sat.c
@@ -204,7 +204,7 @@  static struct wf_sensor_ops wf_sat_ops = {
 static int wf_sat_probe(struct i2c_client *client,
 			const struct i2c_device_id *id)
 {
-	struct device_node *dev = client->dev.platform_data;
+	struct device_node *dev = client->dev.of_node;
 	struct wf_sat *sat;
 	struct wf_sat_sensor *sens;
 	const u32 *reg;