aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2010-05-12 16:49:12 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2010-05-26 08:08:32 -0400
commit3f43f8b2ad9035c5440d65681079f4d80542d21f (patch)
treed980d62465066c4cf642cca105d490f189138c2a /drivers/video
parent82fd53b7f70af9855eda613450a7e4701ffdae20 (diff)
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')
-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 @@
16#include <linux/fb.h> 16#include <linux/fb.h>
17#include <linux/backlight.h> 17#include <linux/backlight.h>
18#include <linux/leds.h> 18#include <linux/leds.h>
19#include <linux/slab.h>
19#include <linux/workqueue.h> 20#include <linux/workqueue.h>
20 21
21#include <linux/i2c/adp8860.h> 22#include <linux/i2c/adp8860.h>
@@ -647,6 +648,7 @@ static int __devinit adp8860_probe(struct i2c_client *client,
647 struct adp8860_bl *data; 648 struct adp8860_bl *data;
648 struct adp8860_backlight_platform_data *pdata = 649 struct adp8860_backlight_platform_data *pdata =
649 client->dev.platform_data; 650 client->dev.platform_data;
651 struct backlight_properties props;
650 uint8_t reg_val; 652 uint8_t reg_val;
651 int ret; 653 int ret;
652 654
@@ -683,10 +685,13 @@ static int __devinit adp8860_probe(struct i2c_client *client,
683 data->current_brightness = 0; 685 data->current_brightness = 0;
684 i2c_set_clientdata(client, data); 686 i2c_set_clientdata(client, data);
685 687
688 memset(&props, 0, sizeof(props));
689 props.max_brightness = ADP8860_MAX_BRIGHTNESS;
690
686 mutex_init(&data->lock); 691 mutex_init(&data->lock);
687 692
688 bl = backlight_device_register(dev_driver_string(&client->dev), 693 bl = backlight_device_register(dev_driver_string(&client->dev),
689 &client->dev, data, &adp8860_bl_ops); 694 &client->dev, data, &adp8860_bl_ops, &props);
690 if (IS_ERR(bl)) { 695 if (IS_ERR(bl)) {
691 dev_err(&client->dev, "failed to register backlight\n"); 696 dev_err(&client->dev, "failed to register backlight\n");
692 ret = PTR_ERR(bl); 697 ret = PTR_ERR(bl);