소스 검색

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 <minipli@googlemail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Mathias Krause 9 년 전
부모
커밋
38a234b9f0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/acpi/acpi_pnp.c

+ 1 - 1
drivers/acpi/acpi_pnp.c

@@ -367,7 +367,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" },