vserver 1.9.3
[linux-2.6.git] / drivers / media / dvb / frontends / sp887x.c
index 3b3a73b..0aeb812 100644 (file)
@@ -12,7 +12,6 @@
    next 0x4000 loaded. This may change in future versions.
  */
 
-#define __KERNEL_SYSCALLS__
 #include <linux/kernel.h>
 #include <linux/vmalloc.h>
 #include <linux/module.h>
@@ -68,8 +67,6 @@ struct dvb_frontend_info sp887x_info = {
                 FE_CAN_RECOVER
 };
 
-static int errno;
-
 static
 int i2c_writebytes (struct dvb_frontend *fe, u8 addr, u8 *buf, u8 len)
 {
@@ -211,13 +208,13 @@ int sp887x_initial_setup (struct dvb_frontend *fe)
 
        // Load the firmware
        set_fs(get_ds());
-       fd = open(sp887x_firmware, 0, 0);
+       fd = sys_open(sp887x_firmware, 0, 0);
        if (fd < 0) {
                printk(KERN_WARNING "%s: Unable to open firmware %s\n", __FUNCTION__,
                       sp887x_firmware);
                return -EIO;
        }
-       filesize = lseek(fd, 0L, 2);
+       filesize = sys_lseek(fd, 0L, 2);
        if (filesize <= 0) {
                printk(KERN_WARNING "%s: Firmware %s is empty\n", __FUNCTION__,
                       sp887x_firmware);
@@ -239,8 +236,8 @@ int sp887x_initial_setup (struct dvb_frontend *fe)
        // read it!
        // read the first 16384 bytes from the file
        // ignore the first 10 bytes
-       lseek(fd, 10, 0);
-       if (read(fd, firmware, fw_size) != fw_size) {
+       sys_lseek(fd, 10, 0);
+       if (sys_read(fd, firmware, fw_size) != fw_size) {
                printk(KERN_WARNING "%s: Failed to read firmware\n", __FUNCTION__);
                vfree(firmware);
                sys_close(fd);