From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9138C4360C for ; Mon, 30 Sep 2019 09:39:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA8F721D7E for ; Mon, 30 Sep 2019 09:39:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730594AbfI3JjZ (ORCPT ); Mon, 30 Sep 2019 05:39:25 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:54385 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730556AbfI3JjO (ORCPT ); Mon, 30 Sep 2019 05:39:14 -0400 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iEs92-0002RZ-7x; Mon, 30 Sep 2019 11:39:04 +0200 Received: from mfe by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1iEs90-0005ua-Ie; Mon, 30 Sep 2019 11:39:02 +0200 From: Marco Felsch To: mchehab@kernel.org, sakari.ailus@linux.intel.com, hans.verkuil@cisco.com, jacopo+renesas@jmondi.org, robh+dt@kernel.org, laurent.pinchart@ideasonboard.com Cc: devicetree@vger.kernel.org, kernel@pengutronix.de, linux-media@vger.kernel.org, Michael Tretter Subject: [PATCH v11 10/15] media: tvp5150: initialize subdev before parsing device tree Date: Mon, 30 Sep 2019 11:38:55 +0200 Message-Id: <20190930093900.16524-11-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190930093900.16524-1-m.felsch@pengutronix.de> References: <20190930093900.16524-1-m.felsch@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Michael Tretter There are several debug prints in the tvp5150_parse_dt() function, which do not print the prefix, because the v4l2_subdev is not initialized, yet. Initialize the v4l2_subdev before parsing the device tree to fix the debug messages. Signed-off-by: Michael Tretter Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index 69697c00dbd7..dda9f0a2995f 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -1959,6 +1959,9 @@ static int tvp5150_probe(struct i2c_client *c) core->regmap = map; sd = &core->sd; + v4l2_i2c_subdev_init(sd, c, &tvp5150_ops); + sd->internal_ops = &tvp5150_internal_ops; + sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; if (IS_ENABLED(CONFIG_OF) && np) { res = tvp5150_parse_dt(core, np); @@ -1971,10 +1974,6 @@ static int tvp5150_probe(struct i2c_client *c) core->mbus_type = V4L2_MBUS_BT656; } - v4l2_i2c_subdev_init(sd, c, &tvp5150_ops); - sd->internal_ops = &tvp5150_internal_ops; - sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - res = tvp5150_mc_init(core); if (res) return res; -- 2.20.1