From patchwork Thu Nov 17 11:08:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 21574 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp338691wrr; Thu, 17 Nov 2022 03:10:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf5dCI2vOJVlrFdjjgFh6jP5i0Aj8maxFoWRqmW2mMh+IH2UxXu9hi7+t9CU40zbpanqBfAf X-Received: by 2002:aa7:81cb:0:b0:56e:1092:1272 with SMTP id c11-20020aa781cb000000b0056e10921272mr2490507pfn.31.1668683446978; Thu, 17 Nov 2022 03:10:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668683446; cv=none; d=google.com; s=arc-20160816; b=qZxG3be8Eb2/U1t5FlutBrOfS5EtAGNYo1AfQ8DaZS61WBtGyv+tF4mdXKMFAwVtId P9aNtwIZ1mB/R6h7pit+1KK8PjdVupV+HmbMnr9NceUmXvUsR3LZiRXNQIArdN+S+O/t xxYa8vXib26mcUJ6b81ZuPWeCIqgsY0Q/n9JeOE3FSd1yp6vWOA106n9E6iDY944/xbp Xppyg83aqqm4AjyIi7IRM1kE5A2HGS47JHq0fbXA2ddJ9bn2QUz7U9U8RQKv9ezAtmMr qPknFuVPamXmU+HDZbcV5eDri4VyLS76rW3PixzV2XvR3N7Oot+i2g/+2YTH/k+rN/u1 Jt2A== 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=dyKYiK73NfWL7xJlf6zwRglUY7kvHdbwRzoXZ3nb8mg=; b=d0SvPQNGCxEf0Adzwds50PUubWCWlMdJVj0cRNF/BqsaDgvuuRf/kQxVTzQA1XFPYV KuTrMB3ZWIGT/1ZuIHejqss4G42Z7e9hAGjA9HoBkRXUJRKYuICWzBsIQcBNvX1/J1E7 UNX3Ibd+rzh1PpFs6oJ9dcvatKT325n1tFx0JdegLonOQro37NAQhXY7AletNaJjJOGy rKEzbjjXHoywViAOBFv1NJCiL+SGfXdjGryan31sKe5o+OeP+j9tzB9GTWpzL9JIVD/z xxdru4SgNANnK8Bs+7o1aJF0Mwo0Tgen9JyW9Q58+L1Lxve6HF/SCw1WQThiTgNvQPWr mi3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=V94tzEgi; 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 b188-20020a6367c5000000b00476990d057asi701428pgc.472.2022.11.17.03.10.33; Thu, 17 Nov 2022 03:10:46 -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=V94tzEgi; 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 S239891AbiKQLJM (ORCPT + 99 others); Thu, 17 Nov 2022 06:09:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239736AbiKQLIP (ORCPT ); Thu, 17 Nov 2022 06:08:15 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4075531FB3; Thu, 17 Nov 2022 03:08:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668683291; x=1700219291; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LBHKobpk/VhTDX4eSeyn9vK1zVXcs+GCnxTGHrxO5To=; b=V94tzEgi/ezsUIHZq+vGkaOsch6tpfBJ1jCptoi3UB8L3E8+9Txt6bsq ewqlA6oQVE0nFesmm11HhuzGERhBYOkZRJe2Dd/T2garH3KQiIr8+0TPm pBEbsS9TWm1eDxFcCBOVRyAPKfahtfSormwU/saAT27XuZ4zj03wRtrcf 57uKx2Rc12W5Pu0Ibr9pVdiRquBxv6mVDeCEq98yWfFaos65zkhB231x5 cHlAHf5mMpUIMJwsC/sf2mzuvg0TY2qUTzEb6cYC5LZvkNZ+himJNIWWb IM/SiNZqfqJP2pOhuEiLUqUTUXLnbn2uAGuPQrm0z/mCc8YgEc0/c9KrX A==; X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="296186172" X-IronPort-AV: E=Sophos;i="5.96,171,1665471600"; d="scan'208";a="296186172" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2022 03:08:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="639763892" X-IronPort-AV: E=Sophos;i="5.96,171,1665471600"; d="scan'208";a="639763892" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 17 Nov 2022 03:07:58 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 4725A41A; Thu, 17 Nov 2022 13:08:23 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mika Westerberg , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Hans de Goede , Thierry Reding , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org Cc: Andy Shevchenko , Linus Walleij Subject: [PATCH v5 5/7] pwm: lpss: Rename pwm_lpss_probe() --> devm_pwm_lpss_probe() Date: Thu, 17 Nov 2022 13:08:04 +0200 Message-Id: <20221117110806.65470-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221117110806.65470-1-andriy.shevchenko@linux.intel.com> References: <20221117110806.65470-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?1749741414430602457?= X-GMAIL-MSGID: =?utf-8?q?1749741414430602457?= 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 */