Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp73212ybx; Wed, 6 Nov 2019 13:26:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxdfA9MZYxdDM7XMlXoHXAAZKW4h9XQrivSNBItEITXkTaQrixQ+yWEc4cnD8UkB/Li7hpR X-Received: by 2002:aa7:c493:: with SMTP id m19mr5191749edq.39.1573075561934; Wed, 06 Nov 2019 13:26:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573075561; cv=none; d=google.com; s=arc-20160816; b=0IXkRbzel7HAI1sQ1YMNNP6sKp59R/wR+zP+oaQKa1z+Ium/zOhIog8/9jYwBi2ZbA IdB4nACLjONsP2V4nO2gHIPW6Vjn2Kw+78wJHBVg9uSstZ2AXHLnGstBLd4YBdAQFyul 79LMwUyxFj1NUOqZcv5Bcbd48oMonnhayWTpAVwlyZ2HaYJcf4d8aKJzuJGf09p1bNNl sXpLRT8GMstDtsbnMh2wpEMhkdp5tlWqp/AYbwaUmc7VO5HSLLD7GMVISWuRHADWPspW w5Fqcbhon/3yeMccgF2EHTFJgVAqPYWhW1HXC+3UilimIwKkUb88ZBrxXRV20mDWxmFX /VEA== 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=bGL0wRhaJBRqeYBdNNcfOuItE39X/BxqzvFYN3v60i8=; b=cYDmGDlpegzvFnp8XXvtm10Bbb13XDiDvvTToDljjmuJdivbBRqTIcYqGlm4M82VaY MSwnF/AJv3WB38aopQOJu4tbNcRJB9KyylO4Ms4/tXfOEo0xLufMiCd0VBcAkIm5UEpt qLIwZq1OuCg4UpaTXfFQu+bwvjNDPW3N+O2ad7kYBZFIcXcFQTXstvkwcQMcqRU5p6kv bunpZOBGkt23x3puJ5PwUFXv8L+KgAR77e6/KYxGdyJlPdf1hljyufXeHDjZje7jS4l0 TyUmI1pDrkgpVn5AmTFyGHZgwUmJ0LePcu8N6YUGtKRwpp5poep67N3b7uUdZJ+Skr+D PXgg== 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 k16si14326257edj.133.2019.11.06.13.25.38; Wed, 06 Nov 2019 13:26:01 -0800 (PST) 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 S1732663AbfKFVV2 (ORCPT + 99 others); Wed, 6 Nov 2019 16:21:28 -0500 Received: from sauhun.de ([88.99.104.3]:59026 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732595AbfKFVV0 (ORCPT ); Wed, 6 Nov 2019 16:21:26 -0500 Received: from localhost (p54B33505.dip0.t-ipconnect.de [84.179.53.5]) by pokefinder.org (Postfix) with ESMTPSA id 5135C2C0553; Wed, 6 Nov 2019 22:21:24 +0100 (CET) From: Wolfram Sang To: linux-media@vger.kernel.org Cc: linux-i2c@vger.kernel.org, Wolfram Sang , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Subject: [PATCH 06/17] media: dvb-frontends: ts2020: convert to use i2c_new_client_device() Date: Wed, 6 Nov 2019 22:21:06 +0100 Message-Id: <20191106212120.27983-7-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191106212120.27983-1-wsa+renesas@sang-engineering.com> References: <20191106212120.27983-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 Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang --- drivers/media/dvb-frontends/ts2020.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/ts2020.c b/drivers/media/dvb-frontends/ts2020.c index 6c24d6d0d4c9..234607b02edb 100644 --- a/drivers/media/dvb-frontends/ts2020.c +++ b/drivers/media/dvb-frontends/ts2020.c @@ -519,8 +519,8 @@ struct dvb_frontend *ts2020_attach(struct dvb_frontend *fe, strscpy(board_info.type, "ts2020", I2C_NAME_SIZE); board_info.addr = config->tuner_address; board_info.platform_data = &pdata; - client = i2c_new_device(i2c, &board_info); - if (!client || !client->dev.driver) + client = i2c_new_client_device(i2c, &board_info); + if (!i2c_client_has_driver(client)) return NULL; return fe; -- 2.20.1