max8925_bl.c (97eb3f24352ec6632c2127b35d8087d2a809a9b9) max8925_bl.c (bb7ca747f8d6243b3943c5b133048652020f4a50)
1/*
2 * Backlight driver for Maxim MAX8925
3 *
4 * Copyright (C) 2009 Marvell International Ltd.
5 * Haojian Zhuang <haojian.zhuang@marvell.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 122 unchanged lines hidden (view full) ---

131 data = kzalloc(sizeof(struct max8925_backlight_data), GFP_KERNEL);
132 if (data == NULL)
133 return -ENOMEM;
134 strncpy(name, res->name, MAX8925_NAME_SIZE);
135 data->chip = chip;
136 data->current_brightness = 0;
137
138 memset(&props, 0, sizeof(struct backlight_properties));
1/*
2 * Backlight driver for Maxim MAX8925
3 *
4 * Copyright (C) 2009 Marvell International Ltd.
5 * Haojian Zhuang <haojian.zhuang@marvell.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 122 unchanged lines hidden (view full) ---

131 data = kzalloc(sizeof(struct max8925_backlight_data), GFP_KERNEL);
132 if (data == NULL)
133 return -ENOMEM;
134 strncpy(name, res->name, MAX8925_NAME_SIZE);
135 data->chip = chip;
136 data->current_brightness = 0;
137
138 memset(&props, 0, sizeof(struct backlight_properties));
139 props.type = BACKLIGHT_RAW;
139 props.max_brightness = MAX_BRIGHTNESS;
140 bl = backlight_device_register(name, &pdev->dev, data,
141 &max8925_backlight_ops, &props);
142 if (IS_ERR(bl)) {
143 dev_err(&pdev->dev, "failed to register backlight\n");
144 kfree(data);
145 return PTR_ERR(bl);
146 }

--- 58 unchanged lines hidden ---
140 props.max_brightness = MAX_BRIGHTNESS;
141 bl = backlight_device_register(name, &pdev->dev, data,
142 &max8925_backlight_ops, &props);
143 if (IS_ERR(bl)) {
144 dev_err(&pdev->dev, "failed to register backlight\n");
145 kfree(data);
146 return PTR_ERR(bl);
147 }

--- 58 unchanged lines hidden ---