From nobody Sat May 10 03:25:36 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1619519261; cv=none; d=zohomail.com; s=zohoarc; b=PI6aT0jT7MSDe3pIgcQtK5BUSCR7awuHhpb41gOprlRjTosnu0+9SpDvoYC1f0Cy9oISzpqEV4Qs5HA9Oe4nOIWnm+YfwErlFMV8TXoUXhOf/lb0eRn0odgpfs94Te+zNhjowyf02yx/HIMXN4dk1mvyj3c3cQfGtW9jRpU4uqA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619519261; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:MIME-Version:Message-ID:References:Sender:Subject:To; bh=guK99YQ1VKcZYfgaegiSnFwGx8FYC3jl/5vfAailnoI=; b=DkoMgeH99mGoRRjl6EqoZ9VniJoBrcReLlK/d98KzZXDVdn3KpxkQu2Goc+x1QsdhOySmcZfMFBYCrksrrl6sl314np7CfZ86WEjSpNqVTAszYYOW6Dt7JbgAqnyMiiTOv+9FljdN88k3wl5ZMA6jvj8c2awDjOEXZ8kOmyACJU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1619519261048657.0268584323951; Tue, 27 Apr 2021 03:27:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237413AbhD0K2W (ORCPT ); Tue, 27 Apr 2021 06:28:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:47814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235408AbhD0K2B (ORCPT ); Tue, 27 Apr 2021 06:28:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E56C76127A; Tue, 27 Apr 2021 10:27:15 +0000 (UTC) Received: by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1lbKvu-000nzP-Vp; Tue, 27 Apr 2021 12:27:10 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619519235; bh=5AHhx16DJL5gdJqgumKoh72s5QcxkeHszhw8tqlTmq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m2GPWkxvHZOlWbkTSHetERhPlOy8zq3V4Lsk8pt7/i+GzudFxPpOpPRsRQSCogTMw 2afTeEMa5Se1g/uTW9W0DQsIOW38JynU/lWkj7ICwstHqBR0VfsgxrEZBXi4od3qGz d+S3uc4YkRcZptKDixHYbD+ldvI9TTredPrNkaiKieDvYdaYwhaSphHZ/gcJdm2wSg z3iascj+yvpxvbADuLWj+924GU+4g8v+X7/g4vRWv+Eh0VDBQLAliLgz4kF8vqojiP jub5B3hXmkl6X46GX147HbJc2mA+UwiMpqu4QOqdpVmPa7IW9fLU5JPzt6RS1JMrIU ahEsILICxWGCA== From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Mauro Carvalho Chehab , Sakari Ailus , Songjun Wu , Wenyou Yang , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH v3 04/79] media: i2c: ov7740: don't resume at remove time Date: Tue, 27 Apr 2021 12:25:54 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Calling pm_runtime_get_sync() at driver's removal time is not right, as this will resume PM runtime. This is clearly not what it is desired there, since it calls pm_runtime_set_suspended() afterwards. So, just remove pm runtime get/put logic from the device removal logic. Fixes: 39c5c4471b8d ("media: i2c: Add the ov7740 image sensor driver") Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/ov7740.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/i2c/ov7740.c b/drivers/media/i2c/ov7740.c index 47a9003d29d6..ed6904b2e8f5 100644 --- a/drivers/media/i2c/ov7740.c +++ b/drivers/media/i2c/ov7740.c @@ -1165,10 +1165,8 @@ static int ov7740_remove(struct i2c_client *client) v4l2_async_unregister_subdev(sd); ov7740_free_controls(ov7740); =20 - pm_runtime_get_sync(&client->dev); pm_runtime_disable(&client->dev); pm_runtime_set_suspended(&client->dev); - pm_runtime_put_noidle(&client->dev); =20 ov7740_set_power(ov7740, 0); return 0; --=20 2.30.2