summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/windfarm_lm87_sensor.c
AgeCommit message (Collapse)Author
2017-09-01powerpc/macintosh: constify wf_sensor_ops structuresJulia Lawall
The wf_sensor_ops structures are only stored in the ops field of a wf_sensor structure, which is declared as const. Thus the wf_sensor_ops structures themselves can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct wf_sensor_ops i@p = { ... }; @ok1@ identifier r.i; struct wf_sensor s; position p; @@ s.ops = &i@p @ok2@ identifier r.i; struct wf_sat_sensor s; position p; @@ s.sens.ops = &i@p @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct wf_sensor_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct wf_sensor_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-09-01macintosh: Convert to using %pOF instead of full_nameRob Herring
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> [mpe: Also convert the two cases inside #if 0] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2012-04-30powerpc/windfarm: Add lm87 sensorBenjamin Herrenschmidt
For use by the upcoming windfarm_rm31 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>