summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-04-13 02:12:26 +0300
committerDave Airlie <airlied@redhat.com>2017-04-13 02:12:26 +0300
commit97d93f35493f39c2b79e3379b30c17a2d00ec19d (patch)
treec318768a9cd8892af970f666113ce1100f2169dc /drivers
parentc7aae6221f73312bb66464c353eb45d91433aea1 (diff)
parent0c45b36f8acc89cb94c8696a27574f01e0e411dc (diff)
downloadlinux-97d93f35493f39c2b79e3379b30c17a2d00ec19d.tar.xz
Merge tag 'drm-misc-fixes-2017-04-11' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes
drm-misc-fixes for 2017-04-11 Core changes: - None Driver changes - udl: Fix unaligned memory access on SPARC (Jonathan) * tag 'drm-misc-fixes-2017-04-11' of git://anongit.freedesktop.org/git/drm-misc: drm/udl: Fix unaligned memory access in udl_render_hline
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/udl/udl_transfer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_transfer.c b/drivers/gpu/drm/udl/udl_transfer.c
index 917dcb978c2c..0c87b1ac6b68 100644
--- a/drivers/gpu/drm/udl/udl_transfer.c
+++ b/drivers/gpu/drm/udl/udl_transfer.c
@@ -14,6 +14,7 @@
#include <linux/slab.h>
#include <linux/fb.h>
#include <linux/prefetch.h>
+#include <asm/unaligned.h>
#include <drm/drmP.h>
#include "udl_drv.h"
@@ -163,7 +164,7 @@ static void udl_compress_hline16(
const u8 *const start = pixel;
const uint16_t repeating_pixel_val16 = pixel_val16;
- *(uint16_t *)cmd = cpu_to_be16(pixel_val16);
+ put_unaligned_be16(pixel_val16, cmd);
cmd += 2;
pixel += bpp;