From patchwork Fri Mar 19 17:58:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herton Ronaldo Krzesinski X-Patchwork-Id: 86990 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2JIMg45001423 for ; Fri, 19 Mar 2010 18:22:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751905Ab0CSSWi (ORCPT ); Fri, 19 Mar 2010 14:22:38 -0400 Received: from perninha.conectiva.com.br ([200.140.247.100]:41290 "EHLO perninha.conectiva.com.br" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751889Ab0CSSWf (ORCPT ); Fri, 19 Mar 2010 14:22:35 -0400 Received: from localhost (perninha.conectiva.com.br [127.0.0.1]) by perninha.conectiva.com.br (Postfix) with ESMTP id 5FDFB15FB4; Fri, 19 Mar 2010 14:58:26 -0300 (BRT) X-Virus-Scanned: amavisd-new at conectiva.com.br Received: from perninha.conectiva.com.br ([127.0.0.1]) by localhost (perninha.conectiva.com.br [127.0.0.1]) (amavisd-new, port 10025) with LMTP id bellU3WOFu8N; Fri, 19 Mar 2010 14:58:26 -0300 (BRT) Received: from fox.conectiva (fox.conectiva [10.0.2.195]) by perninha.conectiva.com.br (Postfix) with ESMTP id A2F6B15FB2; Fri, 19 Mar 2010 14:58:24 -0300 (BRT) Received: from gotham.conectiva (gotham.conectiva [10.0.2.23]) by fox.conectiva (Postfix) with ESMTP id 90F932F2B0; Fri, 19 Mar 2010 14:58:24 -0300 (BRT) From: Herton Ronaldo Krzesinski Organization: Mandriva To: linux-media@vger.kernel.org Subject: [PATCH] Revert "V4L/DVB (11906): saa7134: Use v4l bounding/alignment function" Date: Fri, 19 Mar 2010 14:58:23 -0300 User-Agent: KMail/1.13.1 (Linux/2.6.33.1-desktop-1mnb; KDE/4.4.1; x86_64; ; ) Cc: Mauro Carvalho Chehab , Trent Piepho MIME-Version: 1.0 Message-Id: <201003191458.24121.herton@mandriva.com.br> 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.3 (demeter.kernel.org [140.211.167.41]); Fri, 19 Mar 2010 18:22:43 +0000 (UTC) diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index ba87128..e305c16 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c @@ -1640,8 +1640,15 @@ static int saa7134_try_fmt_vid_cap(struct file *file, void *priv, } f->fmt.pix.field = field; - v4l_bound_align_image(&f->fmt.pix.width, 48, maxw, 2, - &f->fmt.pix.height, 32, maxh, 0, 0); + if (f->fmt.pix.width < 48) + f->fmt.pix.width = 48; + if (f->fmt.pix.height < 32) + f->fmt.pix.height = 32; + if (f->fmt.pix.width > maxw) + f->fmt.pix.width = maxw; + if (f->fmt.pix.height > maxh) + f->fmt.pix.height = maxh; + f->fmt.pix.width &= ~0x03; f->fmt.pix.bytesperline = (f->fmt.pix.width * fmt->depth) >> 3; f->fmt.pix.sizeimage =