Skip to contentSkip to conversation

ov5640: Use dev_fwnode() to obtain device's fwnode

PATCH Superseded Sakari Ailus 1 participant 1 message Apr 24, 2018

Subsystems (3)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 ov5640: Use dev_fwnode() to obtain device's fwnode

Use dev_fwnode() on the device instead of getting an fwnode handle of the device's OF node. The result is the same on OF-based systems and looks better, too.

---
 drivers/media/i2c/ov5640.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/i2c/ov5640.c +2 -2
index 852026baa2e7..7acd3b44d194 100644
@@ -2536,8 +2536,8 @@ static int ov5640_probe(struct i2c_client *client,
 
 	sensor->ae_target = 52;
 
-	endpoint = fwnode_graph_get_next_endpoint(
-		of_fwnode_handle(client->dev.of_node), NULL);
+	endpoint = fwnode_graph_get_next_endpoint(dev_fwnode(&client->dev),
+						  NULL);
 	if (!endpoint) {
 		dev_err(dev, "endpoint node not found\n");
 		return -EINVAL;
Signature · 1 line
2.11.0