[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200415103844.vnjccybvy5wtnrq6@holly.lan>
Date: Wed, 15 Apr 2020 11:38:44 +0100
From: Daniel Thompson <daniel.thompson@...aro.org>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-i2c@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
Jingoo Han <jingoohan1@...il.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] video: backlight: tosa_lcd: convert to use
i2c_new_client_device()
On Thu, Mar 26, 2020 at 10:09:59PM +0100, Wolfram Sang wrote:
> Move away from the deprecated API and return the shiny new ERRPTR where
> useful.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
Reviewed-by: Daniel Thompson <daniel.thompson@...aro.org>
> ---
> drivers/video/backlight/tosa_lcd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c
> index e8ab583e5098..113116d3585c 100644
> --- a/drivers/video/backlight/tosa_lcd.c
> +++ b/drivers/video/backlight/tosa_lcd.c
> @@ -107,7 +107,7 @@ static void tosa_lcd_tg_on(struct tosa_lcd_data *data)
> /* TG LCD GVSS */
> 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,
> * 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)
> .addr = DAC_BASE,
> .platform_data = data->spi,
> };
> - data->i2c = i2c_new_device(adap, &info);
> + data->i2c = i2c_new_client_device(adap, &info);
> }
> }
>
> --
> 2.20.1
>
Powered by blists - more mailing lists