Skip to content

Commit 5ecdb28

Browse files
raagjadavrafaeljw
authored andcommitted
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@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent b2b32a1 commit 5ecdb28

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

drivers/acpi/acpi_lpss.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,9 @@ static struct pwm_lookup byt_pwm_lookup[] = {
167167

168168
static void byt_pwm_setup(struct lpss_private_data *pdata)
169169
{
170-
u64 uid;
171-
172170
/* Only call pwm_add_table for the first PWM controller */
173-
if (acpi_dev_uid_to_integer(pdata->adev, &uid) || uid != 1)
174-
return;
175-
176-
pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
171+
if (acpi_dev_uid_match(pdata->adev, 1))
172+
pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
177173
}
178174

179175
#define LPSS_I2C_ENABLE 0x6c
@@ -218,13 +214,9 @@ static struct pwm_lookup bsw_pwm_lookup[] = {
218214

219215
static void bsw_pwm_setup(struct lpss_private_data *pdata)
220216
{
221-
u64 uid;
222-
223217
/* Only call pwm_add_table for the first PWM controller */
224-
if (acpi_dev_uid_to_integer(pdata->adev, &uid) || uid != 1)
225-
return;
226-
227-
pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup));
218+
if (acpi_dev_uid_match(pdata->adev, 1))
219+
pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup));
228220
}
229221

230222
static const struct property_entry lpt_spi_properties[] = {

0 commit comments

Comments
 (0)