From patchwork Wed Feb 2 10:56:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: y@demeter1.kernel.org X-Patchwork-Id: 526371 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p12B1lZi007619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 2 Feb 2011 11:02:14 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.74) (envelope-from ) id 1PkaT4-0007wm-F3; Wed, 02 Feb 2011 11:01:46 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.74) (envelope-from ) id 1PkaT3-0007wZ-Ia for spi-devel-general@lists.sourceforge.net; Wed, 02 Feb 2011 11:01:45 +0000 X-ACL-Warn: Received: from moutng.kundenserver.de ([212.227.126.171]) by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.74) id 1PkaT1-0000XL-6u; Wed, 02 Feb 2011 11:01:45 +0000 Received: from corscience.de (DSL01.212.114.252.242.ip-pool.NEFkom.net [212.114.252.242]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MP1RX-1PqLo50ybn-006OHM; Wed, 02 Feb 2011 11:56:18 +0100 Received: from agamemnon.CS.local (unknown [192.168.102.58]) by corscience.de (Postfix) with ESMTP id BC44152072; Wed, 2 Feb 2011 11:56:17 +0100 (CET) From: y@demeter1.kernel.org To: dbrownell@users.sourceforge.net, grant.likely@secretlab.ca Subject: [PATCH] spi: spidev: Add 32 bit compat ioctl() Date: Wed, 2 Feb 2011 11:56:16 +0100 Message-Id: <1296644176-23891-1-git-send-email-y> X-Mailer: git-send-email 1.7.1 X-Provags-ID: V02:K0:HvBhlqDbzNoSSj3ObsIoQQqvu5yum/FKJA8ez0Z14yK pxfDv15kVmYpasm3fgmiT0dSC2ItmxPIR19Lg5SK6YR0wDcxee CNXfwMiNxnMDWn7Ia4HMeG76HPzYCgnyStrgHXABt/2z5EH9E6 jxaeZFgmeRLZO4sECmLh9QKqYasQDkQ6489wBKrm+872zpsx2T uHohXjeAsxHpkK5m7Ip4g== X-Spam-Score: 1.3 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.126.171 listed in list.dnswl.org] 0.2 FH_FROMEML_NOTLD E-mail address doesn't have TLD (.com, etc.) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.2 INVALID_MSGID Message-Id is not valid, according to RFC 2822 X-Headers-End: 1PkaT1-0000XL-6u Cc: spi-devel-general@lists.sourceforge.net, akpm@linux-foundation.org, Bernhard Walle , linux-kernel@vger.kernel.org, arnd@arndb.de X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 02 Feb 2011 11:02:15 +0000 (UTC) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 4e6245e..95c3f10 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -471,6 +471,14 @@ spidev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) return retval; } +#ifdef CONFIG_COMPAT +static long +spidev_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) +{ + return spidev_ioctl(filp, cmd, (unsigned long)compat_ptr(arg)); +} +#endif /* CONFIG_COMPAT */ + static int spidev_open(struct inode *inode, struct file *filp) { struct spidev_data *spidev; @@ -543,6 +551,9 @@ static const struct file_operations spidev_fops = { .write = spidev_write, .read = spidev_read, .unlocked_ioctl = spidev_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = spidev_compat_ioctl, +#endif .open = spidev_open, .release = spidev_release, .llseek = no_llseek,