From patchwork Wed May 4 11:25:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 9012421 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D71DFBF29F for ; Wed, 4 May 2016 11:28:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 13988203A4 for ; Wed, 4 May 2016 11:28:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D0BC200E6 for ; Wed, 4 May 2016 11:28:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751875AbcEDL2n (ORCPT ); Wed, 4 May 2016 07:28:43 -0400 Received: from mga03.intel.com ([134.134.136.65]:52780 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570AbcEDL2m (ORCPT ); Wed, 4 May 2016 07:28:42 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 04 May 2016 04:28:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,576,1455004800"; d="scan'208";a="958634108" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga001.fm.intel.com with ESMTP; 04 May 2016 04:28:39 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 3D2CF20CF4; Wed, 4 May 2016 14:28:39 +0300 (EEST) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id 086A6200A8; Wed, 4 May 2016 14:25:41 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, hverkuil@xs4all.nl, mchehab@osg.samsung.com, Laurent Pinchart Subject: [PATCH 3/3] v4l: subdev: Call pad init_cfg operation when opening subdevs Date: Wed, 4 May 2016 14:25:33 +0300 Message-Id: <1462361133-23887-4-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1462361133-23887-1-git-send-email-sakari.ailus@linux.intel.com> References: <1462361133-23887-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Laurent Pinchart The subdev core code currently rely on the subdev open handler to initialize the file handle's pad configuration, even though subdevs now have a pad operation dedicated for that purpose. As a first step towards migration to init_cfg, call the operation operation in the subdev core open implementation. Subdevs that are haven't been moved to init_cfg yet will just continue implementing pad config initialization in their open handler. Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil --- 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 224ea60..9cbd011 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -85,6 +85,8 @@ static int subdev_open(struct file *file) } #endif + v4l2_subdev_call(sd, pad, init_cfg, subdev_fh->pad); + if (sd->internal_ops && sd->internal_ops->open) { ret = sd->internal_ops->open(sd, subdev_fh); if (ret < 0)