diff options
| author | riastradh <riastradh@NetBSD.org> | 2021-12-19 12:37:07 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2021-12-19 12:37:07 +0000 |
| commit | 200121c44ec00aca5bc83123bf6c4b18227db307 (patch) | |
| tree | 81f726eab359d1c7152d328a8a64a9c9119ceaf1 /sys/external/bsd/drm2/include | |
| parent | 8501971382704f6ac3703aa4c8b517bd6adf9a16 (diff) | |
drm: Make resource_size return resource_size_t like Linux.
Because Linux uses resource_size_t for absolute bus addresses, it is
actually bus_addr_t rather than bus_size_t. So using bus_size_t here
causes trouble with the i915 range_overflows macro, which verifies
that types match.
Diffstat (limited to 'sys/external/bsd/drm2/include')
| -rw-r--r-- | sys/external/bsd/drm2/include/linux/ioport.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/external/bsd/drm2/include/linux/ioport.h b/sys/external/bsd/drm2/include/linux/ioport.h index 60b90eeb7a4..40c03afdc4b 100644 --- a/sys/external/bsd/drm2/include/linux/ioport.h +++ b/sys/external/bsd/drm2/include/linux/ioport.h @@ -1,4 +1,4 @@ -/* $NetBSD: ioport.h,v 1.7 2021/12/19 11:55:38 riastradh Exp $ */ +/* $NetBSD: ioport.h,v 1.8 2021/12/19 12:37:07 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -35,6 +35,8 @@ #include <sys/types.h> #include <sys/bus.h> +#include <linux/types.h> + #define IORESOURCE_IO __BIT(0) #define IORESOURCE_MEM __BIT(1) #define IORESOURCE_IRQ __BIT(2) @@ -52,7 +54,7 @@ struct resource { #define DEFINE_RES_MEM(START, SIZE) \ { .start = (START), .end = (START) + ((SIZE) - 1) } -static inline bus_size_t +static inline resource_size_t resource_size(struct resource *resource) { return resource->end - resource->start + 1; |
