Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (63 commits) mtd: OneNAND: Allow setting of boundary information when built as module jffs2: leaking jffs2_summary in function jffs2_scan_medium mtd: nand: Fix memory leak on txx9ndfmc probe failure. mtd: orion_nand: use burst reads with double word accesses mtd/nand: s3c6400 support for s3c2410 driver [MTD] [NAND] S3C2410: Use DIV_ROUND_UP [MTD] [NAND] S3C2410: Deal with unaligned lengths in S3C2440 buffer read/write [MTD] [NAND] S3C2410: Allow the machine code to get the BBT table from NAND [MTD] [NAND] S3C2410: Added a kerneldoc for s3c2410_nand_set mtd: physmap_of: Add multiple regions and concatenation support mtd: nand: max_retries off by one in mxc_nand mtd: nand: s3c2410_nand_setrate(): use correct macros for 2412/2440 mtd: onenand: add bbt_wait & unlock_all as replaceable for some platform mtd: Flex-OneNAND support mtd: nand: add OMAP2/OMAP3 NAND driver mtd: maps: Blackfin async: fix memory leaks in probe/remove funcs mtd: uclinux: mark local stuff static mtd: uclinux: do not allow to be built as a module mtd: uclinux: allow systems to override map addr/size mtd: blackfin NFC: fix hang when using NAND on BF527-EZKITs ...
This commit is contained in:
@ -94,7 +94,6 @@
|
||||
#include <linux/atm_tcp.h>
|
||||
#include <linux/sonet.h>
|
||||
#include <linux/atm_suni.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
|
||||
#include <linux/usb.h>
|
||||
#include <linux/usbdevice_fs.h>
|
||||
@ -1405,46 +1404,6 @@ static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg)
|
||||
#define HIDPGETCONNLIST _IOR('H', 210, int)
|
||||
#define HIDPGETCONNINFO _IOR('H', 211, int)
|
||||
|
||||
struct mtd_oob_buf32 {
|
||||
u_int32_t start;
|
||||
u_int32_t length;
|
||||
compat_caddr_t ptr; /* unsigned char* */
|
||||
};
|
||||
|
||||
#define MEMWRITEOOB32 _IOWR('M',3,struct mtd_oob_buf32)
|
||||
#define MEMREADOOB32 _IOWR('M',4,struct mtd_oob_buf32)
|
||||
|
||||
static int mtd_rw_oob(unsigned int fd, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct mtd_oob_buf __user *buf = compat_alloc_user_space(sizeof(*buf));
|
||||
struct mtd_oob_buf32 __user *buf32 = compat_ptr(arg);
|
||||
u32 data;
|
||||
char __user *datap;
|
||||
unsigned int real_cmd;
|
||||
int err;
|
||||
|
||||
real_cmd = (cmd == MEMREADOOB32) ?
|
||||
MEMREADOOB : MEMWRITEOOB;
|
||||
|
||||
if (copy_in_user(&buf->start, &buf32->start,
|
||||
2 * sizeof(u32)) ||
|
||||
get_user(data, &buf32->ptr))
|
||||
return -EFAULT;
|
||||
datap = compat_ptr(data);
|
||||
if (put_user(datap, &buf->ptr))
|
||||
return -EFAULT;
|
||||
|
||||
err = sys_ioctl(fd, real_cmd, (unsigned long) buf);
|
||||
|
||||
if (!err) {
|
||||
if (copy_in_user(&buf32->start, &buf->start,
|
||||
2 * sizeof(u32)))
|
||||
err = -EFAULT;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BLOCK
|
||||
struct raw32_config_request
|
||||
{
|
||||
@ -2426,15 +2385,6 @@ COMPATIBLE_IOCTL(USBDEVFS_SUBMITURB32)
|
||||
COMPATIBLE_IOCTL(USBDEVFS_REAPURB32)
|
||||
COMPATIBLE_IOCTL(USBDEVFS_REAPURBNDELAY32)
|
||||
COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT)
|
||||
/* MTD */
|
||||
COMPATIBLE_IOCTL(MEMGETINFO)
|
||||
COMPATIBLE_IOCTL(MEMERASE)
|
||||
COMPATIBLE_IOCTL(MEMLOCK)
|
||||
COMPATIBLE_IOCTL(MEMUNLOCK)
|
||||
COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
|
||||
COMPATIBLE_IOCTL(MEMGETREGIONINFO)
|
||||
COMPATIBLE_IOCTL(MEMGETBADBLOCK)
|
||||
COMPATIBLE_IOCTL(MEMSETBADBLOCK)
|
||||
/* NBD */
|
||||
ULONG_IOCTL(NBD_SET_SOCK)
|
||||
ULONG_IOCTL(NBD_SET_BLKSIZE)
|
||||
@ -2544,8 +2494,6 @@ COMPATIBLE_IOCTL(JSIOCGBUTTONS)
|
||||
COMPATIBLE_IOCTL(JSIOCGNAME(0))
|
||||
|
||||
/* now things that need handlers */
|
||||
HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
|
||||
HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob)
|
||||
#ifdef CONFIG_NET
|
||||
HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32)
|
||||
HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf)
|
||||
|
Reference in New Issue
Block a user