Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp952312rdb; Sat, 7 Oct 2023 06:02:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEw3/nXb4sp2im5oMbEX9Pmrvics6v7IGxdaudIC1hihGBzJj8IRaYAWkChjohvdIO2PEJl X-Received: by 2002:a17:90a:c20d:b0:268:2af6:e48c with SMTP id e13-20020a17090ac20d00b002682af6e48cmr12917373pjt.4.1696683763466; Sat, 07 Oct 2023 06:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696683763; cv=none; d=google.com; s=arc-20160816; b=Kd+NthnIkuOyvWlL9PuFQmRfvC93KYvuIT11fHxIvybiwD2IJ4epIE/xbeGhZaoIRj CvN+n+LHY+YcCTwZs0LO8+5wg94F5wZFZdHnr3VHwzVAGbMXGeF8BRuhEsShUAdkuXwd 4lEgNzBxNTy5+xy7fblXVZ1cRqs1BMyZMp6yKHPIpwdbG+YPL4r5O5FtYsCIq0WQ7V3r mXNt+5HEOyXfqlyi1UHHDy0Yqtql27PR03U3DaMRPcHJKMAxtIWwAr6NdDAr1GWZVgyc pu5/D5QcYdEXMD+8Ik5ejj/z243GWD6cdUYUn0izRzBVvSiFx4M0eoZnAXqMOgdURcBv AnVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=b0es0YQiWQFu6a5TJuEa08b/LINqN5TYpfd50XhkBG0=; fh=5o1q59f/+HxDm0P5Xk74IsLedyDLaF2SlU3+/zjZTmw=; b=wpwxZvH5A4epmfa3hbGgXvQlEDrxk57Ce09Au3T0/mCO7yxHQFGoNeYbiY4CMS7pMt 8C/10uniMdnO3w9QLlEK8wPMzo4FSYEguQ+d8RPGrlcl5Tk5PUr1QtSY9PTrKW3ZdTku QHxqSCSTL+oZHIM8dxy601PmCSoI8Pa821ZDwKOCf6oTk8ZvjgA6raYOTUnxWu8bx/TC uzy2/0+DMsFutLYWpmyvEignKg+ms9nT651g1xvRN7EHaTTHPdNl4gqYVIYHyMfZH3dK 4QC09kRvCXnLVDnCAvmMvJnnU+Ejr4/XDxXXc4lY22C42D+yFbJZhwMDMHpNo/KKlX8g Ioyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b="Sa/rhZmZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id oa13-20020a17090b1bcd00b0027686905e79si2160558pjb.146.2023.10.07.06.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 06:02:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b="Sa/rhZmZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B2D9C80934B9; Sat, 7 Oct 2023 06:00:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343917AbjJGNAV (ORCPT + 99 others); Sat, 7 Oct 2023 09:00:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343741AbjJGNAU (ORCPT ); Sat, 7 Oct 2023 09:00:20 -0400 Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 849A6AB for ; Sat, 7 Oct 2023 06:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1696683613; bh=1Jri4c0dUWUEhbh0nohF7eCG2g72tCMR2ODPWB7oQMk=; h=From:To:Cc:Subject:Date:From; b=Sa/rhZmZW0rIafmQjpxwClLK5cJmPYNc+zI1PaA7cRbnhzpYyqFl1ztVgOvUTeNyU k+FcqpYJvKtNXP9BR8Jrg+WJeBVCsC7PTMizxCZU5eEPKKnhbSZvzAadmLBsR/4i3U rAXEzs/iKvS6a73pFdLQA1X/NZbp36u2Xn8k8lak= From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= To: linux-rockchip@lists.infradead.org Cc: Ondrej Jirman , Sakari Ailus , Jacopo Mondi , Nicholas Roth , Mauro Carvalho Chehab , linux-media@vger.kernel.org (open list:V4L2 CAMERA SENSOR DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] media: i2c: ov8858: Don't set fwnode in the driver Date: Sat, 7 Oct 2023 15:00:00 +0200 Message-ID: <20231007130004.942369-1-megi@xff.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 07 Oct 2023 06:00:50 -0700 (PDT) X-Spam-Level: ** From: Ondrej Jirman This makes the driver work with the new check in v4l2_async_register_subdev() that was introduced recently in 6.6-rc1. Without this change, probe fails with: ov8858 1-0036: Detected OV8858 sensor, revision 0xb2 ov8858 1-0036: sub-device fwnode is an endpoint! ov8858 1-0036: v4l2 async register subdev failed ov8858: probe of 1-0036 failed with error -22 This also simplifies the driver a bit. Signed-off-by: Ondrej Jirman --- drivers/media/i2c/ov8858.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c index 3af6125a2eee..b862dc9604cc 100644 --- a/drivers/media/i2c/ov8858.c +++ b/drivers/media/i2c/ov8858.c @@ -1868,7 +1868,7 @@ static int ov8858_parse_of(struct ov8858 *ov8858) return -EINVAL; } - ov8858->subdev.fwnode = endpoint; + fwnode_handle_put(endpoint); return 0; } @@ -1913,7 +1913,7 @@ static int ov8858_probe(struct i2c_client *client) ret = ov8858_init_ctrls(ov8858); if (ret) - goto err_put_fwnode; + return ret; sd = &ov8858->subdev; sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; @@ -1964,8 +1964,6 @@ static int ov8858_probe(struct i2c_client *client) media_entity_cleanup(&sd->entity); err_free_handler: v4l2_ctrl_handler_free(&ov8858->ctrl_handler); -err_put_fwnode: - fwnode_handle_put(ov8858->subdev.fwnode); return ret; } @@ -1978,7 +1976,6 @@ static void ov8858_remove(struct i2c_client *client) v4l2_async_unregister_subdev(sd); media_entity_cleanup(&sd->entity); v4l2_ctrl_handler_free(&ov8858->ctrl_handler); - fwnode_handle_put(ov8858->subdev.fwnode); pm_runtime_disable(&client->dev); if (!pm_runtime_status_suspended(&client->dev)) -- 2.42.0