From: Andi Kleen <ak@muc.de>
To: adaplas@pol.net, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Add compat_ioctl to frame buffer layer
Date: 18 Jan 2005 13:32:06 +0100
Date: Tue, 18 Jan 2005 13:32:06 +0100 [thread overview]
Message-ID: <20050118123206.GB68224@muc.de> (raw)
Forward compat_ioctl through the frame buffer layer.
This is needed for a followup patch.
Signed-off-by: Andi Kleen <ak@muc.de>
diff -u linux-2.6.11-rc1-bk4/drivers/video/fbmem.c-o linux-2.6.11-rc1-bk4/drivers/video/fbmem.c
--- linux-2.6.11-rc1-bk4/drivers/video/fbmem.c-o 2005-01-14 10:12:22.000000000 +0100
+++ linux-2.6.11-rc1-bk4/drivers/video/fbmem.c 2005-01-18 03:36:37.000000000 +0100
@@ -868,6 +868,23 @@
}
}
+#ifdef CONFIG_COMPAT
+static long
+fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+ int fbidx = iminor(file->f_dentry->d_inode);
+ struct fb_info *info = registered_fb[fbidx];
+ struct fb_ops *fb = info->fbops;
+ int ret;
+ if (fb->fb_compat_ioctl == NULL)
+ return -ENOIOCTLCMD;
+ lock_kernel();
+ ret = fb->fb_compat_ioctl(file, cmd, arg, info);
+ unlock_kernel();
+ return ret;
+}
+#endif
+
static int
fb_mmap(struct file *file, struct vm_area_struct * vma)
{
@@ -1009,6 +1026,9 @@
.read = fb_read,
.write = fb_write,
.ioctl = fb_ioctl,
+#ifdef CONFIG_COMPAT
+ .compat_ioctl = fb_compat_ioctl,
+#endif
.mmap = fb_mmap,
.open = fb_open,
.release = fb_release,
diff -u linux-2.6.11-rc1-bk4/include/linux/fb.h-o linux-2.6.11-rc1-bk4/include/linux/fb.h
--- linux-2.6.11-rc1-bk4/include/linux/fb.h-o 2005-01-14 10:12:26.000000000 +0100
+++ linux-2.6.11-rc1-bk4/include/linux/fb.h 2005-01-17 11:30:29.000000000 +0100
@@ -584,6 +584,10 @@
int (*fb_ioctl)(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg, struct fb_info *info);
+ /* Handle 32bit compat ioctl (optional) */
+ int (*fb_compat_ioctl)(struct file *f, unsigned cmd, unsigned long arg,
+ struct fb_info *info);
+
/* perform fb specific mmap */
int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);
};
reply other threads:[~2005-01-18 12:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050118123206.GB68224@muc.de \
--to=ak@muc.de \
--cc=adaplas@pol.net \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).