From: Heiko Carstens Date: Fri, 8 Feb 2008 12:18:39 +0000 (-0800) Subject: tty: let architectures override the user/kernel macros. X-Git-Tag: Ubuntu-goldfish-3.4.0-4.27~20211 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=aa7738a5f503abea5445cdd8cc2d501502c748ae;p=mirror_ubuntu-zesty-kernel.git tty: let architectures override the user/kernel macros. Give architectures that support the new termios2 the possibilty to overide the user_termios_to_kernel_termios and kernel_termios_to_user_termios macros. As soon as all architectures that use the generic variant have been converted the ifdefs can go away again. Architectures in question are avr32, frv, powerpc and s390. Cc: Alan Cox Cc: Paul Mackerras Cc: David Howells Cc: Haavard Skinnemoen Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-generic/termios.h b/include/asm-generic/termios.h index 33dca30a3c45..7d39ecc92d94 100644 --- a/include/asm-generic/termios.h +++ b/include/asm-generic/termios.h @@ -61,8 +61,14 @@ static inline int kernel_termios_to_user_termio(struct termio __user *termio, return 0; } +#ifndef user_termios_to_kernel_termios #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) +#endif + +#ifndef kernel_termios_to_user_termios #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) +#endif + #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))