* [PATCH v1 1/1] platform/x86: android-tablets: Use GPIO_LOOKUP() macro
@ 2024-04-08 15:37 Andy Shevchenko
2024-04-15 13:45 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2024-04-08 15:37 UTC (permalink / raw)
To: Hans de Goede, platform-driver-x86, linux-kernel
Cc: Ilpo Järvinen, Andy Shevchenko
Use GPIO_LOOKUP() macro which provides a compound literal
and can be used with dynamic data.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/platform/x86/x86-android-tablets/core.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
index a3415f1c0b5f..3f56a9dcba52 100644
--- a/drivers/platform/x86/x86-android-tablets/core.c
+++ b/drivers/platform/x86/x86-android-tablets/core.c
@@ -52,10 +52,8 @@ int x86_android_tablet_get_gpiod(const char *chip, int pin, const char *con_id,
return -ENOMEM;
lookup->dev_id = KBUILD_MODNAME;
- lookup->table[0].key = chip;
- lookup->table[0].chip_hwnum = pin;
- lookup->table[0].con_id = con_id;
- lookup->table[0].flags = active_low ? GPIO_ACTIVE_LOW : GPIO_ACTIVE_HIGH;
+ lookup->table[0] =
+ GPIO_LOOKUP(chip, pin, con_id, active_low ? GPIO_ACTIVE_LOW : GPIO_ACTIVE_HIGH);
gpiod_add_lookup_table(lookup);
gpiod = devm_gpiod_get(&x86_android_tablet_device->dev, con_id, dflags);
--
2.43.0.rc1.1.gbec44491f096
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] platform/x86: android-tablets: Use GPIO_LOOKUP() macro
2024-04-08 15:37 [PATCH v1 1/1] platform/x86: android-tablets: Use GPIO_LOOKUP() macro Andy Shevchenko
@ 2024-04-15 13:45 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2024-04-15 13:45 UTC (permalink / raw)
To: Andy Shevchenko, platform-driver-x86, linux-kernel; +Cc: Ilpo Järvinen
Hi,
On 4/8/24 5:37 PM, Andy Shevchenko wrote:
> Use GPIO_LOOKUP() macro which provides a compound literal
> and can be used with dynamic data.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> ---
> drivers/platform/x86/x86-android-tablets/core.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
> index a3415f1c0b5f..3f56a9dcba52 100644
> --- a/drivers/platform/x86/x86-android-tablets/core.c
> +++ b/drivers/platform/x86/x86-android-tablets/core.c
> @@ -52,10 +52,8 @@ int x86_android_tablet_get_gpiod(const char *chip, int pin, const char *con_id,
> return -ENOMEM;
>
> lookup->dev_id = KBUILD_MODNAME;
> - lookup->table[0].key = chip;
> - lookup->table[0].chip_hwnum = pin;
> - lookup->table[0].con_id = con_id;
> - lookup->table[0].flags = active_low ? GPIO_ACTIVE_LOW : GPIO_ACTIVE_HIGH;
> + lookup->table[0] =
> + GPIO_LOOKUP(chip, pin, con_id, active_low ? GPIO_ACTIVE_LOW : GPIO_ACTIVE_HIGH);
>
> gpiod_add_lookup_table(lookup);
> gpiod = devm_gpiod_get(&x86_android_tablet_device->dev, con_id, dflags);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-15 13:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08 15:37 [PATCH v1 1/1] platform/x86: android-tablets: Use GPIO_LOOKUP() macro Andy Shevchenko
2024-04-15 13:45 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox