ACPI: constify ops structs
Structs battery_file, acpi_dock_ops, file_operations, thermal_cooling_device_ops, thermal_zone_device_ops, kernel_param_ops are not changed in runtime. It is safe to make them const. register_hotplug_dock_device() was altered to take const "ops" argument to respect acpi_dock_ops' const notion. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:

committed by
Len Brown

parent
e545b55a1e
commit
9c8b04be44
@@ -110,7 +110,7 @@ static int post_dock_fixups(struct notifier_block *nb, unsigned long val,
|
||||
}
|
||||
|
||||
|
||||
static struct acpi_dock_ops acpiphp_dock_ops = {
|
||||
static const struct acpi_dock_ops acpiphp_dock_ops = {
|
||||
.handler = handle_hotplug_event_func,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user