From mboxrd@z Thu Jan 1 00:00:00 1970 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 753FDC38145 for ; Tue, 6 Sep 2022 20:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231139AbiIFUEO (ORCPT ); Tue, 6 Sep 2022 16:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbiIFUDr (ORCPT ); Tue, 6 Sep 2022 16:03:47 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FE1765579; Tue, 6 Sep 2022 12:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662494355; x=1694030355; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=izGqgEeQ+2S5i/8XpF8G2iUsbA8rokGB0E1o5WtheX8=; b=LgEMqSK3wNfuYzoSO2R5Msm/Ce7XzDZHinV9HyRpSyeJshe45FEDkMyq 75gL6M155u3IvEs29l7rVXpuOAaMKZrSdXkpf830zcoSKidKOYkeRqsQG nFbQbpFtLizTo6cmBniGdmYsqWr8U8nZ74231WlrCxHn/i7s21VrEmuBx 778ikQVe+KVwtQdZMBtlpomwCReeraTrtihiGxfaq9IWBIZAs7SiCYxRz VM0kdFearFzaNbQj/wD7l9fkLr+deWDqYBoYmMVpGYDAr12b2Sf3QecjZ gXL/L8CdmCnypQfDZeWtZYfBo+VGhkwXyn07mIGjXJEk+3qu6UjgmXT52 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10462"; a="283688181" X-IronPort-AV: E=Sophos;i="5.93,294,1654585200"; d="scan'208";a="283688181" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2022 12:57:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,294,1654585200"; d="scan'208";a="859376467" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 06 Sep 2022 12:57:30 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 238A245C; Tue, 6 Sep 2022 22:57:46 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org Cc: Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Subject: [PATCH v1 5/9] pwm: lpss: Use device_get_match_data to get device data Date: Tue, 6 Sep 2022 22:57:31 +0300 Message-Id: <20220906195735.87361-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220906195735.87361-1-andriy.shevchenko@linux.intel.com> References: <20220906195735.87361-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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-platform.c index af57472f3ddc..beb707d67b99 100644 --- a/drivers/pwm/pwm-lpss-platform.c +++ b/drivers/pwm/pwm-lpss-platform.c @@ -7,27 +7,25 @@ * Derived from the original pwm-lpss.c */ -#include #include +#include #include #include #include +#include #include "pwm-lpss.h" 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; - id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev); - if (!id) + info = device_get_match_data(&pdev->dev); + if (!info) return -ENODEV; - info = (const struct pwm_lpss_boardinfo *)id->driver_data; - base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); -- 2.35.1