OSDN Git Service

staging: fbtft: Changes gamma table to define.
authorLeonardo Brás <leobras.c@gmail.com>
Wed, 8 Aug 2018 00:28:57 +0000 (21:28 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Aug 2018 12:23:16 +0000 (14:23 +0200)
Most of other "Gamma Tables" were already boxed on a define, just did the same to PIOLED.

Signed-off-by: Leonardo Brás <leobras.c@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft_device.c

index 85018e4..4110bba 100644 (file)
@@ -262,6 +262,10 @@ static const s16 waveshare32b_init_sequence[] = {
        -3
 };
 
+#define PIOLED_GAMMA   "0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 " \
+                       "2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 " \
+                       "3 3 3 4 4 4 4 4 4 4 4 4 4 4 4"
+
 /* Supported displays in alphabetical order */
 static struct fbtft_device_display displays[] = {
        {
@@ -890,14 +894,7 @@ static struct fbtft_device_display displays[] = {
                                        { "dc", 25 },
                                        {},
                                },
-                               .gamma =        "0 2 2 2 2 2 2 2 "
-                                               "2 2 2 2 2 2 2 2 "
-                                               "2 2 2 2 2 2 2 2 "
-                                               "2 2 2 2 2 2 2 3 "
-                                               "3 3 3 3 3 3 3 3 "
-                                               "3 3 3 3 3 3 3 3 "
-                                               "3 3 3 4 4 4 4 4 "
-                                               "4 4 4 4 4 4 4"
+                               .gamma = PIOLED_GAMMA
                        }
                }
        }, {