aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Jakobi2017-10-10 05:12:52 -0500
committerBas Nieuwenhuizen2017-10-20 16:38:54 -0500
commit09be54122fbd145d23751eddf7be5b220774a117 (patch)
tree4b42e8a4d8a587bfc0d5c86b3dcc9f6ea1e58e03 /xf86drmMode.c
parent35bc82cee9aab62d556e2ea6dfe29f71ce13dcb3 (diff)
downloadexternal-libgbm-09be54122fbd145d23751eddf7be5b220774a117.tar.gz
external-libgbm-09be54122fbd145d23751eddf7be5b220774a117.tar.xz
external-libgbm-09be54122fbd145d23751eddf7be5b220774a117.zip
Add const qualifier to arguments of drmModeAddFB2()
Both drmModeAddFB2() and drmModeAddFB2WithModifiers() have some arguments that are just pointers to uint32_t in disguise. These are not modified (just copied) in the function, so we can add a const qualifier here. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Diffstat (limited to 'xf86drmMode.c')
-rw-r--r--xf86drmMode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xf86drmMode.c b/xf86drmMode.c
index d3bc20ea..2b3887b3 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -271,9 +271,9 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
271} 271}
272 272
273int drmModeAddFB2WithModifiers(int fd, uint32_t width, uint32_t height, 273int drmModeAddFB2WithModifiers(int fd, uint32_t width, uint32_t height,
274 uint32_t pixel_format, uint32_t bo_handles[4], 274 uint32_t pixel_format, const uint32_t bo_handles[4],
275 uint32_t pitches[4], uint32_t offsets[4], 275 const uint32_t pitches[4], const uint32_t offsets[4],
276 uint64_t modifier[4], uint32_t *buf_id, uint32_t flags) 276 const uint64_t modifier[4], uint32_t *buf_id, uint32_t flags)
277{ 277{
278 struct drm_mode_fb_cmd2 f; 278 struct drm_mode_fb_cmd2 f;
279 int ret; 279 int ret;
@@ -297,8 +297,8 @@ int drmModeAddFB2WithModifiers(int fd, uint32_t width, uint32_t height,
297} 297}
298 298
299int drmModeAddFB2(int fd, uint32_t width, uint32_t height, 299int drmModeAddFB2(int fd, uint32_t width, uint32_t height,
300 uint32_t pixel_format, uint32_t bo_handles[4], 300 uint32_t pixel_format, const uint32_t bo_handles[4],
301 uint32_t pitches[4], uint32_t offsets[4], 301 const uint32_t pitches[4], const uint32_t offsets[4],
302 uint32_t *buf_id, uint32_t flags) 302 uint32_t *buf_id, uint32_t flags)
303{ 303{
304 return drmModeAddFB2WithModifiers(fd, width, height, 304 return drmModeAddFB2WithModifiers(fd, width, height,