summaryrefslogtreecommitdiff
path: root/drivers/video
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/video
parent1c91d2c6915b288bc8595b21d37e1bb662a40e55 (diff)
parentc02205e9f3f8e4429e5531981906bf25282938b7 (diff)
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/video')
-rw-r--r--drivers/video/fbdev/hpfb.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/video/fbdev/hpfb.c b/drivers/video/fbdev/hpfb.c
index 16f16f5e1a4b..9230db9ea94b 100644
--- a/drivers/video/fbdev/hpfb.c
+++ b/drivers/video/fbdev/hpfb.c
@@ -377,7 +377,6 @@ static struct dio_driver hpfb_driver = {
int __init hpfb_init(void)
{
unsigned int sid;
- mm_segment_t fs;
unsigned char i;
int err;
@@ -402,10 +401,7 @@ int __init hpfb_init(void)
if (err)
return err;
- fs = get_fs();
- set_fs(KERNEL_DS);
- err = get_user(i, (unsigned char *)INTFBVADDR + DIO_IDOFF);
- set_fs(fs);
+ err = probe_kernel_read(&i, (unsigned char *)INTFBVADDR + DIO_IDOFF, 1);
if (!err && (i == DIO_ID_FBUFFER) && topcat_sid_ok(sid = DIO_SECID(INTFBVADDR))) {
if (!request_mem_region(INTFBPADDR, DIO_DEVSIZE, "Internal Topcat"))