From patchwork Mon Dec 16 15:51:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 11294479 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0936138C for ; Mon, 16 Dec 2019 15:52:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4F952064B for ; Mon, 16 Dec 2019 15:52:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QtQpa3I5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4F952064B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WpvS2bI/alFGW4hWfXR7EFkJKxtu+OV2nuCjeei7Ke4=; b=QtQpa3I5+VIKtG ILivhq1CUUb+th+bn0QaWnqWahqr1K2z6CyjIU1EwzSj//vJe17UoaSkx2DnSeEmBJf7UefzYsw8I gwcLJ/TvlfgpLjXKVhwucpQvP3qc3GuoX2v2EsI3GL0UGpfStk3ZSYjF7k3Fzq9bVJ+vVMIdDR68z x7mZBFejeIz2JNsFRNjzLj+OGU+/Dof4vp68phs8hEtPa1MAfj3J539KIZuH8abN9I7G3Jby6GM3B GceXyC+7Q5Hp6KWYde+RpK2f6bS8AVGhEHiibfnDnTuY5J3JMJzn/bQ+eg+mhRP510bwI0YzMm+ab QZua+JMImoDiwlM6T2ZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1igsfA-000341-9g; Mon, 16 Dec 2019 15:52:00 +0000 Received: from sauhun.de ([88.99.104.3] helo=pokefinder.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1igsf6-00032v-TC for linux-arm-kernel@lists.infradead.org; Mon, 16 Dec 2019 15:51:58 +0000 Received: from localhost (p54B33297.dip0.t-ipconnect.de [84.179.50.151]) by pokefinder.org (Postfix) with ESMTPSA id 39BD82C2DAA; Mon, 16 Dec 2019 16:51:56 +0100 (CET) From: Wolfram Sang To: linux-media@vger.kernel.org Subject: [PATCH RESEND 09/16] media: platform: sti: c8sectpfe: c8sectpfe-dvb: convert to use i2c_new_client_device() Date: Mon, 16 Dec 2019 16:51:36 +0100 Message-Id: <20191216155146.8803-10-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216155146.8803-1-wsa+renesas@sang-engineering.com> References: <20191216155146.8803-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191216_075157_085919_AF141CCC X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [88.99.104.3 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 1.0 FORGED_SPF_HELO No description available. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wolfram Sang , Mauro Carvalho Chehab , Patrice Chotard , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Use the newer API returning an ERRPTR and use the new helper to bail out. Reviewed-by: Patrice Chotard 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; }