brcm2708: update 4.1 patches
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.1 / 0216-bcm2709_fb-refine-appropriate-behaviors-to-unsupport.patch
1 From 52725443dcfd674734ab36a6e61a2fccde00b98b Mon Sep 17 00:00:00 2001
2 From: wuyuehang <yuehan9.wu@gmail.com>
3 Date: Tue, 17 Nov 2015 09:24:41 +0800
4 Subject: [PATCH 216/222] bcm2709_fb: refine appropriate behaviors to
5 unsupported fb ioctls
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 since fbturbo introduces and use FBUNSUPPORTED ioctl on copyarea
11 operations for unsupported dummy ioctl which is expected to return
12 failure. in such scenario, bcm2709 always prompts error log.
13
14 in order not to bother users in kernel log, we change the dev_err to
15 dev_dbg and return a ENOTTY other than EINVAL to let userspace handles
16 the return value.
17
18 Signed-off-by: wuyuehang <yuehan9.wu@gmail.com>
19 Reviewed-by: popcornmix <popcornmix@gmail.com>
20 Reviewed-by: Phil Elwell <pelwell@users.noreply.github.com>
21 Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
22 ---
23 drivers/video/fbdev/bcm2708_fb.c | 4 ++--
24 1 file changed, 2 insertions(+), 2 deletions(-)
25
26 --- a/drivers/video/fbdev/bcm2708_fb.c
27 +++ b/drivers/video/fbdev/bcm2708_fb.c
28 @@ -442,8 +442,8 @@ static int bcm2708_ioctl(struct fb_info
29 &dummy, sizeof(dummy));
30 break;
31 default:
32 - dev_err(info->device, "Unknown ioctl 0x%x\n", cmd);
33 - return -EINVAL;
34 + dev_dbg(info->device, "Unknown ioctl 0x%x\n", cmd);
35 + return -ENOTTY;
36 }
37
38 if (ret)