Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp671046pxy; Wed, 28 Apr 2021 11:41:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxecwpdLgaW8+NO/uc+x/jLOZSXWWFHwhhxOUvh+XJd0BI5TDnJMPm3/vrWw/4v6w4UoeCm X-Received: by 2002:a63:145a:: with SMTP id 26mr27747252pgu.300.1619635317428; Wed, 28 Apr 2021 11:41:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619635317; cv=none; d=google.com; s=arc-20160816; b=x2Q2W6QA67IIeYp6Wf/ZxasJkx7n47nxvgpBuCRJkLO/92TUWPk8CxKnEUpK8Wuoy5 HsUa5sh1cgrEZJSyN9iujBI6N4jm/2EdZ6gZzMhBdUtnpPei1oC0tWo3nWcIkJhXrT6t Xda9MrWneqNmdO4pzUAGphD8pIBbZk9F1hpiUw69X6RCDCSUVIgUNFsS4oDzhrXRdodH M/AVyULDlLLXbJZwsukpfDgrMmy67dqEdeaN7OaBLYhVTjdBUJKGPnEhf96/tFAd+Mc7 tSdkntqQ7yqAIzMPXn1vV9UoCDR4iad/V+165yopj9FVw+r4AlGHGU8xgY66OEn3W10i 3Ijw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=Y4HbtEW1zV5dDZwbpaA+MDL4IcAxQ1flmWTbEwBwsyg=; b=kKxT7qTDX3zNxa/mnn3f+Qgtg3MAVu8oxGCx5oU5/qVOBHRVhTVWwS/oD7RSYD5lBs gAWrkhXBEhLwBQihdddXrRpKzCBLPlpk3rtzTAKFye4Qb+o2TBCOW+goqh6itP/81Msz NpMdK0fvRyRWvhGkOZl7EJRiGI3liXGX2E7ax5BQM2qRW6PgcEjHniQaIDr8Xi84rArI aypko7mLBT3KIKOXYx8BCsal0RefwH5GzzgFMQr5NHn6EO1hNeKrPuqp5bmPVgR+DFac 3F+xJ9o1DXPiQPW5uczmu9Kaj6GEbS8DobZfDcuC+dcV9BIpHCpOJzd9IUm8YHBKhkK1 ++sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=Lgav0xx9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a133si523660pfd.294.2021.04.28.11.41.44; Wed, 28 Apr 2021 11:41:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=Lgav0xx9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240579AbhD1Oyo (ORCPT + 99 others); Wed, 28 Apr 2021 10:54:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:36324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240283AbhD1Oxa (ORCPT ); Wed, 28 Apr 2021 10:53:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D8BEA61455; Wed, 28 Apr 2021 14:52:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619621564; bh=v0N3nXsqMajMGBVdnEBF4DR9l7FpjhgT+LyWaPFGjVY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lgav0xx9qLJD809kGwduHIweCAI4kyiXZBtlMOR7b6LhS+8aCwOYkFJGkMfoF7v+Q AjRZ4gb9KUesndsx3yjJSug0jySNhwmgQ+YyzUeAEo18ELZwgLgBU6W0foVwSMUUH1 oMH2fdfOIlUEsN43n3X2l1gBlg+zDvVhjYQU1KEP8BO0eW2VqhN66dYD/0Oq4gXZLq nmRmXujydgjQw/ZeGPN8LvJlrOCDMzeCyUobLxkAo32giYjTcwrCJLNzlqrdZTwxqY PK0w2NVajkQjcT/X26f7Sgo/0F34OgVrjDuqF+huVNWA9pmq45XwidyJ9pJvbXiSRi bWZQhP/eVeijQ== Received: by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1lblYP-001Dpp-Me; Wed, 28 Apr 2021 16:52:41 +0200 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Akinobu Mita , Hans Verkuil , Matt Ranostay , Mauro Carvalho Chehab , Sakari Ailus , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH v4 05/79] media: i2c: video-i2c: don't resume at remove time Date: Wed, 28 Apr 2021 16:51:26 +0200 Message-Id: <4af597b4d09d874308a23680cf3fed4a31a1674a.1619621413.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: 69d2a734c5dc ("media: video-i2c: support runtime PM") Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/video-i2c.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index 0465832a4090..c9a774f4c8d2 100644 --- a/drivers/media/i2c/video-i2c.c +++ b/drivers/media/i2c/video-i2c.c @@ -893,10 +893,8 @@ static int video_i2c_remove(struct i2c_client *client) { struct video_i2c_data *data = i2c_get_clientdata(client); - pm_runtime_get_sync(&client->dev); pm_runtime_disable(&client->dev); pm_runtime_set_suspended(&client->dev); - pm_runtime_put_noidle(&client->dev); if (data->chip->set_power) data->chip->set_power(data, false); -- 2.30.2