pmaports/device/linux-htc-vision/fix-boot-gcc5.patch
Matthias Berndt 33900c7889
New device: htc-vision (HTC Desire Z/G2) (!132)
Based on cmdrwgls original work from:
https://github.com/postmarketOS/pmbootstrap/pull/810

Fixed to actually boot, compile with GCC-6, and the touch screen is
working!

[skip ci]: already passed CI
2019-02-12 22:19:59 +01:00

25 lines
724 B
Diff

diff --git a/include/linux/unaligned/le_byteshift.h b/include/linux/unaligned/le_byteshift.h
index be376fb79..ab14cb194 100644
--- a/include/linux/unaligned/le_byteshift.h
+++ b/include/linux/unaligned/le_byteshift.h
@@ -5,17 +5,17 @@
static inline u16 __get_unaligned_le16(const u8 *p)
{
- return p[0] | p[1] << 8;
+ return p[0] + (p[1] << 8);
}
static inline u32 __get_unaligned_le32(const u8 *p)
{
- return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
+ return p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24);
}
static inline u64 __get_unaligned_le64(const u8 *p)
{
- return (u64)__get_unaligned_le32(p + 4) << 32 |
+ return ((u64)__get_unaligned_le32(p + 4) << 32) +
__get_unaligned_le32(p);
}