Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: use asm-generic/termios.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

+1 -33
+1 -33
include/asm-powerpc/termios.h
··· 96 96 97 97 #ifdef __KERNEL__ 98 98 99 - /* 100 - * Translate a "termio" structure into a "termios". Ugh. 101 - */ 102 - #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ 103 - unsigned short __tmp; \ 104 - get_user(__tmp,&(termio)->x); \ 105 - (termios)->x = (0xffff0000 & (termios)->x) | __tmp; \ 106 - } 107 - 108 - #define user_termio_to_kernel_termios(termios, termio) \ 109 - ({ \ 110 - SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ 111 - SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ 112 - SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ 113 - SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ 114 - copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ 115 - }) 116 - 117 - /* 118 - * Translate a "termios" structure into a "termio". Ugh. 119 - */ 120 - #define kernel_termios_to_user_termio(termio, termios) \ 121 - ({ \ 122 - put_user((termios)->c_iflag, &(termio)->c_iflag); \ 123 - put_user((termios)->c_oflag, &(termio)->c_oflag); \ 124 - put_user((termios)->c_cflag, &(termio)->c_cflag); \ 125 - put_user((termios)->c_lflag, &(termio)->c_lflag); \ 126 - put_user((termios)->c_line, &(termio)->c_line); \ 127 - copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ 128 - }) 129 - 130 - #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) 131 - #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) 99 + #include <asm-generic/termios.h> 132 100 133 101 #endif /* __KERNEL__ */ 134 102