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

« back to all changes in this revision

Viewing changes to drivers/video/backlight/adp5520_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:
211
211
                        const char *buf, size_t count)
212
212
{
213
213
        struct adp5520_bl *data = dev_get_drvdata(dev);
214
 
 
215
 
        strict_strtoul(buf, 10, &data->cached_daylight_max);
 
214
        int ret;
 
215
 
 
216
        ret = strict_strtoul(buf, 10, &data->cached_daylight_max);
 
217
        if (ret < 0)
 
218
                return ret;
 
219
 
216
220
        return adp5520_store(dev, buf, count, ADP5520_DAYLIGHT_MAX);
217
221
}
218
222
static DEVICE_ATTR(daylight_max, 0664, adp5520_bl_daylight_max_show,
303
307
        mutex_init(&data->lock);
304
308
 
305
309
        memset(&props, 0, sizeof(struct backlight_properties));
 
310
        props.type = BACKLIGHT_RAW;
306
311
        props.max_brightness = ADP5020_MAX_BRIGHTNESS;
307
312
        bl = backlight_device_register(pdev->name, data->master, data,
308
313
                                       &adp5520_bl_ops, &props);