Commit 9e1b93b9 authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent f04a5ba1
...@@ -107,7 +107,7 @@ static void tosa_lcd_tg_on(struct tosa_lcd_data *data) ...@@ -107,7 +107,7 @@ static void tosa_lcd_tg_on(struct tosa_lcd_data *data)
/* TG LCD GVSS */ /* TG LCD GVSS */
tosa_tg_send(spi, TG_PINICTL, 0x0); tosa_tg_send(spi, TG_PINICTL, 0x0);
if (!data->i2c) { if (IS_ERR_OR_NULL(data->i2c)) {
/* /*
* after the pannel is powered up the first time, * after the pannel is powered up the first time,
* we can access the i2c bus so probe for the DAC * 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) ...@@ -119,7 +119,7 @@ static void tosa_lcd_tg_on(struct tosa_lcd_data *data)
.addr = DAC_BASE, .addr = DAC_BASE,
.platform_data = data->spi, .platform_data = data->spi,
}; };
data->i2c = i2c_new_device(adap, &info); data->i2c = i2c_new_client_device(adap, &info);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment