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 B11F5C4332F for ; Tue, 18 Oct 2022 09:16:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230456AbiJRJQG (ORCPT ); Tue, 18 Oct 2022 05:16:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230143AbiJRJQF (ORCPT ); Tue, 18 Oct 2022 05:16:05 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C326787FA7; Tue, 18 Oct 2022 02:16:04 -0700 (PDT) Received: from fraeml744-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Ms7Tm2ZwXz687Jl; Tue, 18 Oct 2022 17:14:20 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by fraeml744-chm.china.huawei.com (10.206.15.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 11:16:03 +0200 Received: from localhost (10.202.226.42) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 10:16:02 +0100 Date: Tue, 18 Oct 2022 10:16:01 +0100 From: Jonathan Cameron To: Andy Shevchenko CC: , , , Daniel Mack , "Haojian Zhuang" , Robert Jarzmik , Mark Brown Subject: Re: [PATCH v1 5/6] spi: pxa2xx: Move OF and ACPI ID tables closer to their user Message-ID: <20221018101601.00007888@huawei.com> In-Reply-To: <20221017171243.57078-5-andriy.shevchenko@linux.intel.com> References: <20221017171243.57078-1-andriy.shevchenko@linux.intel.com> <20221017171243.57078-5-andriy.shevchenko@linux.intel.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.42] X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org On Mon, 17 Oct 2022 20:12:42 +0300 Andy Shevchenko wrote: > 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 Seems sensible. 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 31927493eeb0..76046612466d 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" }, > - { "INT33C1" }, > - { "INT3430" }, > - { "INT3431" }, > - { "80860F0E" }, > - { "8086228E" }, > - { }, > -}; > -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; > @@ -1759,6 +1740,25 @@ static const struct dev_pm_ops pxa2xx_spi_pm_ops = { > pxa2xx_spi_runtime_resume, NULL) > }; > > +#ifdef CONFIG_ACPI > +static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { > + { "80860F0E" }, > + { "8086228E" }, > + { "INT33C0" }, > + { "INT33C1" }, > + { "INT3430" }, > + { "INT3431" }, > + {} > +}; > +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", 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 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 B1094C4332F for ; Tue, 18 Oct 2022 09:17:02 +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:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vTdfUoz0bTTuU19O1WPUo6zmWLZF7gQjymDFRVIxil0=; b=ghi8HsLgb8KWFD aif6cqk3A5IpjDsWNg2sVjbH6CRP1GxELDBb8jPFwlT0mS3bPPFqXes1pF59th6F9sDeFEAmC/Hve SJU4L5gMckz+4MdLLo67V2U/801loyxYPpLmqv5TKdUnwr5lDVTS2rCaQy8WBwEyNESd/k3YUWDgk 4IdYv0LEHqJk/rAOc0qqA+Z0tm+jvDLiSAcCvK5giOiPpS+pCTKUy73NDF3mZJCGPbh24GIWBLqQv UU5MGLk7aFua7vG5lvCUvFP/DNNhQ81qLK8xG6qIlOkctKdNLSjJiaR6IJIsbdMPwxNmcjqutq5wG f1W/2dh8hp7THytGXl8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okihj-004oCb-Bq; Tue, 18 Oct 2022 09:16:07 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okihg-004oBX-UL for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2022 09:16:06 +0000 Received: from fraeml744-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Ms7Tm2ZwXz687Jl; Tue, 18 Oct 2022 17:14:20 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by fraeml744-chm.china.huawei.com (10.206.15.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 11:16:03 +0200 Received: from localhost (10.202.226.42) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 10:16:02 +0100 Date: Tue, 18 Oct 2022 10:16:01 +0100 From: Jonathan Cameron To: Andy Shevchenko CC: , , , Daniel Mack , "Haojian Zhuang" , Robert Jarzmik , Mark Brown Subject: Re: [PATCH v1 5/6] spi: pxa2xx: Move OF and ACPI ID tables closer to their user Message-ID: <20221018101601.00007888@huawei.com> In-Reply-To: <20221017171243.57078-5-andriy.shevchenko@linux.intel.com> References: <20221017171243.57078-1-andriy.shevchenko@linux.intel.com> <20221017171243.57078-5-andriy.shevchenko@linux.intel.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; i686-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.202.226.42] X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221018_021605_170042_D3B8B14C X-CRM114-Status: GOOD ( 17.84 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 17 Oct 2022 20:12:42 +0300 Andy Shevchenko wrote: > 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 Seems sensible. 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 31927493eeb0..76046612466d 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" }, > - { "INT33C1" }, > - { "INT3430" }, > - { "INT3431" }, > - { "80860F0E" }, > - { "8086228E" }, > - { }, > -}; > -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; > @@ -1759,6 +1740,25 @@ static const struct dev_pm_ops pxa2xx_spi_pm_ops = { > pxa2xx_spi_runtime_resume, NULL) > }; > > +#ifdef CONFIG_ACPI > +static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { > + { "80860F0E" }, > + { "8086228E" }, > + { "INT33C0" }, > + { "INT33C1" }, > + { "INT3430" }, > + { "INT3431" }, > + {} > +}; > +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", _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel