This is a note to let you know that I've just added the patch titled

    Staging: asus_oled: fix image processing

to my staging git tree which can be found at
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)

The patch will hopefully also will be merged in Linus's tree for the
next -rc kernel release.

If you have any questions about this process, please let me know.


>From 7f70e1fe7f47bc27144f2a0c3a3bb0f3e8bc1098 Mon Sep 17 00:00:00 2001
From: Pekka Paalanen <[email protected]>
Date: Sun, 22 Jan 2012 16:33:46 +0200
Subject: Staging: asus_oled: fix image processing

Programming an image was broken, because odev->buf_offs was not advanced
for val == 0 in append_values(). This regression was introduced in:

 commit 1ff12a4aa354bed093a0240d5e6347b1e27601bc
 Author: Kevin A. Granade <[email protected]>
 Date:   Sat Sep 5 01:03:39 2009 -0500

     Staging: asus_oled: Cleaned up checkpatch issues.

Fix the image processing by special-casing val == 0.

I have tested this change on an Asus G50V laptop only.

Cc: Jakub Schmidtke <[email protected]>
Cc: Kevin A. Granade <[email protected]>
Signed-off-by: Pekka Paalanen <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/asus_oled/asus_oled.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/asus_oled/asus_oled.c 
b/drivers/staging/asus_oled/asus_oled.c
index e77e4e0..2fdc5db 100644
--- a/drivers/staging/asus_oled/asus_oled.c
+++ b/drivers/staging/asus_oled/asus_oled.c
@@ -355,7 +355,14 @@ static void send_data(struct asus_oled_dev *odev)
 
 static int append_values(struct asus_oled_dev *odev, uint8_t val, size_t count)
 {
-       while (count-- > 0 && val) {
+       odev->last_val = val;
+
+       if (val == 0) {
+               odev->buf_offs += count;
+               return 0;
+       }
+
+       while (count-- > 0) {
                size_t x = odev->buf_offs % odev->width;
                size_t y = odev->buf_offs / odev->width;
                size_t i;
@@ -406,7 +413,6 @@ static int append_values(struct asus_oled_dev *odev, 
uint8_t val, size_t count)
                        ;
                }
 
-               odev->last_val = val;
                odev->buf_offs++;
        }
 
-- 
1.7.9


--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to