From patchwork Wed Apr 15 04:59:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Cernekee X-Patchwork-Id: 25965 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7FDAADDF8C for ; Wed, 15 Apr 2009 15:38:15 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1Ltxl6-0004PH-TP; Wed, 15 Apr 2009 05:34:05 +0000 Received: from [65.98.92.6] (helo=b32.net) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1Ltxks-0004Oh-GX for linux-mtd@lists.infradead.org; Wed, 15 Apr 2009 05:34:00 +0000 Received: (qmail 31301 invoked from network); 15 Apr 2009 05:27:06 -0000 Received: from softdnserror (HELO two) (127.0.0.1) by softdnserror with SMTP; 15 Apr 2009 05:27:06 -0000 Received: by two (sSMTP sendmail emulation); Tue, 14 Apr 2009 22:26:26 -0700 From: Kevin Cernekee To: arnd@arndb.de, dwmw2@infradead.org, akpm@linux-foundation.org Date: Tue, 14 Apr 2009 21:59:22 -0700 Subject: [PATCH] mtd: Delete final remnants of MTD ioctls from fs/compat_ioctl.c X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 MISSING_MID Missing Message-Id: header 0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Message-Id: <20090415053815.7FDAADDF8C@ozlabs.org> Move all MTD compat_ioctl logic into drivers/mtd/mtdchar.c Depends on this patch set: http://lkml.org/lkml/2009/4/9/52 http://lkml.org/lkml/2009/4/9/53 http://lkml.org/lkml/2009/4/9/54 http://lkml.org/lkml/2009/4/9/55 Signed-off-by: Kevin Cernekee --- drivers/mtd/mtdchar.c | 3 ++- 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 99d1fbc..5fff04f 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -836,6 +836,7 @@ struct mtd_oob_buf32 { static long mtd_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { + struct inode *inode = file->f_path.dentry->d_inode; struct mtd_file_info *mfi = file->private_data; struct mtd_info *mtd = mfi->mtd; void __user *argp = (void __user *)arg; @@ -873,7 +874,7 @@ static long mtd_compat_ioctl(struct file *file, unsigned int cmd, break; } default: - ret = -ENOIOCTLCMD; + ret = mtd_ioctl(inode, file, cmd, arg); } unlock_kernel(); diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 5f7b8a1..8256cda 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -94,7 +94,6 @@ #include #include #include -#include #include #include @@ -2392,27 +2391,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(MEMSETOOBSEL) -COMPATIBLE_IOCTL(MEMGETOOBSEL) -COMPATIBLE_IOCTL(MEMGETBADBLOCK) -COMPATIBLE_IOCTL(MEMSETBADBLOCK) -COMPATIBLE_IOCTL(OTPSELECT) -COMPATIBLE_IOCTL(OTPGETREGIONCOUNT) -COMPATIBLE_IOCTL(OTPGETREGIONINFO) -COMPATIBLE_IOCTL(OTPLOCK) -COMPATIBLE_IOCTL(ECCGETLAYOUT) -COMPATIBLE_IOCTL(ECCGETSTATS) -COMPATIBLE_IOCTL(MTDFILEMODE) -COMPATIBLE_IOCTL(MEMERASE64) -COMPATIBLE_IOCTL(MEMREADOOB64) -COMPATIBLE_IOCTL(MEMWRITEOOB64) /* NBD */ ULONG_IOCTL(NBD_SET_SOCK) ULONG_IOCTL(NBD_SET_BLKSIZE)