~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/video/backlight/88pm860x_bl.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include <linux/fb.h>
17
17
#include <linux/i2c.h>
18
18
#include <linux/backlight.h>
19
 
#include <linux/mfd/core.h>
20
19
#include <linux/mfd/88pm860x.h>
21
20
 
22
21
#define MAX_BRIGHTNESS          (0xFF)
168
167
        struct pm860x_backlight_pdata *pdata = NULL;
169
168
        struct pm860x_backlight_data *data;
170
169
        struct backlight_device *bl;
171
 
        struct mfd_cell *cell;
172
170
        struct resource *res;
173
171
        struct backlight_properties props;
174
172
        unsigned char value;
181
179
                return -EINVAL;
182
180
        }
183
181
 
184
 
        cell = pdev->dev.platform_data;
185
 
        if (cell == NULL)
186
 
                return -ENODEV;
187
 
        pdata = cell->mfd_data;
 
182
        pdata = pdev->dev.platform_data;
188
183
        if (pdata == NULL) {
189
184
                dev_err(&pdev->dev, "platform data isn't assigned to "
190
185
                        "backlight\n");
209
204
        }
210
205
 
211
206
        memset(&props, 0, sizeof(struct backlight_properties));
 
207
        props.type = BACKLIGHT_RAW;
212
208
        props.max_brightness = MAX_BRIGHTNESS;
213
209
        bl = backlight_device_register(name, &pdev->dev, data,
214
210
                                        &pm860x_backlight_ops, &props);