Skip to content

Commit d2b27d8

Browse files
andy-shevjwrdegoede
authored andcommitted
platform/x86: int3472: Use GPIO_LOOKUP() macro
Use GPIO_LOOKUP() macro which provides a compound literal and can be used with dynamic data. Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240822130722.1261891-4-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 66cb96a commit d2b27d8

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

drivers/platform/x86/intel/int3472/discrete.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,7 @@ static int skl_int3472_fill_gpiod_lookup(struct gpiod_lookup *table_entry,
6969
if (!adev)
7070
return -ENODEV;
7171

72-
table_entry->key = acpi_dev_name(adev);
73-
table_entry->chip_hwnum = agpio->pin_table[0];
74-
table_entry->con_id = func;
75-
table_entry->idx = 0;
76-
table_entry->flags = polarity;
72+
*table_entry = GPIO_LOOKUP(acpi_dev_name(adev), agpio->pin_table[0], func, polarity);
7773

7874
return 0;
7975
}

0 commit comments

Comments
 (0)