From patchwork Mon Jun 6 17:00:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 852732 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 p56H0o8U002100 for ; Mon, 6 Jun 2011 17:00:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754868Ab1FFRAt (ORCPT ); Mon, 6 Jun 2011 13:00:49 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:50631 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751889Ab1FFRAs (ORCPT ); Mon, 6 Jun 2011 13:00:48 -0400 Received: from axis700.grange (dslb-178-006-245-001.pools.arcor-ip.net [178.6.245.1]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0LckK3-1PkyLI0dOx-00k9pX; Mon, 06 Jun 2011 19:00:47 +0200 Received: by axis700.grange (Postfix, from userid 1000) id C34FB189B78; Mon, 6 Jun 2011 19:00:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id C1155189B77; Mon, 6 Jun 2011 19:00:46 +0200 (CEST) Date: Mon, 6 Jun 2011 19:00:46 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Linux Media Mailing List cc: Sascha Hauer Subject: [PATCH] V4L: mx3_camera: remove redundant calculations Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:h1JayR/9dPXX9VPwl36FC8XFGRZN9/GrFGRDhosQfTr qPRhIsv/Zj46+3jy9GeBBIrwMyMNv/dPAFyfrBHqub39Fo/8oK /ZsGijWR8csJi15Moy0eEljBP6Ig2/8oFvbiZLzEnQiTIDZYju QYUXCPpcQPtuSrhzZP1CmkwhpRKEdK+TlUCJhiK3HWqfR/e4+p 2CPM6yyHNGz9WMqL6uNCK9W21DxHhP3J4OUTW3lYEc= 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]); Mon, 06 Jun 2011 17:00:50 +0000 (UTC) soc_camera core now performs the standard .bytesperline and .sizeimage calculations internally, no need to duplicate in drivers. Signed-off-by: Guennadi Liakhovetski --- drivers/media/video/mx3_camera.c | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index c7680eb..69b2d9d 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c @@ -913,12 +913,6 @@ static int mx3_camera_set_fmt(struct soc_camera_device *icd, pix->colorspace = mf.colorspace; icd->current_fmt = xlate; - pix->bytesperline = soc_mbus_bytes_per_line(pix->width, - xlate->host_fmt); - if (pix->bytesperline < 0) - return pix->bytesperline; - pix->sizeimage = pix->height * pix->bytesperline; - dev_dbg(icd->dev.parent, "Sensor set %dx%d\n", pix->width, pix->height); return ret; @@ -946,12 +940,6 @@ static int mx3_camera_try_fmt(struct soc_camera_device *icd, if (pix->width > 4096) pix->width = 4096; - pix->bytesperline = soc_mbus_bytes_per_line(pix->width, - xlate->host_fmt); - if (pix->bytesperline < 0) - return pix->bytesperline; - pix->sizeimage = pix->height * pix->bytesperline; - /* limit to sensor capabilities */ mf.width = pix->width; mf.height = pix->height;