OSDN Git Service

media: ccs: Get the endpoint by port rather than any next endpoint
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 7 Oct 2020 11:09:19 +0000 (13:09 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 12 Jan 2021 16:32:38 +0000 (17:32 +0100)
Get the first endpoint from port 0 instead of the next one, whatever it
might be. There are no other ports so there's no functional change.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ccs/ccs-core.c

index 12c30fb..11c6de7 100644 (file)
@@ -3090,7 +3090,8 @@ static int ccs_get_hwconfig(struct ccs_sensor *sensor, struct device *dev)
        int i;
        int rval;
 
-       ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
+       ep = fwnode_graph_get_endpoint_by_id(fwnode, 0, 0,
+                                            FWNODE_GRAPH_ENDPOINT_NEXT);
        if (!ep)
                return -ENODEV;