diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2020-03-16 17:42:49 +0100 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2020-03-21 21:17:29 +0100 |
commit | f019190b7d2708baec0732c5e915923430eab8dc (patch) | |
tree | 3c6a4d82d2f510b1027082ab69876b217440df72 /include/drm | |
parent | dt-bindings: display: grammar fixes in panel/ (diff) | |
download | linux-f019190b7d2708baec0732c5e915923430eab8dc.tar.xz linux-f019190b7d2708baec0732c5e915923430eab8dc.zip |
drm/mipi-dbi: Make mipi_dbi_command_stackbuf() data parameter const
mipi_dbi_command_stackbuf() copies the passed buffer data, so it can be
const.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200316164249.6234-1-geert+renesas@glider.be
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_mipi_dbi.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/drm/drm_mipi_dbi.h b/include/drm/drm_mipi_dbi.h index 30ebdfd8a51f..0ef004001775 100644 --- a/include/drm/drm_mipi_dbi.h +++ b/include/drm/drm_mipi_dbi.h @@ -170,7 +170,8 @@ int mipi_dbi_spi_transfer(struct spi_device *spi, u32 speed_hz, int mipi_dbi_command_read(struct mipi_dbi *dbi, u8 cmd, u8 *val); int mipi_dbi_command_buf(struct mipi_dbi *dbi, u8 cmd, u8 *data, size_t len); -int mipi_dbi_command_stackbuf(struct mipi_dbi *dbi, u8 cmd, u8 *data, size_t len); +int mipi_dbi_command_stackbuf(struct mipi_dbi *dbi, u8 cmd, const u8 *data, + size_t len); int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb, struct drm_rect *clip, bool swap); /** @@ -187,7 +188,7 @@ int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb, */ #define mipi_dbi_command(dbi, cmd, seq...) \ ({ \ - u8 d[] = { seq }; \ + const u8 d[] = { seq }; \ mipi_dbi_command_stackbuf(dbi, cmd, d, ARRAY_SIZE(d)); \ }) |