Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / drivers / video / sm501fb.c
index 58c0ac7..c86df12 100644 (file)
@@ -989,7 +989,7 @@ static int sm501fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
                        ((info->cmap.green[fg_col] & 0xFC) << 3) |
                        ((info->cmap.blue[fg_col] & 0xF8) >> 3);
 
-               dev_dbg(fbi->dev, "fgcol %08x, bgcol %08x\n", fg, bg);
+               dev_dbg(fbi->dev, "fgcol %08lx, bgcol %08lx\n", fg, bg);
 
                writel(bg, base + SM501_OFF_HWC_COLOR_1_2);
                writel(fg, base + SM501_OFF_HWC_COLOR_3);
@@ -1074,9 +1074,9 @@ static ssize_t sm501fb_crtsrc_store(struct device *dev,
        if (len < 1)
                return -EINVAL;
 
-       if (strnicmp(buf, "crt", sizeof("crt")) == 0)
+       if (strnicmp(buf, "crt", 3) == 0)
                head = HEAD_CRT;
-       else if (strnicmp(buf, "panel", sizeof("panel")) == 0)
+       else if (strnicmp(buf, "panel", 5) == 0)
                head = HEAD_PANEL;
        else
                return -EINVAL;
@@ -1098,7 +1098,7 @@ static ssize_t sm501fb_crtsrc_store(struct device *dev,
        writel(ctrl, info->regs + SM501_DC_CRT_CONTROL);
        sm501fb_sync_regs(info);
 
-       return (head == HEAD_CRT) ? 3 : 5;
+       return len;
 }
 
 /* Prepare the device_attr for registration with sysfs later */