Commit 20c29c3f authored by Sudhakar Rajashekhara's avatar Sudhakar Rajashekhara Committed by James Toy

Since the previous version, return values in ioctl() function have been

modified.
Signed-off-by: default avatarSudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: default avatarPavel Kiryukhin <pkiryukhin@ru.mvista.com>
Signed-off-by: default avatarSteve Chen <schen@mvista.com>
Acked-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 93414162
...@@ -201,14 +201,13 @@ static int lcd_disable_raster(struct da8xx_fb_par *par) ...@@ -201,14 +201,13 @@ static int lcd_disable_raster(struct da8xx_fb_par *par)
ret = wait_event_interruptible_timeout(par->da8xx_wq, ret = wait_event_interruptible_timeout(par->da8xx_wq,
!lcdc_read(LCD_STAT_REG) & !lcdc_read(LCD_STAT_REG) &
LCD_END_OF_FRAME0, WSI_TIMEOUT); LCD_END_OF_FRAME0, WSI_TIMEOUT);
}
if (ret < 0) if (ret < 0)
return ret; return ret;
if (ret == 0) if (ret == 0)
return -ETIMEDOUT; ret = -ETIMEDOUT;
}
return 0; return ret;
} }
static void lcd_blit(int load_mode, struct da8xx_fb_par *par) static void lcd_blit(int load_mode, struct da8xx_fb_par *par)
...@@ -634,11 +633,11 @@ static int fb_ioctl(struct fb_info *info, unsigned int cmd, ...@@ -634,11 +633,11 @@ static int fb_ioctl(struct fb_info *info, unsigned int cmd,
case FBIPUT_BRIGHTNESS: case FBIPUT_BRIGHTNESS:
case FBIGET_COLOR: case FBIGET_COLOR:
case FBIPUT_COLOR: case FBIPUT_COLOR:
return -EINVAL; return -ENOTTY;
case FBIPUT_HSYNC: case FBIPUT_HSYNC:
if (copy_from_user(&sync_arg, (char *)arg, if (copy_from_user(&sync_arg, (char *)arg,
sizeof(struct lcd_sync_arg))) sizeof(struct lcd_sync_arg)))
return -EINVAL; return -EFAULT;
lcd_cfg_horizontal_sync(sync_arg.back_porch, lcd_cfg_horizontal_sync(sync_arg.back_porch,
sync_arg.pulse_width, sync_arg.pulse_width,
sync_arg.front_porch); sync_arg.front_porch);
...@@ -646,7 +645,7 @@ static int fb_ioctl(struct fb_info *info, unsigned int cmd, ...@@ -646,7 +645,7 @@ static int fb_ioctl(struct fb_info *info, unsigned int cmd,
case FBIPUT_VSYNC: case FBIPUT_VSYNC:
if (copy_from_user(&sync_arg, (char *)arg, if (copy_from_user(&sync_arg, (char *)arg,
sizeof(struct lcd_sync_arg))) sizeof(struct lcd_sync_arg)))
return -EINVAL; return -EFAULT;
lcd_cfg_vertical_sync(sync_arg.back_porch, lcd_cfg_vertical_sync(sync_arg.back_porch,
sync_arg.pulse_width, sync_arg.pulse_width,
sync_arg.front_porch); sync_arg.front_porch);
......
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