Skip to content

Commit 0fb9f68

Browse files
bvanasschegregkh
authored andcommitted
ACPI: Fix CONFIG_ACPI_DOCK=n compiler warning
commit c1056b4 upstream. Recently the ACPI ops structs were constified but the inline version of register_hotplug_dock_device() was overlooked (see also commit 9c8b04b, June 25 2011). Update the inline function register_hotplug_dock_device() that is enabled with CONFIG_ACPI_DOCK=n too. This patch fixes at least the following compiler warnings: drivers/ata/libata-acpi.c: In function .ata_acpi_associate.: drivers/ata/libata-acpi.c:266:11: warning: passing argument 2 of .register_hotplug_dock_device. discards qualifiers from pointer target type include/acpi/acpi_drivers.h:146:19: note: expected .struct acpi_dock_ops *. but argument is of type .const struct acpi_dock_ops *. drivers/ata/libata-acpi.c:275:11: warning: passing argument 2 of .register_hotplug_dock_device. discards qualifiers from pointer target type include/acpi/acpi_drivers.h:146:19: note: expected .struct acpi_dock_ops *. but argument is of type .const struct acpi_dock_ops *. Signed-off-by: Len Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 97a83dd commit 0fb9f68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/acpi/acpi_drivers.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static inline void unregister_dock_notifier(struct notifier_block *nb)
144144
{
145145
}
146146
static inline int register_hotplug_dock_device(acpi_handle handle,
147-
struct acpi_dock_ops *ops,
147+
const struct acpi_dock_ops *ops,
148148
void *context)
149149
{
150150
return -ENODEV;

0 commit comments

Comments
 (0)