Skip to contentSkip to conversation

iio: dac: ds4422/ds4424 drop of_node check

PATCH Applied Ruslan Babayev 2 participants 2 messages May 5, 2019 – May 11, 2019 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 iio: dac: ds4422/ds4424 drop of_node check

The driver doesn't actually rely on any DT properties. Removing this check makes it usable on ACPI based platforms.

---
 drivers/iio/dac/ds4424.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/iio/dac/ds4424.c +0 -6
index 883a47562055..2b3ba1a66fe8 100644
@@ -236,12 +236,6 @@ static int ds4424_probe(struct i2c_client *client,
 	indio_dev->dev.of_node = client->dev.of_node;
 	indio_dev->dev.parent = &client->dev;
 
-	if (!client->dev.of_node) {
-		dev_err(&client->dev,
-				"Not found DT.\n");
-		return -ENODEV;
-	}
-
 	data->vcc_reg = devm_regulator_get(&client->dev, "vcc");
 	if (IS_ERR(data->vcc_reg)) {
 		dev_err(&client->dev,
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 5 lines · On Sun, 5 May 2019 12:24:36 -0700 Ruslan Babayev <[email protected]> wrote:

The driver doesn't actually rely on any DT properties. Removing this check makes it usable on ACPI based platforms.

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 21 lines
---
 drivers/iio/dac/ds4424.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/iio/dac/ds4424.c +0 -6
index 883a47562055..2b3ba1a66fe8 100644
@@ -236,12 +236,6 @@ static int ds4424_probe(struct i2c_client *client,
 	indio_dev->dev.of_node = client->dev.of_node;
 	indio_dev->dev.parent = &client->dev;
 
-	if (!client->dev.of_node) {
-		dev_err(&client->dev,
-				"Not found DT.\n");
-		return -ENODEV;
-	}
-
 	data->vcc_reg = devm_regulator_get(&client->dev, "vcc");
 	if (IS_ERR(data->vcc_reg)) {
 		dev_err(&client->dev,