c97adf9e7b
The ids field of the struct acpi_driver is constant in <linux/acpi/acpi_bus.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Len Brown <len.brown@intel.com> |
||
---|---|---|
.. | ||
acpica | ||
ac.c | ||
acpi_memhotplug.c | ||
acpi_pad.c | ||
battery.c | ||
blacklist.c | ||
bus.c | ||
button.c | ||
cm_sbs.c | ||
container.c | ||
debug.c | ||
dock.c | ||
ec.c | ||
event.c | ||
fan.c | ||
glue.c | ||
hest.c | ||
internal.h | ||
Kconfig | ||
Makefile | ||
numa.c | ||
osl.c | ||
pci_bind.c | ||
pci_irq.c | ||
pci_link.c | ||
pci_root.c | ||
pci_slot.c | ||
power_meter.c | ||
power.c | ||
proc.c | ||
processor_core.c | ||
processor_idle.c | ||
processor_pdc.c | ||
processor_perflib.c | ||
processor_thermal.c | ||
processor_throttling.c | ||
reboot.c | ||
sbs.c | ||
sbshc.c | ||
sbshc.h | ||
scan.c | ||
sleep.c | ||
sleep.h | ||
system.c | ||
tables.c | ||
thermal.c | ||
utils.c | ||
video_detect.c | ||
video.c | ||
wakeup.c |