diff options
author | Colin Foster <colin.foster@in-advantage.com> | 2022-09-05 09:21:30 -0700 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2022-09-09 07:54:42 +0100 |
commit | 39f7d0832c28a6a31abb5b7363e7b1ba0714fe18 (patch) | |
tree | 72bba46c20c51f1fc70c53ca5cabb760e2ef8b17 | |
parent | 68c873363a788b604914c01269f8eac9779d9dd4 (diff) | |
download | lwn-39f7d0832c28a6a31abb5b7363e7b1ba0714fe18.tar.gz lwn-39f7d0832c28a6a31abb5b7363e7b1ba0714fe18.zip |
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 <colin.foster@in-advantage.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220905162132.2943088-7-colin.foster@in-advantage.com
-rw-r--r-- | include/linux/ioport.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 616b683563a9..8a76dca9deee 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) \ |