Skip to content

Commit 9e1b93b

Browse files
Wolfram Sangwsakernel
authored andcommitted
video: backlight: tosa_lcd: convert to use i2c_new_client_device()
Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent f04a5ba commit 9e1b93b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/video/backlight/tosa_lcd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static void tosa_lcd_tg_on(struct tosa_lcd_data *data)
107107
/* TG LCD GVSS */
108108
tosa_tg_send(spi, TG_PINICTL, 0x0);
109109

110-
if (!data->i2c) {
110+
if (IS_ERR_OR_NULL(data->i2c)) {
111111
/*
112112
* after the pannel is powered up the first time,
113113
* we can access the i2c bus so probe for the DAC
@@ -119,7 +119,7 @@ static void tosa_lcd_tg_on(struct tosa_lcd_data *data)
119119
.addr = DAC_BASE,
120120
.platform_data = data->spi,
121121
};
122-
data->i2c = i2c_new_device(adap, &info);
122+
data->i2c = i2c_new_client_device(adap, &info);
123123
}
124124
}
125125

0 commit comments

Comments
 (0)