gpiolib: Disable compat ->read() code in UML case
PATCH 1/1 gpiolib: Disable compat ->read() code in UML case
It appears that UML (arch/um) has no compat.h header defined and hence can't compile a recently provided piece of code in GPIO library.
Disable compat ->read() code in UML case to avoid compilation errors.
While at it, use pattern which is already being used in the kernel elsewhere.
Fixes 5ad284ab3a01 ("gpiolib: Fix line event handling in syscall compatible mode")
Reported-by Geert Uytterhoeven <[email protected]>
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/gpio/gpiolib-cdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpiolib-cdev.c +1 -1
@@ -425,7 +425,7 @@ static __poll_t lineevent_poll(struct file *file,static ssize_t lineevent_get_size (void ) { -#ifdef __x86_64__ +#if defined(CONFIG_X86_64 ) && !defined(CONFIG_UML )/* i386 has no padding after 'id' */ if (in_ia32_syscall ()) { struct compat_gpioeevent_data {
Signature · 1 line
2.28.0
Quoted 10 lines · Andy Shevchenko
It appears that UML (
arch/um) has nocompat.hheader defined and hence can't compile a recently provided piece of code in GPIO library.Disable compat ->read() code in UML case to avoid compilation errors.
While at it, use pattern which is already being used in the kernel elsewhere.
Fixes 5ad284ab3a01 ("gpiolib: Fix line event handling in syscall compatible mode")Reported-by Geert Uytterhoeven <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
Patch applied for fixes.
Yours,
Linus Walleij