From patchwork Mon Jun 17 16:11:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 13701006 X-Patchwork-Delegate: kieran@bingham.xyz Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9B9E1D9527; Mon, 17 Jun 2024 16:12:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718640726; cv=none; b=lmwAuOD8e9BaAh2oCLu1UcLqh4vrzekq0zj+5NGoLlcMlmrJtABNc+bzy+iuqZFl7HAAEcQm2Pbmx558lhOwQgLB/lEZW2BpNgXBZha1JDZFhfPJts9Z3t7jjNPP/PexYVuFLg7CwBGWCx5652z4VmkixS7v5jD7zhD1ELxbIpQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718640726; c=relaxed/simple; bh=gsKlj9CQCUikoDTvci/J14YRY4XoJwZoNoC9m2dKz7U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Sa5URa5oee0yVFq997cy38J+JhTdmFQxOXYI1wZSkkSZxDhfP0E8/Ja5zSCUQttcmCTjxQW7aazEwIOl/oeBLBLa4SCO6GE8kOZR9lta5E0IIUemAv8qal27zhuayFB72hjRauM0RNp8vOzKdBc20iNIESZz03pjKAlAwI2t38k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=c1UrROQo; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="c1UrROQo" Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 589BFD52; Mon, 17 Jun 2024 18:11:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718640702; bh=gsKlj9CQCUikoDTvci/J14YRY4XoJwZoNoC9m2dKz7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c1UrROQoWhLZNlJ1YPMZTZd3LM4cI8flcBcXEgtXFufrCP6YokCLBoTdh3CQ3yNno OhcsBQET2s+W09IfOMXj3RYpKyOxDas/PuUyhHRxrSFgQvmuTeeRb57RhVknmahpvi YNNGfowZxrYxdcLUgij7rm0DPQ+0z5QIcuaOo3xg= From: Jacopo Mondi To: Laurent Pinchart , =?utf-8?q?Niklas_S?= =?utf-8?q?=C3=B6derlund?= , Sakari Ailus , Kieran Bingham , Tomi Valkeinen Cc: Jacopo Mondi , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Laurent Pinchart Subject: [PATCH v4 03/11] media: rcar-csi2: Cleanup subdevice in remove() Date: Mon, 17 Jun 2024 18:11:26 +0200 Message-ID: <20240617161135.130719-4-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240617161135.130719-1-jacopo.mondi@ideasonboard.com> References: <20240617161135.130719-1-jacopo.mondi@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Cleanup the V4L2 subdevice in the driver's remove function to ensure its async connection are freed, and guarantee in future that the subdev active state is cleaned up. Fixes: 769afd212b16 ("media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver") Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund --- drivers/media/platform/renesas/rcar-csi2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c index 249e58c77176..2d464e43a5be 100644 --- a/drivers/media/platform/renesas/rcar-csi2.c +++ b/drivers/media/platform/renesas/rcar-csi2.c @@ -1938,6 +1938,7 @@ static void rcsi2_remove(struct platform_device *pdev) v4l2_async_nf_unregister(&priv->notifier); v4l2_async_nf_cleanup(&priv->notifier); v4l2_async_unregister_subdev(&priv->subdev); + v4l2_subdev_cleanup(&priv->subdev); pm_runtime_disable(&pdev->dev);