Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp878945pxk; Thu, 17 Sep 2020 20:08:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycPx7+qdRkQFUx5g+TUF83qGMbUS8feKVQFY292BECH+bDfiachma0Vi/YulPQSWBNIgLC X-Received: by 2002:a17:906:4101:: with SMTP id j1mr32714339ejk.473.1600398510441; Thu, 17 Sep 2020 20:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398510; cv=none; d=google.com; s=arc-20160816; b=L6qN1GRQfTkMHOO38Pznj//Oate8lgVo5cu0jTDmXgVag+bB9ELcS0McAlY+p7UOtg IEHQMFw0H8pXvOInEVp0roE1tyUk0pV12G4WOiMOC/dVHtvG4g0GhYx5BTiBnc8cdfBz jjVJdgOR4t9BM1jlQOFgTDMTvPA+jkJLkVd2j+iK42yZFwr0Qn7wWpZCf43vgo7TCa05 bMsBga22eDuzaDukRy58esJALqDDjMsvFiBvVn/5Wez3gEqQDhh11lQV48TRHth58plg /Pan/2lLt4kYCH3wpXwGPs6Kywd0cFQyJEW6O4E+mot/W+JEYAHq+oDzByuxEcaL3Yu6 gpGw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lsXgic89xtef3m7JmjgewE+RIhvZslHDL3rVDTuYv8s=; b=JNfMG68eSkLGF3VJyc1lsasBauHhbt8BGB7URJP26G0WevBCpJOLI/OHaXSBiA6Ma+ nNORMMKB82UWPMetlw9j72jzVYpLGAMb2c++vWmr86R6MO8H+0R8pBO7Lt9PHHZJweYv 3/FdoVWTdKSTVhxIaujYqe+NzmaI/7DSg6eZcIwVj3HjMffQq0ORrV6EJ7LPwu2I7lJz D0WGTVaTRCi7osWZh74E77kzI9VM5Nx//mCOkab0va+zPdHPxzqLtO69gyvdZKp5cc2H WZZ/VHmN3zNk4VxPxtCcvz80U3QLWFVWn1CNwDY9kPs4IE8F5CzhQL6g7J9zy+Wgvyhd y8kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NtLiRQCE; 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 a9si1144001edr.259.2020.09.17.20.08.07; Thu, 17 Sep 2020 20:08:30 -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=pass header.i=@kernel.org header.s=default header.b=NtLiRQCE; 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 S1727257AbgIRCES (ORCPT + 99 others); Thu, 17 Sep 2020 22:04:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:51010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727227AbgIRCEE (ORCPT ); Thu, 17 Sep 2020 22:04:04 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8AAF921734; Fri, 18 Sep 2020 02:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394644; bh=TJqsiAM/hFr9HnL8UDamF+XdU6EhqsF4svPBJEguVd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NtLiRQCEkaDpEB2SCAUChjKOQL7FarsuR9lyY0qkUdSBG9lIAMcHJPb1YtTqKxL5A dYGyV78CFfkcQ0lTHbF5XIxetytuIpdbP//w+QqOYYFQQFW/YlflyboM/vdTytpagD DZt/lyd3eRjlFnt9x0mRmJQIkeikBxxCJDZRsZE4= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Pierre-Louis Bossart , Vinod Koul , Sasha Levin Subject: [PATCH AUTOSEL 5.4 142/330] soundwire: bus: disable pm_runtime in sdw_slave_delete Date: Thu, 17 Sep 2020 21:58:02 -0400 Message-Id: <20200918020110.2063155-142-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart [ Upstream commit dff70572e9a3a1a01d9dbc2279faa784d95f41b6 ] Before removing the slave device, disable pm_runtime to prevent any race condition with the resume being executed after the bus and slave devices are removed. Since this pm_runtime_disable() is handled in common routines, implementations of Slave drivers do not need to call it in their .remove() routine. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200115000844.14695-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/soundwire/bus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index fc53dbe57f854..a90963812357c 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -113,6 +113,8 @@ static int sdw_delete_slave(struct device *dev, void *data) struct sdw_slave *slave = dev_to_sdw_dev(dev); struct sdw_bus *bus = slave->bus; + pm_runtime_disable(dev); + sdw_slave_debugfs_exit(slave); mutex_lock(&bus->bus_lock); -- 2.25.1