media: v4l2-dev.h: fix symbol collision in media_entity_to_video_device()
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 25 Jan 2018 13:08:52 +0000 (08:08 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 26 Feb 2018 12:58:18 +0000 (07:58 -0500)
commit7b73ce9d4cd851b81e43025b44813de9920d0b7d
tree77b74d91a0f3cb42047139cacbfd04ec7eecedc0
parentd2d476b705b4930427d2efc38cfe0ea0c5d1cb4c
media: v4l2-dev.h: fix symbol collision in media_entity_to_video_device()

A recent change to the media_entity_to_video_device() macro breaks some
use-cases for the macro due to a symbol collision. Before the change
this worked:

    vdev = media_entity_to_video_device(link->sink->entity);

While after the change it results in a compiler error "error: 'struct
video_device' has no member named 'link'; did you mean 'lock'?". While
the following still works after the change.

    struct media_entity *entity = link->sink->entity;
    vdev = media_entity_to_video_device(entity);

Fix the collision by renaming the macro argument to '__entity'.

Fixes: 69b925c5fc36d8f1 ("media: v4l2-dev.h: add kernel-doc to two macros")

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
include/media/v4l2-dev.h