Commit fd7e8816 authored by Al Viro's avatar Al Viro

hpfb: use probe_kernel_read()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 2ea659a9
......@@ -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"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment