ACPI / PNP: constify device IDs
PATCH RESEND 1/1 ACPI / PNP: constify device IDs
Instead of re-creating the array on the stack each time is_cmos_rtc_device() gets called, make the array 'static const'.
Signed-off-by Mathias Krause <[email protected]>
---
This is a resend of patch 4/12 of [1], in case it got forgotten in the meantime.
[1] http://thread.gmane.org/gmane.linux.acpi.devel/76528
drivers/acpi/acpi_pnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpi_pnp.c +1 -1
@@ -368,7 +368,7 @@ static struct acpi_scan_handler acpi_pnp_handler = {*/ static int is_cmos_rtc_device (struct acpi_device *adev) { -struct acpi_device_id ids[] = { +static const struct acpi_device_id ids[] = { {"PNP0B00" }, {"PNP0B01" }, {"PNP0B02" },
Signature · 1 line
1.7.10.4
Rafael J. Wysocki
AppliedQuoted 4 lines · Mathias Krause
Instead of re-creating the array on the stack each time
is_cmos_rtc_device()gets called, make the array 'static const'.Signed-off-by Mathias Krause <[email protected]>
Applied, thanks!
Rafael