Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp70823ybx; Wed, 6 Nov 2019 13:23:36 -0800 (PST) X-Google-Smtp-Source: APXvYqw9XRAODU+40+l+6Gx+Ji6kZatXiqj1CLlcaRUauApHp3wZCuyG2m/jfcGfp0LDO2BPrUGo X-Received: by 2002:a50:a9e3:: with SMTP id n90mr5135857edc.52.1573075415960; Wed, 06 Nov 2019 13:23:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573075415; cv=none; d=google.com; s=arc-20160816; b=SzM/z8ElTlQELk6paQPSzLRPKUU5XB7nslg4LYLNZkde5rTcBmRKCp36qHYSqpruTW uxo63gDQ7KAeflGnsfiPe7BWRG4zo3kqYF2mXLtiQY6sN7n3LcRAYFY9THeNzcsnHxGO 4jp6qwnmYoazCjVOY8bFrcu8UtrIMY85zPwQx4+DH0LdxgajHBsrqRcmEVjYBK3Hcd8q oH8hnsdxis21XhSrWAT0bpIPcS1a8iLvd25KLZsYkwwmctTp2dW6+BdFuN3vCtifCNSL ESMHW6W4C891LbDHwo17ZDYU0lbsx8nwUylQXWBGJEL8VWInUVMBDmHV5y9DrOnht3X+ Ux3A== 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=MZM39ployb6V9Hap+GeCoG20ogEHeKwpn/pHdhGq4+E=; b=WSosNNk2FfFqVWds+wo1rvE7mnea+tnhYoXP+dkxrO+iqjwb9gVmAqU0QHy39nPLXV jptIPjc3RLwC2+hcIb99RH9RYoVDwhe21l1ji+eIGrEqPwlrqmh++HGNT8tkDvnBlLtD hs8RcVscB7y861Nz4fcNa93WrDFoyqQfe5YF4C4ngkBA4dgR8ud+TtFvmY8umbAl/lXP vtu8oCUjdne+nAzhP9EC0PjpjL/n5pagTxdhKmbT78tsKEAdI5C//L+190fBOI+PC9gX bWfBG/70n5UM7m4waLeRbWEDFAr6EbKZBwCKKkcHRpmOaA7VyOQQ2lJ8LTxtUM1qZOdJ 1gDQ== 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 z4si16197671edi.38.2019.11.06.13.23.12; Wed, 06 Nov 2019 13:23:35 -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 S1732798AbfKFVWH (ORCPT + 99 others); Wed, 6 Nov 2019 16:22:07 -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 S1732439AbfKFVV2 (ORCPT ); Wed, 6 Nov 2019 16:21:28 -0500 Received: from localhost (p54B33505.dip0.t-ipconnect.de [84.179.53.5]) by pokefinder.org (Postfix) with ESMTPSA id CF6202C0553; Wed, 6 Nov 2019 22:21:26 +0100 (CET) From: Wolfram Sang To: linux-media@vger.kernel.org Cc: linux-i2c@vger.kernel.org, Wolfram Sang , Patrice Chotard , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/17] media: platform: sti: c8sectpfe: c8sectpfe-dvb: convert to use i2c_new_client_device() Date: Wed, 6 Nov 2019 22:21:10 +0100 Message-Id: <20191106212120.27983-11-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/platform/sti/c8sectpfe/c8sectpfe-dvb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c index a79250a7f812..103872266565 100644 --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c @@ -170,8 +170,8 @@ int c8sectpfe_frontend_attach(struct dvb_frontend **fe, /* attach tuner */ request_module("tda18212"); - client = i2c_new_device(tsin->i2c_adapter, &tda18212_info); - if (!client || !client->dev.driver) { + client = i2c_new_client_device(tsin->i2c_adapter, &tda18212_info); + if (!i2c_client_has_driver(client)) { dvb_frontend_detach(*fe); return -ENODEV; } -- 2.20.1