From patchwork Thu Jan 25 13:08:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10183983 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B9EE460383 for ; Thu, 25 Jan 2018 13:09:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB731286DB for ; Thu, 25 Jan 2018 13:09:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A03A32882F; Thu, 25 Jan 2018 13:09:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9189B28AA8 for ; Thu, 25 Jan 2018 13:09:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751831AbeAYNJE (ORCPT ); Thu, 25 Jan 2018 08:09:04 -0500 Received: from bin-mail-out-05.binero.net ([195.74.38.228]:10985 "EHLO bin-vsp-out-03.atm.binero.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751774AbeAYNJE (ORCPT ); Thu, 25 Jan 2018 08:09:04 -0500 X-Halon-ID: e4d5e9f9-01d0-11e8-9563-0050569116f7 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA id e4d5e9f9-01d0-11e8-9563-0050569116f7; Thu, 25 Jan 2018 14:09:01 +0100 (CET) From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCH v2] v4l2-dev.h: fix symbol collision in media_entity_to_video_device() Date: Thu, 25 Jan 2018 14:08:52 +0100 Message-Id: <20180125130852.4779-1-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Sakari Ailus --- include/media/v4l2-dev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) * Changes from v1 - Change argument name to '__entity' as suggested by Geert, Sakari and Mauro. - Added fixes tag. diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 267fd2bed17bd3c1..322b8a9abb8dc45a 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h @@ -298,10 +298,10 @@ struct video_device * media_entity_to_video_device - Returns a &struct video_device from * the &struct media_entity embedded on it. * - * @entity: pointer to &struct media_entity + * @__entity: pointer to &struct media_entity */ -#define media_entity_to_video_device(entity) \ - container_of(entity, struct video_device, entity) +#define media_entity_to_video_device(__entity) \ + container_of(__entity, struct video_device, entity) /** * to_video_device - Returns a &struct video_device from the