]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: LPSS: Replace loop with first entry retrieval
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 29 Aug 2022 14:11:28 +0000 (17:11 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 30 Sep 2022 18:51:07 +0000 (20:51 +0200)
commitf152847676075fd4cd743a3aa0b0783ed2e448f7
tree4746b6b2d230b43e1342d73c1c867de6e12e7476
parentfb0fb803ae5358d434839547ee25a3617c16e689
ACPI: LPSS: Replace loop with first entry retrieval

After the commit 6505e452371d ("ACPI: LPSS: Use the helper
acpi_dev_get_memory_resources()") the list is empty or
contains only resource of IORESOURCE_MEM type. Hence, no
need to check for the type, and since we break after the
first found, no need to iterate over full list. That said,
replace loop with first entry retrieval.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_lpss.c