From patchwork Fri Oct 21 19:00:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13015276 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6B41C38A2D for ; Fri, 21 Oct 2022 19:01:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=K5BRdTfim1BEmCDB0bOPks8EwPh6iXgs5CvRWRmx88M=; b=H7JHZISLOHqp/A PGny2G9N0af0yj1yUqtQw+mo7H1+jRnpXsc2N3Xsu8D1HQFU+D9jcWNn0PdnXY8ibwJSE7apexPA0 IFA3rE574Lere/GupHV0hyS2upUPVNlcnmkvEQzLIFIMpJvJhXZPeNOCmGkjsNnUM+RMaoMIRYRka 4EOUChWybzs4FXBsERHnRni1kdojIjqUSS9VDgI8WdxYZxi/hcnouRadQPyiPdzqZRNJrBer4dG8M xVXQDRe9ohtEcSE9DVf3XflPyHmk50gcWmWj+wTUQidktCvAtNYV4BG4Q/8TqE9WkpjtbtdMQ3KSn S4oiE5ZOH4FfIsPQkpMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olxGN-009UYF-RB; Fri, 21 Oct 2022 19:00:59 +0000 Received: from mga17.intel.com ([192.55.52.151]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olxFf-009UDl-94 for linux-arm-kernel@lists.infradead.org; Fri, 21 Oct 2022 19:00:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666378815; x=1697914815; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=epUZWl24Whc6/mF0K7H32C3+H5vtLX0wA/mFXmwrq9w=; b=fpdxmV6nWFO1NtheAQixN3asOGebWT0LifHgrkcjliUhvDbK/Or31wQu eJe1EKuZ7/OvxKa88UTCmeCKpTml3xRQJF1SnDp6FK+zyXCa6QH4Uhrk7 M8zzAkFJIZVWmTPmKtc9rG0UgByLbza/8UtTrEP13qAi1oof6P+b15VkU 3oV/0BMS8NAe/zvOvBmCcegATKkhJPR8GZL9YLc8D+G0S73aqil6nk9jR 2x8nvM5MoCh203sb9oChZrkV4oFeovgtcScL+sUt7grN4bLnQ2+1gZgTl RMgx/OEqfebGp3bWks5sqW2vI5MKS33y+hEf5vP6NVfCCbwbymdVu7Is/ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10507"; a="287481189" X-IronPort-AV: E=Sophos;i="5.95,202,1661842800"; d="scan'208";a="287481189" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2022 12:00:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10507"; a="875798625" X-IronPort-AV: E=Sophos;i="5.95,202,1661842800"; d="scan'208";a="875798625" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 21 Oct 2022 12:00:01 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id F06C43F9; Fri, 21 Oct 2022 22:00:22 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Jonathan Cameron Subject: [PATCH v5 4/4] spi: pxa2xx: Move OF and ACPI ID tables closer to their user Date: Fri, 21 Oct 2022 22:00:18 +0300 Message-Id: <20221021190018.63646-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221021190018.63646-1-andriy.shevchenko@linux.intel.com> References: <20221021190018.63646-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221021_120015_370563_AFBE7D37 X-CRM114-Status: GOOD ( 13.30 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is no code that uses ID tables directly, except the struct device_driver at the end of the file. Hence, move tables closer to its user. It's always possible to access them via pointer to a platform device. Signed-off-by: Andy Shevchenko Reviewed-by: Jonathan Cameron --- drivers/spi/spi-pxa2xx.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 38b8af8a9c12..32cc82a89ec1 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1321,25 +1321,6 @@ static void cleanup(struct spi_device *spi) kfree(chip); } -#ifdef CONFIG_ACPI -static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { - { "INT33C0", LPSS_LPT_SSP }, - { "INT33C1", LPSS_LPT_SSP }, - { "INT3430", LPSS_LPT_SSP }, - { "INT3431", LPSS_LPT_SSP }, - { "80860F0E", LPSS_BYT_SSP }, - { "8086228E", LPSS_BSW_SSP }, - { }, -}; -MODULE_DEVICE_TABLE(acpi, pxa2xx_spi_acpi_match); -#endif - -static const struct of_device_id pxa2xx_spi_of_match[] = { - { .compatible = "marvell,mmp2-ssp", .data = (void *)MMP2_SSP }, - {}, -}; -MODULE_DEVICE_TABLE(of, pxa2xx_spi_of_match); - static bool pxa2xx_spi_idma_filter(struct dma_chan *chan, void *param) { return param == chan->device->dev; @@ -1762,6 +1743,25 @@ static const struct dev_pm_ops pxa2xx_spi_pm_ops = { RUNTIME_PM_OPS(pxa2xx_spi_runtime_suspend, pxa2xx_spi_runtime_resume, NULL) }; +#ifdef CONFIG_ACPI +static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { + { "80860F0E", LPSS_BYT_SSP }, + { "8086228E", LPSS_BSW_SSP }, + { "INT33C0", LPSS_LPT_SSP }, + { "INT33C1", LPSS_LPT_SSP }, + { "INT3430", LPSS_LPT_SSP }, + { "INT3431", LPSS_LPT_SSP }, + {} +}; +MODULE_DEVICE_TABLE(acpi, pxa2xx_spi_acpi_match); +#endif + +static const struct of_device_id pxa2xx_spi_of_match[] = { + { .compatible = "marvell,mmp2-ssp", .data = (void *)MMP2_SSP }, + {} +}; +MODULE_DEVICE_TABLE(of, pxa2xx_spi_of_match); + static struct platform_driver driver = { .driver = { .name = "pxa2xx-spi",