aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fsl-diu-fb.c
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2011-10-04 20:36:44 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-10-04 21:06:55 -0400
commit36b0b1d41541fc3b25faf38aa53c34cede357421 (patch)
tree1a6b3d684a5d5b57f7151edd26a64d8e2c236055 /drivers/video/fsl-diu-fb.c
parent6488867c0525c9189f2f0d18e9009529b4732782 (diff)
drivers/video: fsl-diu-fb: fix some ioctls
Use the _IOx macros to define the ioctl commands, instead of hard-coded numbers. Unfortunately, the original definitions of MFB_SET_PIXFMT and MFB_GET_PIXFMT used the wrong value for the size, so these macros have new values now. To avoid breaking binary compatibility with older applications, we retain support for the original values, but the driver displays a warning message if they're used. Also remove the FBIOGET_GWINFO and FBIOPUT_GWINFO ioctls. FBIOPUT_GWINFO was never implemented, and FBIOGET_GWINFO was never used by any application. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/fsl-diu-fb.c')
-rw-r--r--drivers/video/fsl-diu-fb.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index 5137fbb6295f..9a1f6d276ee3 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -966,11 +966,19 @@ static int fsl_diu_ioctl(struct fb_info *info, unsigned int cmd,
966 if (!arg) 966 if (!arg)
967 return -EINVAL; 967 return -EINVAL;
968 switch (cmd) { 968 switch (cmd) {
969 case MFB_SET_PIXFMT_OLD:
970 dev_warn(info->dev,
971 "MFB_SET_PIXFMT value of 0x%08x is deprecated.\n",
972 MFB_SET_PIXFMT_OLD);
969 case MFB_SET_PIXFMT: 973 case MFB_SET_PIXFMT:
970 if (copy_from_user(&pix_fmt, buf, sizeof(pix_fmt))) 974 if (copy_from_user(&pix_fmt, buf, sizeof(pix_fmt)))
971 return -EFAULT; 975 return -EFAULT;
972 ad->pix_fmt = pix_fmt; 976 ad->pix_fmt = pix_fmt;
973 break; 977 break;
978 case MFB_GET_PIXFMT_OLD:
979 dev_warn(info->dev,
980 "MFB_GET_PIXFMT value of 0x%08x is deprecated.\n",
981 MFB_GET_PIXFMT_OLD);
974 case MFB_GET_PIXFMT: 982 case MFB_GET_PIXFMT:
975 pix_fmt = ad->pix_fmt; 983 pix_fmt = ad->pix_fmt;
976 if (copy_to_user(buf, &pix_fmt, sizeof(pix_fmt))) 984 if (copy_to_user(buf, &pix_fmt, sizeof(pix_fmt)))
@@ -1030,14 +1038,6 @@ static int fsl_diu_ioctl(struct fb_info *info, unsigned int cmd,
1030 ad->ckmin_b = ck.blue_min; 1038 ad->ckmin_b = ck.blue_min;
1031 } 1039 }
1032 break; 1040 break;
1033 case FBIOGET_GWINFO:
1034 if (mfbi->type == MFB_TYPE_OFF)
1035 return -ENODEV;
1036 /* get graphic window information */
1037 if (copy_to_user(buf, ad, sizeof(*ad)))
1038 return -EFAULT;
1039 break;
1040
1041 default: 1041 default:
1042 dev_err(info->dev, "unknown ioctl command (0x%08X)\n", cmd); 1042 dev_err(info->dev, "unknown ioctl command (0x%08X)\n", cmd);
1043 return -ENOIOCTLCMD; 1043 return -ENOIOCTLCMD;