From patchwork Mon May 6 16:49:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 795113 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 AA4A0156F3D; Mon, 6 May 2024 16:50:02 +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=1715014204; cv=none; b=iIooxHk1MZYj0OEM7tINkJEov/N9p3qqi94ZeyQzG0obq6jfM9xZB+dv/39kGfGOlh1t25676zadbf+kQaI1NHe/yhf1wOwzqe2kI2RYJfo5gM8Gfe2+7lQ8t8dknTWBUzF4iVfcygWc4ulFn/Xy5O8H5m3u4m/B53vXVPFyYiE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715014204; c=relaxed/simple; bh=tUZeqYY51KElB36hTFc/HucDTocP75BzYf6Iw+gImbE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Rth3tdZqLyfHFVU8bLmH3MeN+9/HuPf8fOauhpFhRFXS6oETngWK+14Mb5QdKmJGAqbHPBB+yCVYjGkY1MjGHj0wxL0CtVG3jUccMSXEDSU0ycN8LZQhFx40qPxJIC7kOUkte/hpEP6GbUnNCj0K6c10OYIEdlKtjClVbn5ijVo= 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=uMmUGrTK; 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="uMmUGrTK" Received: from localhost.localdomain (unknown [IPv6:2001:b07:5d2e:52c9:cc1e:e404:491f:e6ea]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9607A1211; Mon, 6 May 2024 18:49:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1715014196; bh=tUZeqYY51KElB36hTFc/HucDTocP75BzYf6Iw+gImbE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uMmUGrTKLfeNK8WYj/+NeMCYeELvHnGFo8xHTftJ8Bj0MKlEO4Lhx7L6L1fOT9p6K uDOB7EB5zjFtGFyk2PhUCPQ7toBIMOp9Eyd56cejXe9IbkD0QMLBDOC0/13Swqc2+v 7X0UknRTFmEb/OHS0iayo8blFKKLj7AGpBiDQlT4= 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 v2 03/11] media: rcar-csi2: Cleanup subdevice in remove() Date: Mon, 6 May 2024 18:49:31 +0200 Message-ID: <20240506164941.110389-4-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240506164941.110389-1-jacopo.mondi@ideasonboard.com> References: <20240506164941.110389-1-jacopo.mondi@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-media@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 --- 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);