From 17ecbbd845f134b74b91ce1defd4f377d16fcdd7 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 20 Feb 2013 13:15:31 +1100 Subject: [PATCH] drivers/video/backlight/s6e63m0.c: report ->gamma_table_count correctly gamma_table has 3 arrays which each hold MAX_GAMMA_LEVEL pointers to int. The current code sets ->gamma_table_count to 6 on 64bit arches and to 3 on 32 bit arches. It should be 3 on everything. Signed-off-by: Dan Carpenter Cc: Jingoo Han Cc: Florian Tobias Schandinat Signed-off-by: Andrew Morton --- drivers/video/backlight/s6e63m0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index 2126b96ea603..9c2677f0ef7d 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c @@ -766,7 +766,7 @@ static int s6e63m0_probe(struct spi_device *spi) * know that. */ lcd->gamma_table_count = - sizeof(gamma_table) / (MAX_GAMMA_LEVEL * sizeof(int)); + sizeof(gamma_table) / (MAX_GAMMA_LEVEL * sizeof(int *)); ret = device_create_file(&(spi->dev), &dev_attr_gamma_mode); if (ret < 0) -- 2.39.5