From patchwork Mon May 10 17:10:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 12248867 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE420C433ED for ; Mon, 10 May 2021 17:11:08 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 256E761288 for ; Mon, 10 May 2021 17:11:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 256E761288 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=PNgBhdVIiSFHKtPd3ExbzhjgmeNsan2JFetg7erA/qc=; b=Mozp2k9tcTD5XupEHe9gIvdSU9 xKnhcPBLORv03eqGf1nGlDqn+CTodVxVcECb0n3KxJIN0vFmcXAoJR6jBYK0pnJKP8jKfYuulESUC QDEp7eFWQR4wxWEBYTYxRfN9o/Df2xQ1iAaACGu3ui0fTa6Ro6tzJMBE6RHwzeRznuORM2stpBUSV qbuPwjxTyY8DDN0hMfCkOusZ0ZZOnr9xceNwBqp43niOcedyeONxsIcaULcewSlc+FyJ+Z1bNVP+Z kmeS68PoNImF2uDXPaiNR7jOfoQ/AQkYra/lIXphMdSoNosP/l5+whC+wAZO2uIPC0hAyJA7dtdb+ IolA4rzg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg9Qq-00F6so-Tm; Mon, 10 May 2021 17:11:00 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg9Qo-00F6ri-46 for linux-amlogic@desiato.infradead.org; Mon, 10 May 2021 17:10:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=qXLXzMRrY02x45MRrsdpyS5gy4f/7gtbYHlItSiGWXg=; b=TLZ6Qrn9INcoXf7QczezJDFnXL QPgUKIWA5n/n1OYzKRSdI2GhYGkULHI77F/eo2s8jHV1KIi5B7aww+iUA38sYgK6rCGaDK6glnLhi wcylVRHG1tq8tlitM/YiVCKZlk+mEd5huGv0enATVVUBspqNwNm6ozm2HV78EaEoaC3yOl8yZp36w Zy/RmRItjmoXdJeflyL1NylNwG3u6BEfBNCMI2pLupkedjodn6u5ftFdocgej3Fwg/fAPJ+8Y7XNn VYbFVVE1mbDZzD6Hl1a0GZ8xZHW5MhWpLgQ0VkZL+UOMg62xItzgwa4zMQU6ZPTIrNBPD1On+IMRk 0/bV0OMA==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg9Ql-008xjx-IC for linux-amlogic@lists.infradead.org; Mon, 10 May 2021 17:10:56 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lg9Qe-0000l9-VQ; Mon, 10 May 2021 19:10:48 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lg9Qe-0005YF-9B; Mon, 10 May 2021 19:10:48 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thierry Reding , Lee Jones , Kevin Hilman Cc: Neil Armstrong , Jerome Brunet , Martin Blumenstingl , linux-pwm@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH] pwm: meson: Simplify using devm_pwmchip_add Date: Mon, 10 May 2021 19:10:46 +0200 Message-Id: <20210510171046.984246-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-amlogic@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_101055_623648_1B6A1ED9 X-CRM114-Status: GOOD ( 13.41 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Signed-off-by: Uwe Kleine-König --- Hello, this obviously depends on https://lore.kernel.org/r/20210407080155.55004-2-u.kleine-koenig@pengutronix.de Best regards Uwe drivers/pwm/pwm-meson.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) base-commit: 6efb943b8616ec53a5e444193dccf1af9ad627b5 prerequisite-patch-id: fa39cd0c852d109ed957dc44dca5bdcf5dff0685 diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c index 9eb060613cb4..d9de4562e003 100644 --- a/drivers/pwm/pwm-meson.c +++ b/drivers/pwm/pwm-meson.c @@ -560,31 +560,21 @@ static int meson_pwm_probe(struct platform_device *pdev) if (err < 0) return err; - err = pwmchip_add(&meson->chip); + err = devm_pwmchip_add(&meson->chip); if (err < 0) { dev_err(&pdev->dev, "failed to register PWM chip: %d\n", err); return err; } - platform_set_drvdata(pdev, meson); - return 0; } -static int meson_pwm_remove(struct platform_device *pdev) -{ - struct meson_pwm *meson = platform_get_drvdata(pdev); - - return pwmchip_remove(&meson->chip); -} - static struct platform_driver meson_pwm_driver = { .driver = { .name = "meson-pwm", .of_match_table = meson_pwm_matches, }, .probe = meson_pwm_probe, - .remove = meson_pwm_remove, }; module_platform_driver(meson_pwm_driver);