From patchwork Mon Nov 13 16:46:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13454182 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE35FC4332F for ; Mon, 13 Nov 2023 16:48:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9goE3p9AsRbWTm8hCWWe/sq5JNhFvznzlCG9j51odZ4=; b=DO9S6sY0n81PF4 BlUlXp8fXofDTvfTgILYYNXN7nScx9ZxCZg6XkiBpbF3XYJMvV2kSUWaVxRC3PeSHdnh36NkDmwOS NdddgWslOYU/iSQlk4TuqD1vyzt4C4iwx4ftmIt1EhGFvBI4YfYBYCf42EyZqnVhbdyj9K41zevyl icsN70RgbXC70UfhAaGAj90ejlgiRNvqsOTpGHB0Bu2Aq6D+qbCIAtbeQtBXsZnW6Y58ItkPGhiHu 0y09JLEKPDZnUKJOsyWurYgnO5ymyMeXiJSkcMPsM4f+HK+0m2bR6c6xCpx8m0PmhqJu61NIbL7R5 d3DMO4a2YbixBlC0aAgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r2a65-00EM5H-2u; Mon, 13 Nov 2023 16:47:37 +0000 Received: from relay.smtp-ext.broadcom.com ([192.19.144.205]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r2a62-00EM4h-0z; Mon, 13 Nov 2023 16:47:35 +0000 Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id C1557C0000E8; Mon, 13 Nov 2023 08:47:30 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com C1557C0000E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1699894050; bh=6/JLDQZPDBH2aFK3yzNfKgCy/0JwglECNuOR5JcF6tQ=; h=From:To:Cc:Subject:Date:From; b=tKfbEOR6o4g2ykzQO/Bj2MIgOKxlaBb7cMcJKlocj+up4z2qfRjaDtVbFfETCrBgF R8R59/u2oIR8iJzSPQ0GFA2HtpTN/voYh3+1MC+YW6xpZaF/mnyafk6njFNQwom6CD NpDSDbzsPoiUfMO6mCAXT2lFSFBTeraHMTpFLK/k= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 666BE18041CAC4; Mon, 13 Nov 2023 08:47:29 -0800 (PST) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Ray Jui , Scott Branden , Broadcom internal kernel review list , linux-pwm@vger.kernel.org (open list:PWM SUBSYSTEM), linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE) Subject: [PATCH] pwm: bcm2835: Fix NPD in suspend/resume Date: Mon, 13 Nov 2023 08:46:32 -0800 Message-Id: <20231113164632.2439400-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231113_084734_472917_656BA52F X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume") was sent out on October 11th,, there was still a call to platform_set_drvdata() which would ensure that the driver private data structure could be used in bcm2835_pwm_{suspend,resume}. A cleanup now merged as commit commit 2ce7b7f6704c ("pwm: bcm2835: Simplify using devm functions") removed that call which would now cause a NPD in bcm2835_pwm_{suspend,resume} as a consequence. Fixes: 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume") Signed-off-by: Florian Fainelli Reviewed-by: Uwe Kleine-König --- drivers/pwm/pwm-bcm2835.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c index 9777babd5b95..ab30667f4f95 100644 --- a/drivers/pwm/pwm-bcm2835.c +++ b/drivers/pwm/pwm-bcm2835.c @@ -155,6 +155,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev) pc->chip.ops = &bcm2835_pwm_ops; pc->chip.npwm = 2; + platform_set_drvdata(pdev, pc); + ret = devm_pwmchip_add(&pdev->dev, &pc->chip); if (ret < 0) return dev_err_probe(&pdev->dev, ret,