From: Colin Foster Date: Mon, 5 Sep 2022 16:21:30 +0000 (-0700) Subject: resource: add define macro for register address resources X-Git-Tag: v6.6.17~6462^2~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39f7d0832c28a6a31abb5b7363e7b1ba0714fe18;p=platform%2Fkernel%2Flinux-rpi.git resource: add define macro for register address resources DEFINE_RES_ macros have been created for the commonly used resource types, but not IORESOURCE_REG. Add the macro so it can be used in a similar manner to all other resource types. Signed-off-by: Colin Foster Reviewed-by: Vladimir Oltean Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220905162132.2943088-7-colin.foster@in-advantage.com --- diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 616b683..8a76dca 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -172,6 +172,11 @@ enum { #define DEFINE_RES_MEM(_start, _size) \ DEFINE_RES_MEM_NAMED((_start), (_size), NULL) +#define DEFINE_RES_REG_NAMED(_start, _size, _name) \ + DEFINE_RES_NAMED((_start), (_size), (_name), IORESOURCE_REG) +#define DEFINE_RES_REG(_start, _size) \ + DEFINE_RES_REG_NAMED((_start), (_size), NULL) + #define DEFINE_RES_IRQ_NAMED(_irq, _name) \ DEFINE_RES_NAMED((_irq), 1, (_name), IORESOURCE_IRQ) #define DEFINE_RES_IRQ(_irq) \