From patchwork Fri Apr 29 10:11:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Liu X-Patchwork-Id: 740691 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3TA8mRa029880 for ; Fri, 29 Apr 2011 10:08:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753627Ab1D2KIn (ORCPT ); Fri, 29 Apr 2011 06:08:43 -0400 Received: from smtp-cpk.frontbridge.com ([204.231.192.41]:12740 "EHLO WA2EHSNDR001.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751900Ab1D2KIm (ORCPT ); Fri, 29 Apr 2011 06:08:42 -0400 Received: from ch1outboundpool.messaging.microsoft.com (10.2.40.3) by WA2EHSNDR001.bigfish.com (10.2.40.21) with Microsoft SMTP Server (TLS) id 14.1.225.8; Fri, 29 Apr 2011 10:08:41 +0000 Received: from mail158-ch1-R.bigfish.com (216.32.181.172) by CH1EHSOBE009.bigfish.com (10.43.70.59) with Microsoft SMTP Server id 14.1.225.8; Fri, 29 Apr 2011 09:54:22 +0000 Received: from mail158-ch1 (localhost.localdomain [127.0.0.1]) by mail158-ch1-R.bigfish.com (Postfix) with ESMTP id 783313A0255 for ; Fri, 29 Apr 2011 09:54:22 +0000 (UTC) X-BigFish: VS30(z35f3ik26a2ozzz1202hzz8275bhz2ei87h668h839h45k) X-FB-OUTBOUND-SPAM: yes X-SpamScore: 30 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:nwd2mail11.analog.com; RD:nwd2mail11.analog.com; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail158-ch1 (localhost.localdomain [127.0.0.1]) by mail158-ch1 (MessageSwitch) id 1304070862283575_24012; Fri, 29 Apr 2011 09:54:22 +0000 (UTC) Received: from CH1EHSMHS035.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.242]) by mail158-ch1.bigfish.com (Postfix) with ESMTP id 4212B164804B for ; Fri, 29 Apr 2011 09:54:22 +0000 (UTC) Received: from nwd2mail11.analog.com (137.71.25.57) by CH1EHSMHS035.bigfish.com (10.43.70.35) with Microsoft SMTP Server id 14.1.225.8; Fri, 29 Apr 2011 09:54:22 +0000 X-IronPort-AV: E=Sophos;i="4.64,286,1301889600"; d="scan'208";a="32392282" Received: from nwd2hubcas1.ad.analog.com ([10.64.73.29]) by nwd2mail11.analog.com with ESMTP; 29 Apr 2011 05:54:21 -0400 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS1.ad.analog.com (10.64.73.29) with Microsoft SMTP Server id 8.1.358.0; Fri, 29 Apr 2011 05:54:21 -0400 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.1/8.14.1) with ESMTP id p3T9s35c011502; Fri, 29 Apr 2011 05:54:04 -0400 (EDT) Received: from localhost.localdomain (unknown [10.99.29.101]) by linux.site (Postfix) with ESMTP id 3743442446AD; Thu, 28 Apr 2011 20:06:00 -0600 (MDT) From: Bob Liu To: CC: , , , , , , , , , , , , , , , Bob Liu Subject: [PATCH 1/2] V4L/DVB: v4l2-dev: revert commit c29fcff3daafbf46d64a543c1950bbd206ad8c1c Date: Fri, 29 Apr 2011 18:11:34 +0800 Message-ID: <1304071895-27898-1-git-send-email-lliubbo@gmail.com> X-Mailer: git-send-email 1.6.3.3 MIME-Version: 1.0 Reply-To: X-OriginatorOrg: analog.com Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 29 Apr 2011 10:08:48 +0000 (UTC) Revert commit: V4L/DVB: v4l2-dev: remove get_unmapped_area(c29fcff3daafbf46d64a543c1950bb) to restore NOMMU arch supporting. Signed-off-by: Bob Liu --- drivers/media/video/v4l2-dev.c | 18 ++++++++++++++++++ include/media/v4l2-dev.h | 2 ++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 6dc7196..19d5ae2 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c @@ -352,6 +352,23 @@ static long v4l2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) return ret; } +#ifdef CONFIG_MMU +#define v4l2_get_unmapped_area NULL +#else +static unsigned long v4l2_get_unmapped_area(struct file *filp, + unsigned long addr, unsigned long len, unsigned long pgoff, + unsigned long flags) +{ + struct video_device *vdev = video_devdata(filp); + + if (!vdev->fops->get_unmapped_area) + return -ENOSYS; + if (!video_is_registered(vdev)) + return -ENODEV; + return vdev->fops->get_unmapped_area(filp, addr, len, pgoff, flags); +} +#endif + static int v4l2_mmap(struct file *filp, struct vm_area_struct *vm) { struct video_device *vdev = video_devdata(filp); @@ -454,6 +471,7 @@ static const struct file_operations v4l2_fops = { .read = v4l2_read, .write = v4l2_write, .open = v4l2_open, + .get_unmapped_area = v4l2_get_unmapped_area, .mmap = v4l2_mmap, .unlocked_ioctl = v4l2_ioctl, #ifdef CONFIG_COMPAT diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 8266d5a..93e96fb 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h @@ -62,6 +62,8 @@ struct v4l2_file_operations { unsigned int (*poll) (struct file *, struct poll_table_struct *); long (*ioctl) (struct file *, unsigned int, unsigned long); long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); + unsigned long (*get_unmapped_area) (struct file *, unsigned long, + unsigned long, unsigned long, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); int (*open) (struct file *); int (*release) (struct file *);