From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Daniel Mack <daniel@zonque.org>,
"Haojian Zhuang" <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v1 5/6] spi: pxa2xx: Move OF and ACPI ID tables closer to their user
Date: Tue, 18 Oct 2022 10:16:01 +0100 [thread overview]
Message-ID: <20221018101601.00007888@huawei.com> (raw)
In-Reply-To: <20221017171243.57078-5-andriy.shevchenko@linux.intel.com>
On Mon, 17 Oct 2022 20:12:42 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> 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 <andriy.shevchenko@linux.intel.com>
Seems sensible.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
> 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",
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Daniel Mack <daniel@zonque.org>,
"Haojian Zhuang" <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v1 5/6] spi: pxa2xx: Move OF and ACPI ID tables closer to their user
Date: Tue, 18 Oct 2022 10:16:01 +0100 [thread overview]
Message-ID: <20221018101601.00007888@huawei.com> (raw)
In-Reply-To: <20221017171243.57078-5-andriy.shevchenko@linux.intel.com>
On Mon, 17 Oct 2022 20:12:42 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> 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 <andriy.shevchenko@linux.intel.com>
Seems sensible.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
> 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
next prev parent reply other threads:[~2022-10-18 9:16 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 17:12 [PATCH v1 1/6] spi: pxa2xx: Simplify with devm_platform_get_and_ioremap_resource() Andy Shevchenko
2022-10-17 17:12 ` Andy Shevchenko
2022-10-17 17:12 ` [PATCH v1 2/6] spi: pxa2xx: Respect Intel SSP type given by a property Andy Shevchenko
2022-10-17 17:12 ` Andy Shevchenko
2022-10-17 17:17 ` Mark Brown
2022-10-17 17:17 ` Mark Brown
2022-10-17 17:34 ` Andy Shevchenko
2022-10-17 17:34 ` Andy Shevchenko
2022-10-17 17:12 ` [PATCH v1 3/6] spi: pxa2xx: Remove no more needed PCI ID table Andy Shevchenko
2022-10-17 17:12 ` Andy Shevchenko
2022-10-17 17:18 ` Mark Brown
2022-10-17 17:18 ` Mark Brown
2022-10-17 17:35 ` Andy Shevchenko
2022-10-17 17:35 ` Andy Shevchenko
2022-10-17 17:39 ` Mark Brown
2022-10-17 17:39 ` Mark Brown
2022-10-17 17:41 ` Andy Shevchenko
2022-10-17 17:41 ` Andy Shevchenko
2022-10-18 11:42 ` Mark Brown
2022-10-18 11:42 ` Mark Brown
2022-10-19 15:06 ` Andy Shevchenko
2022-10-19 15:06 ` Andy Shevchenko
2022-10-19 15:50 ` Mark Brown
2022-10-19 15:50 ` Mark Brown
2022-10-20 16:18 ` Andy Shevchenko
2022-10-20 16:18 ` Andy Shevchenko
2022-10-20 16:25 ` Mark Brown
2022-10-20 16:25 ` Mark Brown
2022-10-20 16:42 ` Andy Shevchenko
2022-10-20 16:42 ` Andy Shevchenko
2022-10-20 16:58 ` Mark Brown
2022-10-20 16:58 ` Mark Brown
2022-10-20 17:03 ` Andy Shevchenko
2022-10-20 17:03 ` Andy Shevchenko
2022-10-20 17:26 ` Mark Brown
2022-10-20 17:26 ` Mark Brown
2022-10-20 17:41 ` Andy Shevchenko
2022-10-20 17:41 ` Andy Shevchenko
2022-10-20 17:45 ` Mark Brown
2022-10-20 17:45 ` Mark Brown
2022-10-20 17:55 ` Andy Shevchenko
2022-10-20 17:55 ` Andy Shevchenko
2022-10-20 18:07 ` Mark Brown
2022-10-20 18:07 ` Mark Brown
2022-10-20 18:19 ` Andy Shevchenko
2022-10-20 18:19 ` Andy Shevchenko
2022-10-21 10:42 ` Mark Brown
2022-10-21 10:42 ` Mark Brown
2022-10-21 10:51 ` Andy Shevchenko
2022-10-21 10:51 ` Andy Shevchenko
2022-10-21 10:59 ` Mark Brown
2022-10-21 10:59 ` Mark Brown
2022-10-21 11:15 ` Andy Shevchenko
2022-10-21 11:15 ` Andy Shevchenko
2022-10-21 12:28 ` Mark Brown
2022-10-21 12:28 ` Mark Brown
2022-10-21 12:46 ` Andy Shevchenko
2022-10-21 12:46 ` Andy Shevchenko
2022-10-17 17:42 ` Mark Brown
2022-10-17 17:42 ` Mark Brown
2022-10-17 17:12 ` [PATCH v1 4/6] spi: pxa2xx: Remove no more needed driver data Andy Shevchenko
2022-10-17 17:12 ` Andy Shevchenko
2022-10-17 17:12 ` [PATCH v1 5/6] spi: pxa2xx: Move OF and ACPI ID tables closer to their user Andy Shevchenko
2022-10-17 17:12 ` Andy Shevchenko
2022-10-18 9:16 ` Jonathan Cameron [this message]
2022-10-18 9:16 ` Jonathan Cameron
2022-10-17 17:12 ` [PATCH v1 6/6] spi: pxa2xx: Switch from PM ifdeffery to pm_ptr() Andy Shevchenko
2022-10-17 17:12 ` Andy Shevchenko
2022-10-17 17:19 ` Mark Brown
2022-10-17 17:19 ` Mark Brown
2022-10-17 17:35 ` Andy Shevchenko
2022-10-17 17:35 ` Andy Shevchenko
2022-10-18 9:14 ` Jonathan Cameron
2022-10-18 9:14 ` Jonathan Cameron
2022-10-18 12:23 ` Andy Shevchenko
2022-10-18 12:23 ` Andy Shevchenko
2022-10-19 12:05 ` (subset) [PATCH v1 1/6] spi: pxa2xx: Simplify with devm_platform_get_and_ioremap_resource() Mark Brown
2022-10-19 12:05 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221018101601.00007888@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.