]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
m68k: stmark2: use ioport.h macros for resources
authorAngelo Dureghello <adureghello@baylibre.com>
Wed, 10 Jun 2026 20:35:11 +0000 (22:35 +0200)
committerGreg Ungerer <gerg@kernel.org>
Thu, 11 Jun 2026 08:01:48 +0000 (18:01 +1000)
Change resource declaration using DEFINE_RES_*() macros.
DEFINE_DMA_RES() is for a single dma channel, not a range, so used twice.

Also, some drivers assume IRQ resources are from index 1, so just to stay
uniform, moved IRQ resource at index 1.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/m68k/coldfire/stmark2.c

index 9263b77bd09a9c80cf5faeb30659464c81f1e487..7eed6097f501a117dd3706af31954894f0b2b5a4 100644 (file)
@@ -8,6 +8,7 @@
  * for more details.
  */
 
+#include <linux/ioport.h>
 #include <linux/platform_device.h>
 #include <linux/mtd/partitions.h>
 #include <linux/spi/spi.h>
@@ -62,21 +63,10 @@ static struct fsl_dspi_platform_data dspi_spi0_info = {
 };
 
 static struct resource dspi_spi0_resource[] = {
-       [0] = {
-               .start = MCFDSPI_BASE0,
-               .end   = MCFDSPI_BASE0 + 0xFF,
-               .flags = IORESOURCE_MEM,
-               },
-       [1] = {
-               .start = 12,
-               .end   = 13,
-               .flags = IORESOURCE_DMA,
-       },
-       [2] = {
-               .start = MCF_IRQ_DSPI0,
-               .end   = MCF_IRQ_DSPI0,
-               .flags = IORESOURCE_IRQ,
-       },
+       DEFINE_RES_MEM(MCFDSPI_BASE0, 0x100),
+       DEFINE_RES_IRQ(MCF_IRQ_DSPI0),
+       DEFINE_RES_DMA(12),
+       DEFINE_RES_DMA(13),
 };
 
 static u64 stmark2_dspi_mask = DMA_BIT_MASK(32);