mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
media: v4l2-fwnode: Simplify v4l2_async_nf_parse_fwnode_endpoints()
There are only one user left of __v4l2_async_nf_parse_fwnode_ep()
since [1], v4l2_async_nf_parse_fwnode_endpoints(). The two
functions can be merged.
The merge of the two highlights a dead code block conditioned by the
argument 'has_port' that always is false and can therefor be removed.
1. commit 0ae426ebd0
("media: v4l2-fwnode: Remove v4l2_async_notifier_parse_fwnode_endpoints_by_port()")
[Sakari Ailus: Aligned some lines to opening parentheses.]
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
12f6517f97
commit
10aacfecee
1 changed files with 5 additions and 26 deletions
|
@ -839,12 +839,11 @@ out_err:
|
||||||
return ret == -ENOTCONN ? 0 : ret;
|
return ret == -ENOTCONN ? 0 : ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
int
|
||||||
__v4l2_async_nf_parse_fwnode_ep(struct device *dev,
|
v4l2_async_nf_parse_fwnode_endpoints(struct device *dev,
|
||||||
struct v4l2_async_notifier *notifier,
|
struct v4l2_async_notifier *notifier,
|
||||||
size_t asd_struct_size, unsigned int port,
|
size_t asd_struct_size,
|
||||||
bool has_port,
|
parse_endpoint_func parse_endpoint)
|
||||||
parse_endpoint_func parse_endpoint)
|
|
||||||
{
|
{
|
||||||
struct fwnode_handle *fwnode;
|
struct fwnode_handle *fwnode;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -862,16 +861,6 @@ __v4l2_async_nf_parse_fwnode_ep(struct device *dev,
|
||||||
if (!is_available)
|
if (!is_available)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (has_port) {
|
|
||||||
struct fwnode_endpoint ep;
|
|
||||||
|
|
||||||
ret = fwnode_graph_parse_endpoint(fwnode, &ep);
|
|
||||||
if (ret)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (ep.port != port)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = v4l2_async_nf_fwnode_parse_endpoint(dev, notifier,
|
ret = v4l2_async_nf_fwnode_parse_endpoint(dev, notifier,
|
||||||
fwnode,
|
fwnode,
|
||||||
|
@ -885,16 +874,6 @@ __v4l2_async_nf_parse_fwnode_ep(struct device *dev,
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
v4l2_async_nf_parse_fwnode_endpoints(struct device *dev,
|
|
||||||
struct v4l2_async_notifier *notifier,
|
|
||||||
size_t asd_struct_size,
|
|
||||||
parse_endpoint_func parse_endpoint)
|
|
||||||
{
|
|
||||||
return __v4l2_async_nf_parse_fwnode_ep(dev, notifier, asd_struct_size,
|
|
||||||
0, false, parse_endpoint);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(v4l2_async_nf_parse_fwnode_endpoints);
|
EXPORT_SYMBOL_GPL(v4l2_async_nf_parse_fwnode_endpoints);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue