Skip to content

Commit

Permalink
media: v4l2-subdev.h: keep * together with the type
Browse files Browse the repository at this point in the history
Having the '*' in the next line separated from the type makes it
hard to see that these functions return a pointer to that type.

Instead, keep it next to the type name so it is clear that it is
a pointer to that type.

Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
Hans Verkuil authored and sigmaris committed Aug 8, 2020
1 parent aeda160 commit bc188ec
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions include/media/v4l2-subdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -930,10 +930,10 @@ struct v4l2_subdev_fh {
* @cfg: pointer to &struct v4l2_subdev_pad_config array.
* @pad: index of the pad in the @cfg array.
*/
static inline struct v4l2_mbus_framefmt
*v4l2_subdev_get_try_format(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
unsigned int pad)
static inline struct v4l2_mbus_framefmt *
v4l2_subdev_get_try_format(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
unsigned int pad)
{
if (WARN_ON(pad >= sd->entity.num_pads))
pad = 0;
Expand All @@ -948,10 +948,10 @@ static inline struct v4l2_mbus_framefmt
* @cfg: pointer to &struct v4l2_subdev_pad_config array.
* @pad: index of the pad in the @cfg array.
*/
static inline struct v4l2_rect
*v4l2_subdev_get_try_crop(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
unsigned int pad)
static inline struct v4l2_rect *
v4l2_subdev_get_try_crop(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
unsigned int pad)
{
if (WARN_ON(pad >= sd->entity.num_pads))
pad = 0;
Expand All @@ -966,15 +966,16 @@ static inline struct v4l2_rect
* @cfg: pointer to &struct v4l2_subdev_pad_config array.
* @pad: index of the pad in the @cfg array.
*/
static inline struct v4l2_rect
*v4l2_subdev_get_try_compose(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
unsigned int pad)
static inline struct v4l2_rect *
v4l2_subdev_get_try_compose(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
unsigned int pad)
{
if (WARN_ON(pad >= sd->entity.num_pads))
pad = 0;
return &cfg[pad].try_compose;
}

#endif

extern const struct v4l2_file_operations v4l2_subdev_fops;
Expand Down

0 comments on commit bc188ec

Please sign in to comment.