From patchwork Mon Mar 7 14:31:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 8519531 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9A7319F2B4 for ; Mon, 7 Mar 2016 14:31:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03942200C6 for ; Mon, 7 Mar 2016 14:31:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DD96201EC for ; Mon, 7 Mar 2016 14:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752681AbcCGObb (ORCPT ); Mon, 7 Mar 2016 09:31:31 -0500 Received: from baptiste.telenet-ops.be ([195.130.132.51]:55011 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752634AbcCGOba (ORCPT ); Mon, 7 Mar 2016 09:31:30 -0500 Received: from ayla.of.borg ([84.195.106.123]) by baptiste.telenet-ops.be with bizsmtp id T2XP1s00l2fm56U012XP4j; Mon, 07 Mar 2016 15:31:24 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1acwBv-0004gy-Kq; Mon, 07 Mar 2016 15:31:23 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1acwBv-0004ui-Nh; Mon, 07 Mar 2016 15:31:23 +0100 From: Geert Uytterhoeven To: Laurent Pinchart Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RFC] v4l: subdev: subdev_fh->pad depends on CONFIG_VIDEO_V4L2_SUBDEV_API Date: Mon, 7 Mar 2016 15:31:22 +0100 Message-Id: <1457361082-18855-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If CONFIG_VIDEO_V4L2_SUBDEV_API=n: drivers/media/v4l2-core/v4l2-subdev.c: In function 'subdev_open': drivers/media/v4l2-core/v4l2-subdev.c:86:106: error: 'struct v4l2_subdev_fh' has no member named 'pad' v4l2_subdev_fh.pad exists only if CONFIG_VIDEO_V4L2_SUBDEV_API is enabled. Protect the call to v4l2_subdev_call() by an #ifdef to fix this. Fixes: e1879dda1574a349 ("v4l: subdev: Call pad init_cfg operation when opening subdevs") Signed-off-by: Geert Uytterhoeven --- Against git://linuxtv.org/pinchartl/fbdev.git vsp1-kms-request-20160306 drivers/media/v4l2-core/v4l2-subdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 68f3b4fb75cbf569..3fdd6c5f6aca1db7 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -83,7 +83,9 @@ static int subdev_open(struct file *file) } #endif +#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) v4l2_subdev_call(sd, pad, init_cfg, subdev_fh->pad); +#endif if (sd->internal_ops && sd->internal_ops->open) { ret = sd->internal_ops->open(sd, subdev_fh);