aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/sm501fb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 58c0ac733db9..0a44c44672c8 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -1074,9 +1074,9 @@ static ssize_t sm501fb_crtsrc_store(struct device *dev,
1074 if (len < 1) 1074 if (len < 1)
1075 return -EINVAL; 1075 return -EINVAL;
1076 1076
1077 if (strnicmp(buf, "crt", sizeof("crt")) == 0) 1077 if (strnicmp(buf, "crt", 3) == 0)
1078 head = HEAD_CRT; 1078 head = HEAD_CRT;
1079 else if (strnicmp(buf, "panel", sizeof("panel")) == 0) 1079 else if (strnicmp(buf, "panel", 5) == 0)
1080 head = HEAD_PANEL; 1080 head = HEAD_PANEL;
1081 else 1081 else
1082 return -EINVAL; 1082 return -EINVAL;
@@ -1098,7 +1098,7 @@ static ssize_t sm501fb_crtsrc_store(struct device *dev,
1098 writel(ctrl, info->regs + SM501_DC_CRT_CONTROL); 1098 writel(ctrl, info->regs + SM501_DC_CRT_CONTROL);
1099 sm501fb_sync_regs(info); 1099 sm501fb_sync_regs(info);
1100 1100
1101 return (head == HEAD_CRT) ? 3 : 5; 1101 return len;
1102} 1102}
1103 1103
1104/* Prepare the device_attr for registration with sysfs later */ 1104/* Prepare the device_attr for registration with sysfs later */