From patchwork Mon Nov 14 16:55:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 19929 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2252473wru; Mon, 14 Nov 2022 09:02:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf6rYS4drUQgCxvWxDn/sfKgglIecBDU7snjKRonII9PbiD7vUiTYWY9DbkdzmIiZ5pKpbSi X-Received: by 2002:a17:902:eb81:b0:186:85a0:550 with SMTP id q1-20020a170902eb8100b0018685a00550mr95658plg.144.1668445324154; Mon, 14 Nov 2022 09:02:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668445324; cv=none; d=google.com; s=arc-20160816; b=jBQxyeOcYG8Nz46e9D56Z/kFlsp4/uRn5BfJHzMtq9bkaoz9irnRJ36RSRQxmrW+0p OZjMBLD/iiGqh4WEfjOriXvFdWVCdejM9P5Sw075QZoZfD8PTzafRk+cnPQ5GWGshT3W NZmeUFGt2NG7xa9P8QOQyS/i68LtvBDnksOGX2VtVMAZiXc/QCg8E2k1THA/+OviJNOK qDA8K66EZk++QNspHpMsRhoQzxci0ow1Rw1psQ+D0ytC24pZPnaDWLHl0edrSA1n36AX 7zgSaqftpD1kx1PNITHXHBUn47c0c3aeWqnZoSDQwkJ4rByVLOFw4qOWs8B1Kmd6dYXl djig== 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=79B0RgyL4c/9hVcmdA8kqnmo+TBzLEHCw3cq9o9aFa8=; b=CTzA+Sf402S3ImSWjGb64YS5sqJfXPUtMSgQp+xOx7FehOb28pgy2Jr1ZyOyEYiG3H E0UQ7ZCtlvJVGWmcEGho0RPO3CPNGc0Z7IVvSibAuyX3fHTOcDw0XwCMgrMTAtig/zcX Zphyi5Tk1WxCTbJUJLWal2SWtDSlmZewmosE8252YiZHSNdg+67+fyU2Uy2Tsqi52QbU S80x4pU6q2aCgpPLpFWrTjEP0tQmkdSaZ/4sGgsFrJBWM4ilNUn302Y7GWjhKJhtQtEA Iw5y5IJyq3iWyh6OJyLqEvBC4CDo19S+OBqPflTi6JnzfmLoKd0IHtrr+Z5HnY1L2+UJ QwUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NGzwMexs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a170902d54d00b001782bd6c443si9981753plf.621.2022.11.14.09.01.46; Mon, 14 Nov 2022 09:02:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NGzwMexs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238092AbiKNQ4F (ORCPT + 99 others); Mon, 14 Nov 2022 11:56:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237618AbiKNQza (ORCPT ); Mon, 14 Nov 2022 11:55:30 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C18B5220E4; Mon, 14 Nov 2022 08:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668444929; x=1699980929; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IkuaKQE6muJiKEUj5oH1o7j+tKeDX81ryQ4zKUFKwN0=; b=NGzwMexsYeSatPJrSGNRvPG3Aj+WZhOKl4k+J8GK7EBIo9hiGDa5xHbp rheDwZFV4vTFeSsANpEeJ0vtY7cCZUX9kQSkIZH1Uw+PmdNSExeLlVAoB IggKqdKubAjLluBlj9LO8ek6ae9zWpgvtXh1asoWdLJqy3jotJj4sPSaK JuSOEi2mSes4TzQvyKyX1N9Kt+17oznPaVKdIN/XL3okQ+LNHbnTh0sI1 PJZYnPSwJt7ooHxBnjOufK9U547wqaqSaNc8sh8Tr8dHmX6Wmi5lYg14r FW3YaVdtq8IhOXLH8TDe3YQMGOIubft7+z8gFa0xW0lWpB8bznh7ZnWOS A==; X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="295382843" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="295382843" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 08:55:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="727593561" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="727593561" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 14 Nov 2022 08:55:26 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 223DF346; Mon, 14 Nov 2022 18:55:47 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mika Westerberg , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Thierry Reding , Hans de Goede , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org Cc: Andy Shevchenko , Linus Walleij Subject: [PATCH v4 5/7] pwm: lpss: Rename pwm_lpss_probe() --> devm_pwm_lpss_probe() Date: Mon, 14 Nov 2022 18:55:43 +0200 Message-Id: <20221114165545.56088-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221114165545.56088-1-andriy.shevchenko@linux.intel.com> References: <20221114165545.56088-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749491724146307991?= X-GMAIL-MSGID: =?utf-8?q?1749491724146307991?= The pwm_lpss_probe() uses managed resources. Show this to the users explicitly by adding devm prefix to its name. Signed-off-by: Andy Shevchenko Acked-by: Uwe Kleine-König --- drivers/pwm/pwm-lpss-pci.c | 2 +- drivers/pwm/pwm-lpss-platform.c | 2 +- drivers/pwm/pwm-lpss.c | 6 +++--- include/linux/platform_data/x86/pwm-lpss.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/pwm/pwm-lpss-pci.c b/drivers/pwm/pwm-lpss-pci.c index 98413d364338..b4134bee2863 100644 --- a/drivers/pwm/pwm-lpss-pci.c +++ b/drivers/pwm/pwm-lpss-pci.c @@ -30,7 +30,7 @@ static int pwm_lpss_probe_pci(struct pci_dev *pdev, return err; info = (struct pwm_lpss_boardinfo *)id->driver_data; - lpwm = pwm_lpss_probe(&pdev->dev, pcim_iomap_table(pdev)[0], info); + lpwm = devm_pwm_lpss_probe(&pdev->dev, pcim_iomap_table(pdev)[0], info); if (IS_ERR(lpwm)) return PTR_ERR(lpwm); diff --git a/drivers/pwm/pwm-lpss-platform.c b/drivers/pwm/pwm-lpss-platform.c index c48c6f2b2cd8..f350607e28bd 100644 --- a/drivers/pwm/pwm-lpss-platform.c +++ b/drivers/pwm/pwm-lpss-platform.c @@ -31,7 +31,7 @@ static int pwm_lpss_probe_platform(struct platform_device *pdev) if (IS_ERR(base)) return PTR_ERR(base); - lpwm = pwm_lpss_probe(&pdev->dev, base, info); + lpwm = devm_pwm_lpss_probe(&pdev->dev, base, info); if (IS_ERR(lpwm)) return PTR_ERR(lpwm); diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c index b8739cd2c235..bb740346b699 100644 --- a/drivers/pwm/pwm-lpss.c +++ b/drivers/pwm/pwm-lpss.c @@ -244,8 +244,8 @@ static const struct pwm_ops pwm_lpss_ops = { .owner = THIS_MODULE, }; -struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, void __iomem *base, - const struct pwm_lpss_boardinfo *info) +struct pwm_lpss_chip *devm_pwm_lpss_probe(struct device *dev, void __iomem *base, + const struct pwm_lpss_boardinfo *info) { struct pwm_lpss_chip *lpwm; unsigned long c; @@ -284,7 +284,7 @@ struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, void __iomem *base, return lpwm; } -EXPORT_SYMBOL_GPL(pwm_lpss_probe); +EXPORT_SYMBOL_GPL(devm_pwm_lpss_probe); MODULE_DESCRIPTION("PWM driver for Intel LPSS"); MODULE_AUTHOR("Mika Westerberg "); diff --git a/include/linux/platform_data/x86/pwm-lpss.h b/include/linux/platform_data/x86/pwm-lpss.h index 296bd837ddbb..c852fe24fe2a 100644 --- a/include/linux/platform_data/x86/pwm-lpss.h +++ b/include/linux/platform_data/x86/pwm-lpss.h @@ -27,7 +27,7 @@ struct pwm_lpss_boardinfo { bool other_devices_aml_touches_pwm_regs; }; -struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, void __iomem *base, - const struct pwm_lpss_boardinfo *info); +struct pwm_lpss_chip *devm_pwm_lpss_probe(struct device *dev, void __iomem *base, + const struct pwm_lpss_boardinfo *info); #endif /* __PLATFORM_DATA_X86_PWM_LPSS_H */