Changes in 4.9.325 security,selinux,smack: kill security_task_wait hook xen/gntdev: Ignore failure to unmap INVALID_GRANT_HANDLE misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer misc: rtsx_usb: use separate command and response buffers misc: rtsx_usb: set return value in rsp_buf alloc err path xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup() power/reset: arm-versatile: Fix refcount leak in versatile_reboot_probe perf/core: Fix data race between perf_event_set_output() and perf_mmap_close() ip: Fix a data-race around sysctl_fwmark_reflect. tcp/dccp: Fix a data-race around sysctl_tcp_fwmark_accept. tcp: Fix a data-race around sysctl_tcp_probe_threshold. i2c: cadence: Change large transfer count reset logic to be unconditional igmp: Fix data-races around sysctl_igmp_llm_reports. igmp: Fix a data-race around sysctl_igmp_max_memberships. tcp: Fix a data-race around sysctl_tcp_notsent_lowat. be2net: Fix buffer overflow in be_get_module_eeprom Revert "Revert "char/random: silence a lockdep splat with printk()"" mm/mempolicy: fix uninit-value in mpol_rebind_policy() bpf: Make sure mac_header was set before using it ALSA: memalloc: Align buffer allocations in page size tty: drivers/tty/, stop using tty_schedule_flip() tty: the rest, stop using tty_schedule_flip() tty: drop tty_schedule_flip() tty: extract tty_flip_buffer_commit() from tty_flip_buffer_push() tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() net: usb: ax88179_178a needs FLAG_SEND_ZLP Linux 4.9.325 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ia0b4189557d82a2402819decbcf4eb3c7a204d86
57 lines
1.1 KiB
C
57 lines
1.1 KiB
C
/*
|
|
* ebcdic keycode functions for s390 console drivers
|
|
*
|
|
* Copyright IBM Corp. 2003
|
|
* Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
|
|
*/
|
|
|
|
#include <linux/tty.h>
|
|
#include <linux/tty_flip.h>
|
|
#include <linux/keyboard.h>
|
|
|
|
#define NR_FN_HANDLER 20
|
|
|
|
struct kbd_data;
|
|
|
|
typedef void (fn_handler_fn)(struct kbd_data *);
|
|
|
|
/*
|
|
* FIXME: explain key_maps tricks.
|
|
*/
|
|
|
|
struct kbd_data {
|
|
struct tty_port *port;
|
|
unsigned short **key_maps;
|
|
char **func_table;
|
|
fn_handler_fn **fn_handler;
|
|
struct kbdiacruc *accent_table;
|
|
unsigned int accent_table_size;
|
|
unsigned int diacr;
|
|
unsigned short sysrq;
|
|
};
|
|
|
|
struct kbd_data *kbd_alloc(void);
|
|
void kbd_free(struct kbd_data *);
|
|
void kbd_ascebc(struct kbd_data *, unsigned char *);
|
|
|
|
void kbd_keycode(struct kbd_data *, unsigned int);
|
|
int kbd_ioctl(struct kbd_data *, unsigned int, unsigned long);
|
|
|
|
/*
|
|
* Helper Functions.
|
|
*/
|
|
static inline void
|
|
kbd_put_queue(struct tty_port *port, int ch)
|
|
{
|
|
tty_insert_flip_char(port, ch, 0);
|
|
tty_flip_buffer_push(port);
|
|
}
|
|
|
|
static inline void
|
|
kbd_puts_queue(struct tty_port *port, char *cp)
|
|
{
|
|
while (*cp)
|
|
tty_insert_flip_char(port, *cp++, 0);
|
|
tty_flip_buffer_push(port);
|
|
}
|