diff options
author | Kevin Cernekee <kpc.mtd@gmail.com> | 2009-04-15 00:59:22 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-05-29 10:58:25 -0400 |
commit | 668ff9ab45d595222d3f90d7974ccba3518e3bb3 (patch) | |
tree | c1d645633f460276b1e7d43a897852b2fab3c509 | |
parent | aea7cea9fa9e39e71f95ad70b3daf98ba9972587 (diff) |
mtd: Handle compat ioctls directly; remove all trace from compat_ioctl.c
Remove all references to MTD ioctls from fs/compat_ioctl.c and let
them all be handled by mtd_compat_ioctl().
Signed-off-by: Kevin Cernekee <kpc.mtd@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r-- | drivers/mtd/mtdchar.c | 3 | ||||
-rw-r--r-- | fs/compat_ioctl.c | 22 |
2 files changed, 2 insertions, 23 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 99d1fbc95011..5fff04f3303d 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -836,6 +836,7 @@ struct mtd_oob_buf32 { | |||
836 | static long mtd_compat_ioctl(struct file *file, unsigned int cmd, | 836 | static long mtd_compat_ioctl(struct file *file, unsigned int cmd, |
837 | unsigned long arg) | 837 | unsigned long arg) |
838 | { | 838 | { |
839 | struct inode *inode = file->f_path.dentry->d_inode; | ||
839 | struct mtd_file_info *mfi = file->private_data; | 840 | struct mtd_file_info *mfi = file->private_data; |
840 | struct mtd_info *mtd = mfi->mtd; | 841 | struct mtd_info *mtd = mfi->mtd; |
841 | void __user *argp = (void __user *)arg; | 842 | void __user *argp = (void __user *)arg; |
@@ -873,7 +874,7 @@ static long mtd_compat_ioctl(struct file *file, unsigned int cmd, | |||
873 | break; | 874 | break; |
874 | } | 875 | } |
875 | default: | 876 | default: |
876 | ret = -ENOIOCTLCMD; | 877 | ret = mtd_ioctl(inode, file, cmd, arg); |
877 | } | 878 | } |
878 | 879 | ||
879 | unlock_kernel(); | 880 | unlock_kernel(); |
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 8da222eacbaf..aa6ba39ff370 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -94,7 +94,6 @@ | |||
94 | #include <linux/atm_tcp.h> | 94 | #include <linux/atm_tcp.h> |
95 | #include <linux/sonet.h> | 95 | #include <linux/sonet.h> |
96 | #include <linux/atm_suni.h> | 96 | #include <linux/atm_suni.h> |
97 | #include <linux/mtd/mtd.h> | ||
98 | 97 | ||
99 | #include <linux/usb.h> | 98 | #include <linux/usb.h> |
100 | #include <linux/usbdevice_fs.h> | 99 | #include <linux/usbdevice_fs.h> |
@@ -2392,27 +2391,6 @@ COMPATIBLE_IOCTL(USBDEVFS_SUBMITURB32) | |||
2392 | COMPATIBLE_IOCTL(USBDEVFS_REAPURB32) | 2391 | COMPATIBLE_IOCTL(USBDEVFS_REAPURB32) |
2393 | COMPATIBLE_IOCTL(USBDEVFS_REAPURBNDELAY32) | 2392 | COMPATIBLE_IOCTL(USBDEVFS_REAPURBNDELAY32) |
2394 | COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT) | 2393 | COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT) |
2395 | /* MTD */ | ||
2396 | COMPATIBLE_IOCTL(MEMGETINFO) | ||
2397 | COMPATIBLE_IOCTL(MEMERASE) | ||
2398 | COMPATIBLE_IOCTL(MEMLOCK) | ||
2399 | COMPATIBLE_IOCTL(MEMUNLOCK) | ||
2400 | COMPATIBLE_IOCTL(MEMGETREGIONCOUNT) | ||
2401 | COMPATIBLE_IOCTL(MEMGETREGIONINFO) | ||
2402 | COMPATIBLE_IOCTL(MEMSETOOBSEL) | ||
2403 | COMPATIBLE_IOCTL(MEMGETOOBSEL) | ||
2404 | COMPATIBLE_IOCTL(MEMGETBADBLOCK) | ||
2405 | COMPATIBLE_IOCTL(MEMSETBADBLOCK) | ||
2406 | COMPATIBLE_IOCTL(OTPSELECT) | ||
2407 | COMPATIBLE_IOCTL(OTPGETREGIONCOUNT) | ||
2408 | COMPATIBLE_IOCTL(OTPGETREGIONINFO) | ||
2409 | COMPATIBLE_IOCTL(OTPLOCK) | ||
2410 | COMPATIBLE_IOCTL(ECCGETLAYOUT) | ||
2411 | COMPATIBLE_IOCTL(ECCGETSTATS) | ||
2412 | COMPATIBLE_IOCTL(MTDFILEMODE) | ||
2413 | COMPATIBLE_IOCTL(MEMERASE64) | ||
2414 | COMPATIBLE_IOCTL(MEMREADOOB64) | ||
2415 | COMPATIBLE_IOCTL(MEMWRITEOOB64) | ||
2416 | /* NBD */ | 2394 | /* NBD */ |
2417 | ULONG_IOCTL(NBD_SET_SOCK) | 2395 | ULONG_IOCTL(NBD_SET_SOCK) |
2418 | ULONG_IOCTL(NBD_SET_BLKSIZE) | 2396 | ULONG_IOCTL(NBD_SET_BLKSIZE) |