Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / char / lcd.c
index cf01a72..29963d8 100644 (file)
@@ -575,8 +575,8 @@ static inline int button_pressed(void)
 
 static int lcd_waiters = 0;
 
-static long lcd_read(struct inode *inode, struct file *file, char *buf,
-                    unsigned long count)
+static ssize_t lcd_read(struct file *file, char *buf,
+                    size_t count, loff_t *ofs)
 {
        long buttons_now;
 
@@ -613,10 +613,15 @@ static struct miscdevice lcd_dev = {
 
 static int lcd_init(void)
 {
+       int ret;
        unsigned long data;
 
        pr_info("%s\n", LCD_DRIVER);
-       misc_register(&lcd_dev);
+       ret = misc_register(&lcd_dev);
+       if (ret) {
+               printk(KERN_WARNING LCD "Unable to register misc device.\n");
+               return ret;
+       }
 
        /* Check region? Naaah! Just snarf it up. */
 /*     request_region(RTC_PORT(0), RTC_IO_EXTENT, "lcd");*/