Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

backlight: lp855x: remove duplicate platform data

The 'load_new_rom_data' was used for checking whether new ROM data should
be updated or not.

However, we can decide it with 'size_program' data. If the size is
greater than 0, it means updating ROM area is required. Otherwise, the
default ROM data will be used. Therefore, this duplicate platform data
can be removed.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Kim, Milo and committed by
Linus Torvalds
c365e59d 98e35be2

+1 -9
-4
Documentation/backlight/lp855x-driver.txt
··· 36 36 * initial_brightness : Initial value of backlight brightness. 37 37 * period_ns : Platform specific PWM period value. unit is nano. 38 38 Only valid when brightness is pwm input mode. 39 - * load_new_rom_data : 40 - 0 : use default configuration data 41 - 1 : update values of eeprom or eprom registers on loading driver 42 39 * size_program : Total size of lp855x_rom_data. 43 40 * rom_data : List of new eeprom/eprom registers. 44 41 ··· 52 55 .name = "lcd-bl", 53 56 .device_control = I2C_CONFIG(LP8552), 54 57 .initial_brightness = INITIAL_BRT, 55 - .load_new_rom_data = 1, 56 58 .size_program = ARRAY_SIZE(lp8552_eeprom_arr), 57 59 .rom_data = lp8552_eeprom_arr, 58 60 };
+1 -1
drivers/video/backlight/lp855x_bl.c
··· 192 192 if (ret) 193 193 goto err; 194 194 195 - if (pd->load_new_rom_data && pd->size_program) { 195 + if (pd->size_program > 0) { 196 196 for (i = 0; i < pd->size_program; i++) { 197 197 addr = pd->rom_data[i].addr; 198 198 val = pd->rom_data[i].val;
-4
include/linux/platform_data/lp855x.h
··· 115 115 * @initial_brightness : initial value of backlight brightness 116 116 * @period_ns : platform specific pwm period value. unit is nano. 117 117 Only valid when mode is PWM_BASED. 118 - * @load_new_rom_data : 119 - 0 : use default configuration data 120 - 1 : update values of eeprom or eprom registers on loading driver 121 118 * @size_program : total size of lp855x_rom_data 122 119 * @rom_data : list of new eeprom/eprom registers 123 120 */ ··· 123 126 u8 device_control; 124 127 u8 initial_brightness; 125 128 unsigned int period_ns; 126 - u8 load_new_rom_data; 127 129 int size_program; 128 130 struct lp855x_rom_data *rom_data; 129 131 };