device/generic/common
リビジョン | 4870ff9f794c40a28fb3f1ddde7d44e7f8c09e57 (tree) |
---|---|
日時 | 2018-06-21 19:52:20 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
コミッター | Chih-Wei Huang |
tp_smapi: fix a building issue with clang
The clang complains:
/android-x86/out/target/product/x86_64/obj/kmodule/tp_smapi/tp_smapi.c:202:14: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions
1 error generated.
@@ -107,7 +107,7 @@ static struct { u8 rc; char *msg; int ret; } smapi_retcode[] = | ||
107 | 107 | |
108 | 108 | #define SMAPI_MAX_RETRIES 10 |
109 | 109 | #define SMAPI_PORT2 0x4F /* fixed port, meaning unclear */ |
110 | -static unsigned short smapi_port; /* APM control port, normally 0xB2 */ | |
110 | +static u16 smapi_port; /* APM control port, normally 0xB2 */ | |
111 | 111 | |
112 | 112 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) |
113 | 113 | static DECLARE_MUTEX(smapi_mutex); |
@@ -199,7 +199,7 @@ static int smapi_request(u32 inEBX, u32 inECX, | ||
199 | 199 | "=m"(tmpEDI), |
200 | 200 | "=m"(tmpESI) |
201 | 201 | :"m"(inEBX), "m"(inECX), "m"(inEDI), "m"(inESI), |
202 | - "m"((u16)smapi_port) | |
202 | + "m"(smapi_port) | |
203 | 203 | :"%eax", "%ebx", "%ecx", "%edx", "%edi", |
204 | 204 | "%esi"); |
205 | 205 |