From patchwork Mon Aug 15 15:06:29 2016 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: 9281227 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 233C2600CB for ; Mon, 15 Aug 2016 15:07:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1530328D0B for ; Mon, 15 Aug 2016 15:07:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09CEE28D0E; Mon, 15 Aug 2016 15:07:31 +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 B65D028D0B for ; Mon, 15 Aug 2016 15:07:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932389AbcHOPHS (ORCPT ); Mon, 15 Aug 2016 11:07:18 -0400 Received: from smtp-3.sys.kth.se ([130.237.48.192]:54288 "EHLO smtp-3.sys.kth.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932339AbcHOPHQ (ORCPT ); Mon, 15 Aug 2016 11:07:16 -0400 Received: from smtp-3.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-3.sys.kth.se (Postfix) with ESMTP id 0E3B31ED2; Mon, 15 Aug 2016 17:07:14 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-3.sys.kth.se ([127.0.0.1]) by smtp-3.sys.kth.se (smtp-3.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 614wQa_pCzBk; Mon, 15 Aug 2016 17:07:13 +0200 (CEST) X-KTH-Auth: niso [89.233.230.99] X-KTH-mail-from: niklas.soderlund+renesas@ragnatech.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by smtp-3.sys.kth.se (Postfix) with ESMTPSA id 177071AA1; Mon, 15 Aug 2016 17:07:13 +0200 (CEST) From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: linux-media@vger.kernel.org, ulrich.hecht@gmail.com, hverkuil@xs4all.nl Cc: linux-renesas-soc@vger.kernel.org, laurent.pinchart@ideasonboard.com, sergei.shtylyov@cogentembedded.com, =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCHv3 04/10] [media] rcar-vin: rename entity to digital Date: Mon, 15 Aug 2016 17:06:29 +0200 Message-Id: <20160815150635.22637-5-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160815150635.22637-1-niklas.soderlund+renesas@ragnatech.se> References: <20160815150635.22637-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When Gen3 support is added to the driver more then one possible video source entity will be possible. Knowing that the name entity is a bad one, rename it to digital since it will deal with the digital input source. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 46 ++++++++++++++--------------- drivers/media/platform/rcar-vin/rcar-vin.h | 6 ++-- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c index 4b2007b..a1eb26b 100644 --- a/drivers/media/platform/rcar-vin/rcar-core.c +++ b/drivers/media/platform/rcar-vin/rcar-core.c @@ -60,7 +60,7 @@ static int rvin_mbus_supported(struct rvin_dev *vin) return false; } -static int rvin_graph_notify_complete(struct v4l2_async_notifier *notifier) +static int rvin_digital_notify_complete(struct v4l2_async_notifier *notifier) { struct rvin_dev *vin = notifier_to_vin(notifier); int ret; @@ -79,31 +79,31 @@ static int rvin_graph_notify_complete(struct v4l2_async_notifier *notifier) return rvin_v4l2_probe(vin); } -static void rvin_graph_notify_unbind(struct v4l2_async_notifier *notifier, - struct v4l2_subdev *sd, - struct v4l2_async_subdev *asd) +static void rvin_digital_notify_unbind(struct v4l2_async_notifier *notifier, + struct v4l2_subdev *subdev, + struct v4l2_async_subdev *asd) { struct rvin_dev *vin = notifier_to_vin(notifier); rvin_v4l2_remove(vin); } -static int rvin_graph_notify_bound(struct v4l2_async_notifier *notifier, - struct v4l2_subdev *subdev, - struct v4l2_async_subdev *asd) +static int rvin_digital_notify_bound(struct v4l2_async_notifier *notifier, + struct v4l2_subdev *subdev, + struct v4l2_async_subdev *asd) { struct rvin_dev *vin = notifier_to_vin(notifier); vin_dbg(vin, "subdev %s bound\n", subdev->name); - vin->entity.entity = &subdev->entity; - vin->entity.subdev = subdev; + vin->digital.entity = &subdev->entity; + vin->digital.subdev = subdev; return 0; } -static int rvin_graph_parse(struct rvin_dev *vin, - struct device_node *node) +static int rvin_digital_parse(struct rvin_dev *vin, + struct device_node *node) { struct device_node *remote; struct device_node *ep = NULL; @@ -131,10 +131,10 @@ static int rvin_graph_parse(struct rvin_dev *vin, } /* Remote node to connect */ - if (!vin->entity.node) { - vin->entity.node = remote; - vin->entity.asd.match_type = V4L2_ASYNC_MATCH_OF; - vin->entity.asd.match.of.node = remote; + if (!vin->digital.node) { + vin->digital.node = remote; + vin->digital.asd.match_type = V4L2_ASYNC_MATCH_OF; + vin->digital.asd.match.of.node = remote; ret++; } } @@ -144,13 +144,13 @@ static int rvin_graph_parse(struct rvin_dev *vin, return ret; } -static int rvin_graph_init(struct rvin_dev *vin) +static int rvin_digital_init(struct rvin_dev *vin) { struct v4l2_async_subdev **subdevs = NULL; int ret; /* Parse the graph to extract a list of subdevice DT nodes. */ - ret = rvin_graph_parse(vin, vin->dev->of_node); + ret = rvin_digital_parse(vin, vin->dev->of_node); if (ret < 0) { vin_err(vin, "Graph parsing failed\n"); goto done; @@ -173,13 +173,13 @@ static int rvin_graph_init(struct rvin_dev *vin) goto done; } - subdevs[0] = &vin->entity.asd; + subdevs[0] = &vin->digital.asd; vin->notifier.subdevs = subdevs; vin->notifier.num_subdevs = 1; - vin->notifier.bound = rvin_graph_notify_bound; - vin->notifier.unbind = rvin_graph_notify_unbind; - vin->notifier.complete = rvin_graph_notify_complete; + vin->notifier.bound = rvin_digital_notify_bound; + vin->notifier.unbind = rvin_digital_notify_unbind; + vin->notifier.complete = rvin_digital_notify_complete; ret = v4l2_async_notifier_register(&vin->v4l2_dev, &vin->notifier); if (ret < 0) { @@ -192,7 +192,7 @@ static int rvin_graph_init(struct rvin_dev *vin) done: if (ret < 0) { v4l2_async_notifier_unregister(&vin->notifier); - of_node_put(vin->entity.node); + of_node_put(vin->digital.node); } return ret; @@ -289,7 +289,7 @@ static int rcar_vin_probe(struct platform_device *pdev) if (ret) return ret; - ret = rvin_graph_init(vin); + ret = rvin_digital_init(vin); if (ret < 0) goto error; diff --git a/drivers/media/platform/rcar-vin/rcar-vin.h b/drivers/media/platform/rcar-vin/rcar-vin.h index b9274132..93daa05 100644 --- a/drivers/media/platform/rcar-vin/rcar-vin.h +++ b/drivers/media/platform/rcar-vin/rcar-vin.h @@ -90,7 +90,7 @@ struct rvin_graph_entity { * @src_pad_idx: source pad index for media controller drivers * @ctrl_handler: V4L2 control handler * @notifier: V4L2 asynchronous subdevs notifier - * @entity: entity in the DT for subdevice + * @digital: entity in the DT for local digital subdevice * * @lock: protects @queue * @queue: vb2 buffers queue @@ -120,7 +120,7 @@ struct rvin_dev { int src_pad_idx; struct v4l2_ctrl_handler ctrl_handler; struct v4l2_async_notifier notifier; - struct rvin_graph_entity entity; + struct rvin_graph_entity digital; struct mutex lock; struct vb2_queue queue; @@ -139,7 +139,7 @@ struct rvin_dev { struct v4l2_rect compose; }; -#define vin_to_source(vin) vin->entity.subdev +#define vin_to_source(vin) vin->digital.subdev /* Debug */ #define vin_dbg(d, fmt, arg...) dev_dbg(d->dev, fmt, ##arg)