aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft/fbtft.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-02-02 15:43:42 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 13:01:36 +0100
commit22eb36b8142b1f07f23c365e87a5dad6c9f233f1 (patch)
treece2d04c6b75134688627a29ac28504dcf227cc5f /drivers/staging/fbtft/fbtft.h
parentstaging: rtl8192u: move stats_IndicateArray off stack (diff)
downloadlinux-dev-22eb36b8142b1f07f23c365e87a5dad6c9f233f1.tar.xz
linux-dev-22eb36b8142b1f07f23c365e87a5dad6c9f233f1.zip
staging: fbtft: change 'gamma' array to u32
Having a local variable of 1024 bytes on 64-bit architectures is a bit too much, and I ran into this warning while trying to see what functions use the largest stack: drivers/staging/fbtft/fbtft-sysfs.c: In function 'store_gamma_curve': drivers/staging/fbtft/fbtft-sysfs.c:132:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=] As there is no need for 64-bit gamma values (on 32-bit architectures, we don't use those either), I'm changing the type from 'unsigned long' to 'u32' here, which cuts the required space in half everywhere. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft/fbtft.h')
-rw-r--r--drivers/staging/fbtft/fbtft.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index b09804773ff2..44cf94d160d4 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -92,7 +92,7 @@ struct fbtft_ops {
void (*unregister_backlight)(struct fbtft_par *par);
int (*set_var)(struct fbtft_par *par);
- int (*set_gamma)(struct fbtft_par *par, unsigned long *curves);
+ int (*set_gamma)(struct fbtft_par *par, u32 *curves);
};
/**
@@ -231,7 +231,7 @@ struct fbtft_par {
s16 *init_sequence;
struct {
struct mutex lock;
- unsigned long *curves;
+ u32 *curves;
int num_values;
int num_curves;
} gamma;