summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-05-26 23:44:41 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-05-27 15:41:17 -0400
commitfd7e8816990b12143c0872822b524ab7d956c3ae (patch)
tree42883639e5ea3b61d7d96b447500359890a315f4 /drivers
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
downloadlinux-stable-fd7e8816990b12143c0872822b524ab7d956c3ae.tar.gz
linux-stable-fd7e8816990b12143c0872822b524ab7d956c3ae.tar.bz2
linux-stable-fd7e8816990b12143c0872822b524ab7d956c3ae.zip
hpfb: use probe_kernel_read()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-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"))