]> 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)
commitdb364713322cf6ce56ae5572b220180b9c55a6f9
tree4746b6b2d230b43e1342d73c1c867de6e12e7476
parentfed7736a988b87df1ff212142586b517e14de1c7
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