From patchwork Thu Sep 22 13:19:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 9345283 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 CC622607D0 for ; Thu, 22 Sep 2016 13:19:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE9AC2AAA7 for ; Thu, 22 Sep 2016 13:19:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2F822AAB2; Thu, 22 Sep 2016 13:19: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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 83CFE2AAA7 for ; Thu, 22 Sep 2016 13:19:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933591AbcIVNT0 (ORCPT ); Thu, 22 Sep 2016 09:19:26 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33662 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933606AbcIVNTY (ORCPT ); Thu, 22 Sep 2016 09:19:24 -0400 Received: by mail-wm0-f68.google.com with SMTP id w84so14075985wmg.0; Thu, 22 Sep 2016 06:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=hDrBdL/yNWYnVgXzV7I7FoFdwnsDMu/J5qmOqLynyoE=; b=OyZZPZqSOfqsYvNQeuUitI/RhV9gbn24uKdgFV9/WOTej7qj/+I5NhT0Td7C532M3d 4zkADTW+IiAardpvt3X/0HsDkqc4pJ7c6P9nGEkiHCU1rQBSfn3OL3e2dfkqaAab4Y56 xJoaPCHAVTvlaywnB3ryTpPYDZ0xOqJzmRFWSWzkA+dNJH1urAeKAHwVqjYpQou7M7yv tD9YnxDqzuL4PD59dyRaZFlhP7g/pYbc7sM4t7de070417J8GOOhD8CVi5ZPqCfBVfI7 qZIdNeQzCoof+ffvpWyjYT4MwKGryf1JDVcOqJNB8WhZT/DD2JRYq5u64nMpSwvF20Cb zgWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=hDrBdL/yNWYnVgXzV7I7FoFdwnsDMu/J5qmOqLynyoE=; b=Bw8U+WJ+OK+OLXVZyIwrOsEv28tmV8khUcYvcamwYgkrCoPJyrtXLpZCCOGH6j6b37 CsqLk8DfD4yZPHaxHQO1iMSdZ9ubSP8eApE1qPA5S0oVCuWqj+Q9CU9+ouJx+E7tMzCi zA9nbCSBnWo4XZUnGIhsH+C+RoA4TsWOHLoN9ZyfTwwDP5wSWT4dGZ6HCNiyJFdO8KmJ v57KdI+PvTY8zH9wiZeVURcLeSnDAJHi2Od0+zPwZpq3oYccOiTxQKDlO4Ijo2OP1G4N Uf6/4yA94Zk/lsBAcWvy00jTMyprIM3wdeJGdU1lOktus/UPp6LcxQO1po77xMSLVKa8 b60A== X-Gm-Message-State: AE9vXwOqW9y7kkzPg/XNG0oHQrrt0SRj4vJxxjP+h2Y/I9GMfdswY3aFHG8t0fxbL11CPg== X-Received: by 10.28.236.199 with SMTP id h68mr7776277wmi.101.1474550357710; Thu, 22 Sep 2016 06:19:17 -0700 (PDT) Received: from groucho.site (ip9234f10a.dynamic.kabel-deutschland.de. [146.52.241.10]) by smtp.gmail.com with ESMTPSA id o2sm2126931wjo.3.2016.09.22.06.19.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Sep 2016 06:19:16 -0700 (PDT) From: Ulrich Hecht To: hans.verkuil@cisco.com Cc: niklas.soderlund@ragnatech.se, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, magnus.damm@gmail.com, ulrich.hecht+renesas@gmail.com, laurent.pinchart@ideasonboard.com, william.towle@codethink.co.uk, devicetree@vger.kernel.org, radhey.shyam.pandey@xilinx.com Subject: [PATCH v2 2/2] media: adv7604: automatic "default-input" selection Date: Thu, 22 Sep 2016 15:19:00 +0200 Message-Id: <1474550340-31455-3-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474550340-31455-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1474550340-31455-1-git-send-email-ulrich.hecht+renesas@gmail.com> 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 Documentation states that the "default-input" property should reside directly in the node of the device. This adjusts the parsing to make the implementation consistent with the documentation. Based on patch by William Towle . Signed-off-by: Ulrich Hecht Signed-off-by: Hans Verkuil Acked-by: Laurent Pinchart --- drivers/media/i2c/adv7604.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 4003831..fa7046e 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -3074,13 +3074,13 @@ static int adv76xx_parse_dt(struct adv76xx_state *state) return ret; } - if (!of_property_read_u32(endpoint, "default-input", &v)) + of_node_put(endpoint); + + if (!of_property_read_u32(np, "default-input", &v)) state->pdata.default_input = v; else state->pdata.default_input = -1; - of_node_put(endpoint); - flags = bus_cfg.bus.parallel.flags; if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)