[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231121103829.10027-5-raag.jadav@intel.com>
Date: Tue, 21 Nov 2023 16:08:27 +0530
From: Raag Jadav <raag.jadav@...el.com>
To: mika.westerberg@...ux.intel.com, andriy.shevchenko@...ux.intel.com,
rafael@...nel.org, lenb@...nel.org, robert.moore@...el.com,
ardb@...nel.org, will@...nel.org, mark.rutland@....com
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
acpica-devel@...ts.linuxfoundation.org, linux-efi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
mallikarjunappa.sangannavar@...el.com, bala.senthil@...el.com,
Raag Jadav <raag.jadav@...el.com>
Subject: [PATCH v2 4/6] ACPI: LPSS: use acpi_dev_uid_match() for matching _UID
Now that we have _UID matching support for integer types, we can use
acpi_dev_uid_match() for it.
Signed-off-by: Raag Jadav <raag.jadav@...el.com>
---
drivers/acpi/acpi_lpss.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 875de44961bf..79f4fc7d6871 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -167,13 +167,9 @@ static struct pwm_lookup byt_pwm_lookup[] = {
static void byt_pwm_setup(struct lpss_private_data *pdata)
{
- u64 uid;
-
/* Only call pwm_add_table for the first PWM controller */
- if (acpi_dev_uid_to_integer(pdata->adev, &uid) || uid != 1)
- return;
-
- pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
+ if (acpi_dev_uid_match(pdata->adev, 1))
+ pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
}
#define LPSS_I2C_ENABLE 0x6c
@@ -218,13 +214,9 @@ static struct pwm_lookup bsw_pwm_lookup[] = {
static void bsw_pwm_setup(struct lpss_private_data *pdata)
{
- u64 uid;
-
/* Only call pwm_add_table for the first PWM controller */
- if (acpi_dev_uid_to_integer(pdata->adev, &uid) || uid != 1)
- return;
-
- pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup));
+ if (acpi_dev_uid_match(pdata->adev, 1))
+ pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup));
}
static const struct property_entry lpt_spi_properties[] = {
--
2.17.1
Powered by blists - more mailing lists