]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
media: ov5640: Use dev_fwnode() to obtain device's fwnode
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 24 Apr 2018 10:25:47 +0000 (06:25 -0400)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 27 Sep 2018 06:20:36 +0000 (08:20 +0200)
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.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
drivers/media/i2c/ov5640.c

index 852026baa2e70adb933ee02a9971dd81f0f910a9..7acd3b44d19447760942108f70e333bdf446a6a9 100644 (file)
@@ -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;