summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andy.shevchenko@gmail.com>2024-09-04 21:36:46 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-09-30 09:21:02 +0100
commit1d5623130fd438abd6225672b33de35cf9b468d7 (patch)
tree4277b71a94513681a5c4c0dcf2cdf07c5150a9e1
parent7e1df2cab30399e60f3a71ba4f653b77f3f30c2a (diff)
downloadlwn-1d5623130fd438abd6225672b33de35cf9b468d7.tar.gz
lwn-1d5623130fd438abd6225672b33de35cf9b468d7.zip
iio: light: cm32181: Remove duplicate ACPI handle check
cm32181_acpi_parse_cpm_tables() is a no-op if ACPI handle is not available. Remove duplicate ACPI handle check at the caller side. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://patch.msgid.link/20240904183646.1219485-1-andy.shevchenko@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/light/cm32181.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/light/cm32181.c b/drivers/iio/light/cm32181.c
index 9df85b3999fa..aeae0566ec12 100644
--- a/drivers/iio/light/cm32181.c
+++ b/drivers/iio/light/cm32181.c
@@ -217,8 +217,7 @@ static int cm32181_reg_init(struct cm32181_chip *cm32181)
cm32181->lux_per_bit = CM32181_LUX_PER_BIT;
cm32181->lux_per_bit_base_it = CM32181_LUX_PER_BIT_BASE_IT;
- if (ACPI_HANDLE(cm32181->dev))
- cm32181_acpi_parse_cpm_tables(cm32181);
+ cm32181_acpi_parse_cpm_tables(cm32181);
/* Initialize registers*/
for_each_set_bit(i, &cm32181->init_regs_bitmap, CM32181_CONF_REG_NUM) {