From patchwork Tue Aug 14 07:11:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Holler X-Patchwork-Id: 1318471 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 00A013FC81 for ; Tue, 14 Aug 2012 07:11:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704Ab2HNHLb (ORCPT ); Tue, 14 Aug 2012 03:11:31 -0400 Received: from h1446028.stratoserver.net ([85.214.92.142]:40854 "EHLO mail.ahsoftware.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751863Ab2HNHLa (ORCPT ); Tue, 14 Aug 2012 03:11:30 -0400 Received: by mail.ahsoftware.de (Postfix, from userid 65534) id E94058880DE; Tue, 14 Aug 2012 09:11:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.ahsoftware.de X-Spam-Level: X-Spam-Status: No, score=-101.0 required=5.0 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=disabled version=3.3.1 Received: from eiche.ahsoftware (p57B207A0.dip0.t-ipconnect.de [87.178.7.160]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.ahsoftware.de (Postfix) with ESMTPSA id 1F3778880B0; Tue, 14 Aug 2012 09:11:28 +0200 (CEST) Received: by eiche.ahsoftware (Postfix, from userid 65534) id 432EC3FD81; Tue, 14 Aug 2012 09:11:27 +0200 (CEST) Received: from krabat.ahsoftware (unknown [192.168.207.2]) by eiche.ahsoftware (Postfix) with ESMTP id EE5D33FD2C; Tue, 14 Aug 2012 07:11:09 +0000 (UTC) Message-ID: <5029FA0D.1090107@ahsoftware.de> Date: Tue, 14 Aug 2012 09:11:09 +0200 From: Alexander Holler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org CC: Bernie Thompson , Alexander Holler , linux-fbdev@vger.kernel.org Subject: [PATCH RESEND] video/udlfb: fix line counting in fb_write Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Line 0 and 1 were both written to line 0 (on the display) and all subsequent lines had an offset of -1. The result was that the last line on the display was never overwritten by writes to /dev/fbN. Cc: stable@vger.kernel.org Signed-off-by: Alexander Holler --- drivers/video/udlfb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index a159b63..85d8110 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c @@ -647,7 +647,7 @@ static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf, result = fb_sys_write(info, buf, count, ppos); if (result > 0) { - int start = max((int)(offset / info->fix.line_length) - 1, 0); + int start = max((int)(offset / info->fix.line_length), 0); int lines = min((u32)((result / info->fix.line_length) + 1), (u32)info->var.yres); -- 1.7.6.5