Skip to content

Commit b862e66

Browse files
committed
ACPI: scan: Clean up after recent changes
Use LIST_HEAD() for initializing an on-stack list head in two places and remove an empty code line added by mistake. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/12825056.O9o76ZdvQC@rafael.j.wysocki
1 parent 57c31e6 commit b862e66

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/acpi/acpi_platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
136136
}
137137

138138
if (adev->device_type == ACPI_BUS_TYPE_DEVICE && !adev->pnp.type.backlight) {
139-
struct list_head resource_list = LIST_HEAD_INIT(resource_list);
139+
LIST_HEAD(resource_list);
140140

141141
count = acpi_dev_get_resources(adev, &resource_list, NULL, NULL);
142142
if (count < 0)

drivers/acpi/scan.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2594,8 +2594,8 @@ static void acpi_scan_postponed(void)
25942594

25952595
static void acpi_scan_claim_resources(struct acpi_device *adev)
25962596
{
2597-
struct list_head resource_list = LIST_HEAD_INIT(resource_list);
25982597
struct resource_entry *rentry;
2598+
LIST_HEAD(resource_list);
25992599
unsigned int count = 0;
26002600
const char *regionid;
26012601

@@ -2652,7 +2652,6 @@ static void acpi_scan_claim_resources(struct acpi_device *adev)
26522652
acpi_dev_free_resource_list(&resource_list);
26532653
}
26542654

2655-
26562655
static int __init acpi_reserve_motherboard_resources(void)
26572656
{
26582657
struct acpi_scan_system_dev *sd, *tmp;

0 commit comments

Comments
 (0)