From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794062866; b=1gTYQ3RGzMmJvJwmMjkfiuekKOEpRK1muxVKLgr7W9FajWvdeQvdSBdpvsD6DKC6F8rC g67QVs0JbpZcCWKcYj2DdOnSUHnTIDkPkh14j6DWSKCDdDqAvbVxltUO4EoQvyFvHwr82 ua3Vlh3cs8r/iUuIURuCw1DFaB61US8D2RXLyzIriV71HTaK7uL8HUCRgENSEl+QNwhCg MBZHDrfEHs32f6l3dKoMimBf7yBuQor8wILVUn9AEhlz5wXXhTisdR5QhhJACW2iVgamN s8z/QZTiHd3eY4do76MmN6RwUKaH6RTTmkRbH+mXiKWxBlHGcKj4d1rue4VZsKVt6Xg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794062866; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=fQ9KZ4G9getxyY+diV/c+Ru6gk5IBltEyD2a7rwgu6w=; b=raOwWfqq7H3Yjmd2qScope/Ud4NapdlxgpzpLM0H88/Rllu7SBxW9nbOTHkhmmu+GYv8 zWrRn01QzJ1Ae8ojzA4RmlRBEmKIzqBc59lVI/BeZEQI7fzadYfhKLoZIcJ0gutKFEntn gamc2N58akfLSDmLXdSivRloc64QjsfY5yLf3e6JT7SUvs5iom8ZUO1B1krygOtjRKxmI xqAbAumN6RKhIQYJ2KQ0S/6osUPyRrn9mPeDo7xdZfKIOyDx1npH9bna1by1UFa8TlFiN 5VlYx8UOgIu5pdu7GuE9P4fomFurv6iBQwANfuwKm4NpBYT+OkwrKbbF0LKaNfn48SQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="D1Q/2sYo"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C35C1606A332; Sat, 7 Nov 2026 14:47:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=D1Q/2sYo Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DC0A1F0089F; Sat, 7 Nov 2026 14:47:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1794062865; bh=fQ9KZ4G9getxyY+diV/c+Ru6gk5IBltEyD2a7rwgu6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=D1Q/2sYoyeJeyBDzdWEV2XrHFqxjE8sYOl67DdpM9v2PvCX+Vs6ldv4oWuUiQpRP0 H2srE4YGMkV8ffHrbe5hcSJVzdlZz+AUU99TD92QnzCwKV4uMBaFKYZIeCBbqD2lTP csOkck9TzK+mfoVpoO+RACM2LbdKRsuIigpHInek= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guangshuo Li , Joshua Crofts , Jonathan Cameron , Sasha Levin Subject: [PATCH 6.18 151/869] iio: accel: mma9553: disable autosuspend on remove Date: Sat, 7 Nov 2026 08:47:13 -0500 Message-ID: <20261107134857.455790801@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261107134852.069646174@linuxfoundation.org> References: <20261107134852.069646174@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Guangshuo Li [ Upstream commit 4dda1f9d25fb889649e81bbf015809daa512a049 ] mma9553_probe() enables runtime PM autosuspend with pm_runtime_use_autosuspend(). The probe error path correctly undoes this setting with pm_runtime_dont_use_autosuspend(), but the normal remove path only disables runtime PM. The runtime PM API requires pm_runtime_use_autosuspend() to be undone with pm_runtime_dont_use_autosuspend() at driver exit unless runtime PM was enabled with devm_pm_runtime_enable(). Leaving the autosuspend flag set therefore leaves the runtime PM state incompletely cleaned up after the driver is unbound. Add the missing pm_runtime_dont_use_autosuspend() call to the remove path. This issue was found by manual code inspection. Fixes: 40cb761306d6 ("iio: add driver for Freescale MMA9553") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li Reviewed-by: Joshua Crofts Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/iio/accel/mma9553.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/accel/mma9553.c b/drivers/iio/accel/mma9553.c index f85384a7908f2..65533bc275eca 100644 --- a/drivers/iio/accel/mma9553.c +++ b/drivers/iio/accel/mma9553.c @@ -1140,6 +1140,7 @@ static void mma9553_remove(struct i2c_client *client) iio_device_unregister(indio_dev); + pm_runtime_dont_use_autosuspend(&client->dev); pm_runtime_disable(&client->dev); pm_runtime_set_suspended(&client->dev); -- 2.53.0