linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] backlight: s6e63m0: report ->gamma_table_count correctly
@ 2013-01-24  7:05 Dan Carpenter
  2013-01-25  2:22 ` Jingoo Han
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2013-01-24  7:05 UTC (permalink / raw)
  To: linux-fbdev

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 <dan.carpenter@oracle.com>
---
This is from reading the code.  We use ->gamma_table_count in sysfs file
but other than that I'm not sure what it's for.  I am not very familiar
with this code.

diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c
index 2126b96..9c2677f 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)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-30  1:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24  7:05 [patch] backlight: s6e63m0: report ->gamma_table_count correctly Dan Carpenter
2013-01-25  2:22 ` Jingoo Han
2013-01-30  1:01   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).