linux/drivers/macintosh
Julia Lawall de854e54d7 powerpc/macintosh: constify wf_sensor_ops structures
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-01 16:42:54 +10:00
..
ams
adb-iop.c
adb.c adb: get rid of pointless access_ok() 2017-06-04 13:57:24 -04:00
adbhid.c
ans-lcd.c
ans-lcd.h
apm_emu.c
Kconfig
mac_hid.c
macio_asic.c macintosh: use dev_groups and not dev_attrs for bus_type 2017-06-09 11:00:46 +02:00
macio_sysfs.c macintosh: Convert to using %pOF instead of full_name 2017-09-01 16:42:52 +10:00
macio-adb.c
Makefile
mediabay.c
rack-meter.c macintosh: Convert to using %pOF instead of full_name 2017-09-01 16:42:52 +10:00
smu.c macintosh: Convert to using %pOF instead of full_name 2017-09-01 16:42:52 +10:00
therm_adt746x.c
therm_windtunnel.c
via-cuda.c macintosh: Convert to using %pOF instead of full_name 2017-09-01 16:42:52 +10:00
via-macii.c drivers: Clean up duplicated email address 2017-03-24 15:49:56 +01:00
via-pmu68k.c
via-pmu-backlight.c
via-pmu-event.c
via-pmu-event.h
via-pmu-led.c
via-pmu.c
windfarm_ad7417_sensor.c
windfarm_core.c
windfarm_cpufreq_clamp.c drivers/macintosh: Make wf_control_ops and wf_pid_param const 2017-08-14 21:57:56 +10:00
windfarm_fcu_controls.c macintosh: Convert to using %pOF instead of full_name 2017-09-01 16:42:52 +10:00
windfarm_lm75_sensor.c powerpc/macintosh: constify wf_sensor_ops structures 2017-09-01 16:42:54 +10:00
windfarm_lm87_sensor.c powerpc/macintosh: constify wf_sensor_ops structures 2017-09-01 16:42:54 +10:00
windfarm_max6690_sensor.c powerpc/macintosh: constify wf_sensor_ops structures 2017-09-01 16:42:54 +10:00
windfarm_mpu.h
windfarm_pid.c
windfarm_pid.h
windfarm_pm72.c
windfarm_pm81.c
windfarm_pm91.c
windfarm_pm112.c
windfarm_pm121.c
windfarm_rm31.c drivers/macintosh: Make wf_control_ops and wf_pid_param const 2017-08-14 21:57:56 +10:00
windfarm_smu_controls.c drivers/macintosh: Make wf_control_ops and wf_pid_param const 2017-08-14 21:57:56 +10:00
windfarm_smu_sat.c powerpc/macintosh: constify wf_sensor_ops structures 2017-09-01 16:42:54 +10:00
windfarm_smu_sensors.c powerpc/macintosh: constify wf_sensor_ops structures 2017-09-01 16:42:54 +10:00
windfarm.h