[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b587cfec2f3350623277005f62121864bee857c7.1694867379.git.mehdi.djait.k@gmail.com>
Date: Sat, 16 Sep 2023 14:38:49 +0200
From: Mehdi Djait <mehdi.djait.k@...il.com>
To: jic23@...nel.org, mazziesaccount@...il.com
Cc: krzysztof.kozlowski+dt@...aro.org,
andriy.shevchenko@...ux.intel.com, robh+dt@...nel.org,
lars@...afoo.de, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Mehdi Djait <mehdi.djait.k@...il.com>
Subject: [PATCH v9 3/7] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility
Avoid error returns on a failure to match and instead just warn with
assumption that we have a correct dt-binding telling us that
some new device with a different ID is backwards compatible.
Acked-by: Matti Vaittinen <mazziesaccount@...il.com>
Signed-off-by: Mehdi Djait <mehdi.djait.k@...il.com>
---
drivers/iio/accel/kionix-kx022a.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
index 2f1e7da25460..5a144f86c634 100644
--- a/drivers/iio/accel/kionix-kx022a.c
+++ b/drivers/iio/accel/kionix-kx022a.c
@@ -1025,10 +1025,8 @@ int kx022a_probe_internal(struct device *dev)
if (ret)
return dev_err_probe(dev, ret, "Failed to access sensor\n");
- if (chip_id != KX022A_ID) {
- dev_err(dev, "unsupported device 0x%x\n", chip_id);
- return -EINVAL;
- }
+ if (chip_id != KX022A_ID)
+ dev_warn(dev, "unknown device 0x%x\n", chip_id);
irq = fwnode_irq_get_byname(fwnode, "INT1");
if (irq > 0) {
--
2.30.2
Powered by blists - more mailing lists