aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2024-08-22 16:05:40 +0300
committerHans de Goede <[email protected]>2024-09-04 15:04:01 +0200
commitd2b27d8eb8795736358706c3c5ab3b572f641d3a (patch)
tree48339b360f60794ca523c0c1cd1ea9c0479d9f7f
parent66cb96af8394e016df90f51c637b78b59e3429d7 (diff)
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 <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
-rw-r--r--drivers/platform/x86/intel/int3472/discrete.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
index 07b302e09340..89a97d2cd625 100644
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -69,11 +69,7 @@ static int skl_int3472_fill_gpiod_lookup(struct gpiod_lookup *table_entry,
if (!adev)
return -ENODEV;
- table_entry->key = acpi_dev_name(adev);
- table_entry->chip_hwnum = agpio->pin_table[0];
- table_entry->con_id = func;
- table_entry->idx = 0;
- table_entry->flags = polarity;
+ *table_entry = GPIO_LOOKUP(acpi_dev_name(adev), agpio->pin_table[0], func, polarity);
return 0;
}