diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-05-27 06:47:39 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-05-27 22:41:21 +0300 |
commit | f9f5796e7a534cc99cee577be47e109d5123baf1 (patch) | |
tree | 8a94ee11c71b9359f6b87fc2b10e3684b0cc056b /drivers/input/serio | |
parent | fd7e8816990b12143c0872822b524ab7d956c3ae (diff) | |
download | linux-f9f5796e7a534cc99cee577be47e109d5123baf1.tar.xz |
hp_sdc: use probe_kernel_read()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/hp_sdc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c index 559c99ca6592..1bfdae4b0d99 100644 --- a/drivers/input/serio/hp_sdc.c +++ b/drivers/input/serio/hp_sdc.c @@ -1001,7 +1001,6 @@ static int __init hp_sdc_register(void) uint8_t tq_init_seq[5]; struct semaphore tq_init_sem; #if defined(__mc68000__) - mm_segment_t fs; unsigned char i; #endif @@ -1026,11 +1025,8 @@ static int __init hp_sdc_register(void) hp_sdc.base_io = (unsigned long) 0xf0428000; hp_sdc.data_io = (unsigned long) hp_sdc.base_io + 1; hp_sdc.status_io = (unsigned long) hp_sdc.base_io + 3; - fs = get_fs(); - set_fs(KERNEL_DS); - if (!get_user(i, (unsigned char *)hp_sdc.data_io)) + if (!probe_kernel_read(&i, (unsigned char *)hp_sdc.data_io, 1)) hp_sdc.dev = (void *)1; - set_fs(fs); hp_sdc.dev_err = hp_sdc_init(); #endif if (hp_sdc.dev == NULL) { |