Commit 61e7f08f authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: drivers/sbus fixes

	a) vfc is not 64bit-clean, marked as such in Kconfig
	b) aurora is simply broken - still uses tqueues.  Marked as broken.
	c) vfc does dereferencing of userland pointer, right after having
carefully copied the data to kernel space ;-)  Fixed.
	d) vfc ->mmap() had missed prototype change.  Fixed.
	e) BPP ioctls are misdeclared - they should've been _IO(...) instead
of _IOR(..., void).  Too late to fix, but we can at least make them
_IOR(..., char) - same value, but doesn't try to find sizeof(void).
parent d10a605b
...@@ -39,7 +39,7 @@ config SUN_BPP ...@@ -39,7 +39,7 @@ config SUN_BPP
config SUN_VIDEOPIX config SUN_VIDEOPIX
tristate "Videopix Frame Grabber (EXPERIMENTAL)" tristate "Videopix Frame Grabber (EXPERIMENTAL)"
depends on EXPERIMENTAL depends on EXPERIMENTAL && (BROKEN || !64BIT)
help help
Say Y here to support the Videopix Frame Grabber from Sun Say Y here to support the Videopix Frame Grabber from Sun
Microsystems, commonly found on SPARCstations. This card, which is Microsystems, commonly found on SPARCstations. This card, which is
...@@ -48,7 +48,7 @@ config SUN_VIDEOPIX ...@@ -48,7 +48,7 @@ config SUN_VIDEOPIX
config SUN_AURORA config SUN_AURORA
tristate "Aurora Multiboard 1600se (EXPERIMENTAL)" tristate "Aurora Multiboard 1600se (EXPERIMENTAL)"
depends on EXPERIMENTAL depends on EXPERIMENTAL && BROKEN
help help
The Aurora Multiboard is a multi-port high-speed serial controller. The Aurora Multiboard is a multi-port high-speed serial controller.
If you have one of these, say Y. If you have one of these, say Y.
......
...@@ -253,7 +253,7 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, unsigned long arg) ...@@ -253,7 +253,7 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, unsigned long arg)
vfc_lock_device(dev); vfc_lock_device(dev);
inout.ret= inout.ret=
vfc_i2c_sendbuf(dev,inout.addr & 0xff, vfc_i2c_sendbuf(dev,inout.addr & 0xff,
inout.buffer,inout.len); buffer,inout.len);
if (copy_to_user((void *)arg,&inout,sizeof(inout))) { if (copy_to_user((void *)arg,&inout,sizeof(inout))) {
kfree(buffer); kfree(buffer);
...@@ -611,13 +611,12 @@ static int vfc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -611,13 +611,12 @@ static int vfc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
return ret; return ret;
} }
static int vfc_mmap(struct inode *inode, struct file *file, static int vfc_mmap(struct file *file, struct vm_area_struct *vma)
struct vm_area_struct *vma)
{ {
unsigned int map_size, ret, map_offset; unsigned int map_size, ret, map_offset;
struct vfc_dev *dev; struct vfc_dev *dev;
dev = vfc_get_dev_ptr(iminor(inode)); dev = vfc_get_dev_ptr(iminor(file->f_dentry->d_inode));
if(dev == NULL) if(dev == NULL)
return -ENODEV; return -ENODEV;
......
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
*/ */
# define BPP_PUT_PINS _IOW('B', 1, int) # define BPP_PUT_PINS _IOW('B', 1, int)
# define BPP_GET_PINS _IOR('B', 2, void) # define BPP_GET_PINS _IOR('B', 2, char) /* that's bogus - should've been _IO */
# define BPP_PUT_DATA _IOW('B', 3, int) # define BPP_PUT_DATA _IOW('B', 3, int)
# define BPP_GET_DATA _IOR('B', 4, void) # define BPP_GET_DATA _IOR('B', 4, char) /* ditto */
/* /*
* Set the data bus to input mode. Disengage the data bin driver and * Set the data bus to input mode. Disengage the data bin driver and
......
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
*/ */
# define BPP_PUT_PINS _IOW('B', 1, int) # define BPP_PUT_PINS _IOW('B', 1, int)
# define BPP_GET_PINS _IOR('B', 2, void) # define BPP_GET_PINS _IOR('B', 2, char) /* that's bogus - should've been _IO */
# define BPP_PUT_DATA _IOW('B', 3, int) # define BPP_PUT_DATA _IOW('B', 3, int)
# define BPP_GET_DATA _IOR('B', 4, void) # define BPP_GET_DATA _IOR('B', 4, char) /* ditto */
/* /*
* Set the data bus to input mode. Disengage the data bin driver and * Set the data bus to input mode. Disengage the data bin driver and
......
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