summaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2010-05-12 13:49:12 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-05-26 13:08:32 +0100
commit3f43f8b2ad9035c5440d65681079f4d80542d21f (patch)
treed980d62465066c4cf642cca105d490f189138c2a /drivers/video/backlight
parent82fd53b7f70af9855eda613450a7e4701ffdae20 (diff)
downloadlinux-3f43f8b2ad9035c5440d65681079f4d80542d21f.tar.gz
linux-3f43f8b2ad9035c5440d65681079f4d80542d21f.tar.bz2
linux-3f43f8b2ad9035c5440d65681079f4d80542d21f.zip
backlight: fix adp8860_bl build errors
Add slab.h to fix part of build. Add a parameter in backlight_device_register() call to fix part of build. drivers/video/backlight/adp8860_bl.c:215: error: implicit declaration of function 'kzalloc' drivers/video/backlight/adp8860_bl.c:215: warning: assignment makes pointer from integer without a cast drivers/video/backlight/adp8860_bl.c:285: error: implicit declaration of function 'kfree' drivers/video/backlight/adp8860_bl.c:673: warning: assignment makes pointer from integer without a cast drivers/video/backlight/adp8860_bl.c:689: error: too few arguments to function 'backlight_device_register' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r--drivers/video/backlight/adp8860_bl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
index 3c449d2f68b9..99d14ed88571 100644
--- a/drivers/video/backlight/adp8860_bl.c
+++ b/drivers/video/backlight/adp8860_bl.c
@@ -16,6 +16,7 @@
#include <linux/fb.h>
#include <linux/backlight.h>
#include <linux/leds.h>
+#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/i2c/adp8860.h>
@@ -647,6 +648,7 @@ static int __devinit adp8860_probe(struct i2c_client *client,
struct adp8860_bl *data;
struct adp8860_backlight_platform_data *pdata =
client->dev.platform_data;
+ struct backlight_properties props;
uint8_t reg_val;
int ret;
@@ -683,10 +685,13 @@ static int __devinit adp8860_probe(struct i2c_client *client,
data->current_brightness = 0;
i2c_set_clientdata(client, data);
+ memset(&props, 0, sizeof(props));
+ props.max_brightness = ADP8860_MAX_BRIGHTNESS;
+
mutex_init(&data->lock);
bl = backlight_device_register(dev_driver_string(&client->dev),
- &client->dev, data, &adp8860_bl_ops);
+ &client->dev, data, &adp8860_bl_ops, &props);
if (IS_ERR(bl)) {
dev_err(&client->dev, "failed to register backlight\n");
ret = PTR_ERR(bl);