From nobody Mon Apr 6 11:21:13 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BFFBC38145 for ; Thu, 8 Sep 2022 13:57:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232560AbiIHN5g (ORCPT ); Thu, 8 Sep 2022 09:57:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232206AbiIHN5B (ORCPT ); Thu, 8 Sep 2022 09:57:01 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69666F8242; Thu, 8 Sep 2022 06:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662645419; x=1694181419; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uBscJFQbw18Si2rbAy+SrsNOerjt4LJIPX+P611o7xg=; b=jhzUtDKD0CiiOaqI5BTuQVaY/jVq4sROeEzGyQuMEoULBtqc8s2a7KCQ UT70E/08ewC4X6oS4Y1CipaUcLutUmLkEoOjXfr98SzPcUVBBRYrbanHu 3Tk3zn4XKAhEIvvklHJo7FI9VNphx9vFxFuux0IT4L7P+7//C0vskZtCF 9AVl6+Aj0/pjos77nghNDz7WBeTvR1CYjSR41KulM2lBMOH2e4RJomnMY 8SLno6MH6acZI4p4EP6goEJZ/gK52f4z5J87M0/MH873LOsRyqULdpcFG gr8XDl6E4vXxIQhTzORfwNLu3rnuUSAsI21KbtojLZ91LYA8WvbnAQAIT w==; X-IronPort-AV: E=McAfee;i="6500,9779,10464"; a="297174067" X-IronPort-AV: E=Sophos;i="5.93,300,1654585200"; d="scan'208";a="297174067" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2022 06:56:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,300,1654585200"; d="scan'208";a="704012689" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 08 Sep 2022 06:56:48 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 90AE350D; Thu, 8 Sep 2022 16:57:02 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org Cc: Thierry Reding Subject: [PATCH v2 5/9] pwm: lpss: Use device_get_match_data to get device data Date: Thu, 8 Sep 2022 16:56:54 +0300 Message-Id: <20220908135658.64463-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220908135658.64463-1-andriy.shevchenko@linux.intel.com> References: <20220908135658.64463-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" device_get_match_data() in ACPI case calls similar to the acpi_match_device(). We may simplify the code and make it generic by replacing the latter with the former. Signed-off-by: Andy Shevchenko Acked-by: Uwe Kleine-K=C3=B6nig --- drivers/pwm/pwm-lpss-platform.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/pwm/pwm-lpss-platform.c b/drivers/pwm/pwm-lpss-platfor= m.c index 7bbbb7a9b578..c48c6f2b2cd8 100644 --- a/drivers/pwm/pwm-lpss-platform.c +++ b/drivers/pwm/pwm-lpss-platform.c @@ -7,11 +7,12 @@ * Derived from the original pwm-lpss.c */ =20 -#include #include +#include #include #include #include +#include =20 #include "pwm-lpss.h" =20 @@ -19,16 +20,13 @@ static int pwm_lpss_probe_platform(struct platform_device *pdev) { const struct pwm_lpss_boardinfo *info; - const struct acpi_device_id *id; struct pwm_lpss_chip *lpwm; void __iomem *base; =20 - id =3D acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev); - if (!id) + info =3D device_get_match_data(&pdev->dev); + if (!info) return -ENODEV; =20 - info =3D (const struct pwm_lpss_boardinfo *)id->driver_data; - base =3D devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); --=20 2.35.1