Skip to contentSkip to conversation

ACPI / PNP: constify device IDs

PATCH RESEND Applied Mathias Krause 2 participants 2 messages Jan 2, 2016 – Jan 5, 2016 ACPI

lore
Share & tools
lore
#0 lore raw

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'.

---
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
index ff6d8adc9cda..9d20ba66d33b 100644
@@ -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