aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-06 22:06:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-06 22:06:11 -0700
commit90880b532a7ebd13a052d6c410807b33809a3efb (patch)
treecae2ad7874c8d8f29e30a0bea43dd29752a8fba4 /drivers/input
parentMerge branch 'misc.alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff)
parentdio: use probe_kernel_read() (diff)
downloadlinux-dev-90880b532a7ebd13a052d6c410807b33809a3efb.tar.xz
linux-dev-90880b532a7ebd13a052d6c410807b33809a3efb.zip
Merge branch 'work.probe_kernel_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull probe_kernel_read() uses from Al Viro: "Several open-coded probe_kernel_read()..." * 'work.probe_kernel_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: dio: use probe_kernel_read() hp_sdc: use probe_kernel_read() hpfb: use probe_kernel_read()
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/serio/hp_sdc.c6
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) {