diff mbox series

[v3,1/4] iio: magnetometer: ak8975: Relax failure on unknown id

Message ID 20240809-ak09918-v3-1-6b036db4d5ec@mainlining.org (mailing list archive)
State Changes Requested
Headers show
Series Add support for AK09918 | expand

Commit Message

Barnabás Czémán Aug. 9, 2024, 8:25 p.m. UTC
Relax failure when driver gets an unknown device id for
allow probe for register compatible devices.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 drivers/iio/magnetometer/ak8975.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
index dd466c5fa621..6357666edd34 100644
--- a/drivers/iio/magnetometer/ak8975.c
+++ b/drivers/iio/magnetometer/ak8975.c
@@ -484,10 +484,10 @@  static int ak8975_who_i_am(struct i2c_client *client,
 		if (wia_val[1] == AK09916_DEVICE_ID)
 			return 0;
 		break;
-	default:
-		dev_err(&client->dev, "Type %d unknown\n", type);
 	}
-	return -ENODEV;
+
+	dev_info(&client->dev, "Device ID %x is unknown.\n", wia_val[1]);
+	return 0;
 }
 
 /*