From patchwork Wed Jul 10 21:51:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11038989 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 484551395 for ; Wed, 10 Jul 2019 21:52:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C63528A02 for ; Wed, 10 Jul 2019 21:52:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3000128A14; Wed, 10 Jul 2019 21:52:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2C8928A02 for ; Wed, 10 Jul 2019 21:52:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727889AbfGJVwM (ORCPT ); Wed, 10 Jul 2019 17:52:12 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:40008 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727856AbfGJVwK (ORCPT ); Wed, 10 Jul 2019 17:52:10 -0400 Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B0E0731C; Wed, 10 Jul 2019 23:52:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1562795529; bh=0B5lLKSXFRO7OfOCzgAUxYlS5yKOAcCCoo3Cw6FhwFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n+SDziBe8BHm8oaLJYB5GUy9gfUYpj5hTJPOKaSzN4B11iPxap569Qyd0LypDPGNa rkRe739TNnyfVDTX8r7iR/LSJ/dJzWYiMzN4YVeHtIQVRofa1Sb2dGcGJCsT0rQkmq pKcO6VaraE6PMm4HW3pCuWhffyAaPNHC2a0po7rA= From: Kieran Bingham To: linux-i2c@vger.kernel.org, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Kieran Bingham , Pavel Machek , Sakari Ailus , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 5/6] media: i2c: et8ek8: Convert to new i2c device probe() Date: Wed, 10 Jul 2019 22:51:48 +0100 Message-Id: <20190710215149.9208-6-kieran.bingham+renesas@ideasonboard.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190710215149.9208-1-kieran.bingham+renesas@ideasonboard.com> References: <20190710215149.9208-1-kieran.bingham+renesas@ideasonboard.com> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The I2C core framework provides a simplified probe framework from commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"). This driver does not utilise the i2c_device_id table in the probe, so we can easily convert it to utilise the simplfied i2c driver registration. Signed-off-by: Kieran Bingham Reviewed-by: Wolfram Sang --- drivers/media/i2c/et8ek8/et8ek8_driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/et8ek8/et8ek8_driver.c b/drivers/media/i2c/et8ek8/et8ek8_driver.c index e6c06cb75d33..256acf73d5ea 100644 --- a/drivers/media/i2c/et8ek8/et8ek8_driver.c +++ b/drivers/media/i2c/et8ek8/et8ek8_driver.c @@ -1396,8 +1396,7 @@ static int __maybe_unused et8ek8_resume(struct device *dev) return __et8ek8_set_power(sensor, true); } -static int et8ek8_probe(struct i2c_client *client, - const struct i2c_device_id *devid) +static int et8ek8_probe(struct i2c_client *client) { struct et8ek8_sensor *sensor; struct device *dev = &client->dev; @@ -1504,7 +1503,7 @@ static struct i2c_driver et8ek8_i2c_driver = { .pm = &et8ek8_pm_ops, .of_match_table = et8ek8_of_table, }, - .probe = et8ek8_probe, + .probe_new = et8ek8_probe, .remove = __exit_p(et8ek8_remove), .id_table = et8ek8_id_table, };