media: v4l2-core: cleanup coding style at V4L2 async/fwnode

There are several coding style issues at those definitions,
and the previous patchset added even more.

Address the trivial ones by first calling:

	./scripts/checkpatch.pl --strict --fix-inline include/media/v4l2-async.h include/media/v4l2-fwnode.h include/media/v4l2-mediabus.h drivers/media/v4l2-core/v4l2-async.c drivers/media/v4l2-core/v4l2-fwnode.c

and then manually adjusting the style where needed.

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Mauro Carvalho Chehab
2018-10-04 17:10:46 -04:00
parent cac0223c46
commit 6087b21533
5 changed files with 179 additions and 141 deletions

View File

@@ -71,8 +71,8 @@ struct v4l2_fwnode_bus_parallel {
* @clock_lane: the number of the clock lane
*/
struct v4l2_fwnode_bus_mipi_csi1 {
bool clock_inv;
bool strobe;
unsigned char clock_inv:1;
unsigned char strobe:1;
bool lane_polarity[2];
unsigned char data_lane;
unsigned char clock_lane;
@@ -203,8 +203,8 @@ void v4l2_fwnode_endpoint_free(struct v4l2_fwnode_endpoint *vep);
* %-EINVAL on parsing failure
* %-ENXIO on mismatching bus types
*/
int v4l2_fwnode_endpoint_alloc_parse(
struct fwnode_handle *fwnode, struct v4l2_fwnode_endpoint *vep);
int v4l2_fwnode_endpoint_alloc_parse(struct fwnode_handle *fwnode,
struct v4l2_fwnode_endpoint *vep);
/**
* v4l2_fwnode_parse_link() - parse a link between two endpoints
@@ -236,7 +236,6 @@ int v4l2_fwnode_parse_link(struct fwnode_handle *fwnode,
*/
void v4l2_fwnode_put_link(struct v4l2_fwnode_link *link);
/**
* typedef parse_endpoint_func - Driver's callback function to be called on
* each V4L2 fwnode endpoint.
@@ -255,7 +254,6 @@ typedef int (*parse_endpoint_func)(struct device *dev,
struct v4l2_fwnode_endpoint *vep,
struct v4l2_async_subdev *asd);
/**
* v4l2_async_notifier_parse_fwnode_endpoints - Parse V4L2 fwnode endpoints in a
* device node
@@ -294,10 +292,11 @@ typedef int (*parse_endpoint_func)(struct device *dev,
* %-EINVAL if graph or endpoint parsing failed
* Other error codes as returned by @parse_endpoint
*/
int v4l2_async_notifier_parse_fwnode_endpoints(
struct device *dev, struct v4l2_async_notifier *notifier,
size_t asd_struct_size,
parse_endpoint_func parse_endpoint);
int
v4l2_async_notifier_parse_fwnode_endpoints(struct device *dev,
struct v4l2_async_notifier *notifier,
size_t asd_struct_size,
parse_endpoint_func parse_endpoint);
/**
* v4l2_async_notifier_parse_fwnode_endpoints_by_port - Parse V4L2 fwnode
@@ -345,10 +344,11 @@ int v4l2_async_notifier_parse_fwnode_endpoints(
* %-EINVAL if graph or endpoint parsing failed
* Other error codes as returned by @parse_endpoint
*/
int v4l2_async_notifier_parse_fwnode_endpoints_by_port(
struct device *dev, struct v4l2_async_notifier *notifier,
size_t asd_struct_size, unsigned int port,
parse_endpoint_func parse_endpoint);
int
v4l2_async_notifier_parse_fwnode_endpoints_by_port(struct device *dev,
struct v4l2_async_notifier *notifier,
size_t asd_struct_size, unsigned int port,
parse_endpoint_func parse_endpoint);
/**
* v4l2_fwnode_reference_parse_sensor_common - parse common references on
@@ -368,8 +368,8 @@ int v4l2_async_notifier_parse_fwnode_endpoints_by_port(
* -ENOMEM if memory allocation failed
* -EINVAL if property parsing failed
*/
int v4l2_async_notifier_parse_fwnode_sensor_common(
struct device *dev, struct v4l2_async_notifier *notifier);
int v4l2_async_notifier_parse_fwnode_sensor_common(struct device *dev,
struct v4l2_async_notifier *notifier);
/**
* v4l2_async_register_fwnode_subdev - registers a sub-device to the
@@ -401,11 +401,13 @@ int v4l2_async_notifier_parse_fwnode_sensor_common(
* An error is returned if the module is no longer loaded on any attempts
* to register it.
*/
int v4l2_async_register_fwnode_subdev(
struct v4l2_subdev *sd, size_t asd_struct_size,
unsigned int *ports, unsigned int num_ports,
int (*parse_endpoint)(struct device *dev,
struct v4l2_fwnode_endpoint *vep,
struct v4l2_async_subdev *asd));
int
v4l2_async_register_fwnode_subdev(struct v4l2_subdev *sd,
size_t asd_struct_size,
unsigned int *ports,
unsigned int num_ports,
int (*parse_endpoint)(struct device *dev,
struct v4l2_fwnode_endpoint *vep,
struct v4l2_async_subdev *asd));
#endif /* _V4L2_FWNODE_H */