WSL2-Linux-Kernel/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 drivers/macintosh: Delete owner assignment 2016-08-22 11:09:33 +10:00
Kconfig m68k/mac: Replace via-maciisi driver with via-cuda driver 2017-02-07 16:56:25 +11:00
Makefile m68k/mac: Replace via-maciisi driver with via-cuda driver 2017-02-07 16:56:25 +11:00
adb-iop.c drivers/macintosh/adb-iop.c: flags should be unsigned long 2010-11-12 07:55:30 -08:00
adb.c adb: get rid of pointless access_ok() 2017-06-04 13:57:24 -04:00
adbhid.c Fix common misspellings 2011-03-31 11:26:23 -03:00
ans-lcd.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
ans-lcd.h [POWERPC] Copy over headers from arch/ppc to arch/powerpc that we need 2007-08-22 22:43:29 -05:00
apm_emu.c [POWERPC] apm_emu: Use generic apm-emulation 2007-05-02 16:42:19 +10:00
mac_hid.c macintosh: Convert use of typedef ctl_table to struct ctl_table 2013-07-01 11:10:35 +10:00
macio-adb.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
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
mediabay.c Drivers: macintosh: remove __dev* attributes. 2013-01-03 15:57:14 -08:00
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 powerpc/pmac: Convert therm_adt746x to new i2c probing 2012-04-30 15:37:18 +10:00
therm_windtunnel.c macintosh/therm_windtunnel: Export OF module alias information 2015-08-20 16:15:20 +10:00
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-pmu-backlight.c backlight: Remove trivial get_brightness implementations 2014-06-23 13:24:22 +01:00
via-pmu-event.c Input: via-pmu - add input device support 2006-06-26 01:49:55 -04:00
via-pmu-event.h Input: via-pmu - add input device support 2006-06-26 01:49:55 -04:00
via-pmu-led.c powerpc: use the new LED disk activity trigger 2016-06-27 08:58:40 +02:00
via-pmu.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
via-pmu68k.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
windfarm.h windfarm: remove three exported but unused functions 2015-08-06 15:10:21 +10:00
windfarm_ad7417_sensor.c Drivers: macintosh: remove __dev* attributes. 2013-01-03 15:57:14 -08:00
windfarm_core.c Make static usermode helper binaries constant 2017-01-19 12:59:45 +01:00
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 powerpc/powermac: New windfarm driver for PowerMac G5 (AGP) and Xserve G5 2012-04-30 15:37:25 +10:00
windfarm_pid.c [PATCH] windfarm license fix 2006-03-06 18:40:45 -08:00
windfarm_pid.h [PATCH] powerpc: Thermal control for dual core G5s 2006-02-07 22:05:14 -08:00
windfarm_pm72.c drivers/macintosh: Delete owner assignment 2016-08-22 11:09:33 +10:00
windfarm_pm81.c macintosh: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
windfarm_pm91.c macintosh: drop owner assignment from platform_drivers 2014-10-20 16:20:43 +02:00
windfarm_pm112.c drivers/macintosh: Delete owner assignment 2016-08-22 11:09:33 +10:00
windfarm_pm121.c macintosh/windfarm_pm121.c: Fix for possible null pointer dereference 2014-05-20 10:56:00 +10:00
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