Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2374354pja; Thu, 26 Mar 2020 14:11:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsv/MvnUirRzQVEoE7Xz6ft64O0P0g5MnVsNsU4T8Gr1WXF67j9Kw3/Wz8va3kLV9goTpTW X-Received: by 2002:a05:6830:168c:: with SMTP id k12mr7696665otr.366.1585257068959; Thu, 26 Mar 2020 14:11:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585257068; cv=none; d=google.com; s=arc-20160816; b=iu5j519nO/H/H6aFdWDkcq4K+VYwbebDqx1EXyLvZMlydKkZFjjVmAvQfZ5hO9W/DH 3c5FHh+Mbd1nwUOB/acuepej9w+uYbIwIP2NO2QAwZaaP+gA1v53rIyGnze+ujCKTANA 8f6v+Uh31m5ZTn6SCt/6z6H8wdXnQaEe471OqTthZCrt+0OEstK1oKGlsSl/F13rMRMq /97PjlLKwQ0gUgpItYFiCMe3wZ2naovR273ZBnnoLq2nYXemqS2YMkdtpvSz08h/BMrp a1SYSTZxHS32MueVpxPvXVVdN5WSJr0P74xfSMjf3508TE2pMQjdeyLjI6lnsFHtHnOo KYmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=k5tF5qJgfTL0PXTEZmUaLbwZGrwjvo9H1or/CS65DuQ=; b=u/k4m/MQb3CqyXN10Uo3KRV9qhz4JGMs1lEwkHPmJwP4NoDMeOBkaV/rUA3JaLpgfe SLYQssHcpC5JBfuQSq0Ax1NY2r+YvYuEnAuTpzWb1SqJDpKD70aLPjOnAcJ7I7XjFSzh ghTqZgz43QWLA6VDHi6WWEOXSp0A8VnlcOTMWV47NQwc1rv/XWKmbYdA4lSbbf/TfV5p 5KimjI6PunQDhQOjUaIBlhH7/w8EzBC/TPh/8PI2Jaxnsx1SyoVv/e16q2OqqMO4Ubr7 VMCEkhxUx5aXgm5MFr/tG3keDjsJXixfeINiH/JyOkizAhmB+ZwGWzwZvMAi1k3th1C4 Pirg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w24si1631238otq.131.2020.03.26.14.10.55; Thu, 26 Mar 2020 14:11:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727991AbgCZVKS (ORCPT + 99 others); Thu, 26 Mar 2020 17:10:18 -0400 Received: from sauhun.de ([88.99.104.3]:54390 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727851AbgCZVKB (ORCPT ); Thu, 26 Mar 2020 17:10:01 -0400 Received: from localhost (p54B3331F.dip0.t-ipconnect.de [84.179.51.31]) by pokefinder.org (Postfix) with ESMTPSA id 4594D2C1F8B; Thu, 26 Mar 2020 22:10:00 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] video: backlight: tosa_lcd: convert to use i2c_new_client_device() Date: Thu, 26 Mar 2020 22:09:59 +0100 Message-Id: <20200326210959.13111-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200326210959.13111-1-wsa+renesas@sang-engineering.com> References: <20200326210959.13111-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang --- 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