From patchwork Fri Nov 18 22:42:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 22643 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp460481wrr; Fri, 18 Nov 2022 15:24:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf4LgaXuss7wHiAz/1LvJneryvIILqUhYsvDFP4PnpKoKah8XzjeqV2ncZccxm6Y4FKPwrAr X-Received: by 2002:aa7:d74e:0:b0:469:1571:862 with SMTP id a14-20020aa7d74e000000b0046915710862mr3839895eds.318.1668813864165; Fri, 18 Nov 2022 15:24:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668813864; cv=none; d=google.com; s=arc-20160816; b=j4Il/Yy6dLaE9nLrOidWYm8o2xR7LQjhEN0o8/ZcetcsDXO0SEh+cFmWk3JiQX5iId ivnuqlRtK+PFebMuOGCQDXGhRVVY2I/clSDH9uh5NuyL1XcyjlkSa1VUKcctLwE0RHTI a10TmUn9xxsgSaJrIVIcjTXLrcfbDPgX0yMxav4g9RW41WI6YOTli1h4xLryIZDJPHj1 bP/xUrxN+VmNcZDf+JnYxndc4ssnTsfHiBW39NCLlVpXTkmrF/IfoQ/1ULK+n6+9pRMg Srsql7gEwx0UCG/hnE6q4SwAbZEDQWh/DWVWdI9Wvz4ITNteXX9mNeebn5MX2i4yBxo1 1MYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=K4xaP7qHKGpZQLqqSK38XtAbROy4OwkaVmFPAhvqQJo=; b=SYdsF5xJFnklSmPmozWYk11eFmXLK8Fge+eF56VdFOvO5SG0MLlxOiJVyVL4Q4nRXw CbQ1nG0PgCY/Vw5FmgOM0lLCox7VMYavxgSBQV7w+9vcak9KpZ3WPo7zCmpPfcNTHZDM 3PsMpCUEy6bh061yMqYvGVbfocp3hOtUV38W6WgHHjr/lfNosn08Yd0StLQMCUHs8Ffd yLgLjPrEKADZukRz5/OgMd0mSX0ejErXo3ycNotO2x5OoGgve9N7JYKFlpU3j+fnSvA0 fxH/w/Auejk2UCUMyqv/8S0cpT8NreVAB+GcEVO6hwZbufNTgfWB7Ov8aFEWgthbxj8H urJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk10-20020a1709077f8a00b007ae8d01144dsi4554286ejc.717.2022.11.18.15.23.56; Fri, 18 Nov 2022 15:24:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235573AbiKRXWK (ORCPT + 99 others); Fri, 18 Nov 2022 18:22:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234789AbiKRXVG (ORCPT ); Fri, 18 Nov 2022 18:21:06 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68B3052144 for ; Fri, 18 Nov 2022 15:12:06 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1owA96-0003e8-MD; Fri, 18 Nov 2022 23:47:40 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1owA93-0058cw-S9; Fri, 18 Nov 2022 23:47:38 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA94-0000IA-5e; Fri, 18 Nov 2022 23:47:38 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Matt Ranostay , Mauro Carvalho Chehab Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de, =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 390/606] media: i2c/video-i2c: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:42:04 +0100 Message-Id: <20221118224540.619276-391-uwe@kleine-koenig.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221118224540.619276-1-uwe@kleine-koenig.org> References: <20221118224540.619276-1-uwe@kleine-koenig.org> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749878166214546137?= X-GMAIL-MSGID: =?utf-8?q?1749878166214546137?= From: Uwe Kleine-König .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König Acked-by: Matt Ranostay --- drivers/media/i2c/video-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index f15ef2d13059..dddf9827b314 100644 --- a/drivers/media/i2c/video-i2c.c +++ b/drivers/media/i2c/video-i2c.c @@ -757,9 +757,9 @@ static void video_i2c_release(struct video_device *vdev) kfree(data); } -static int video_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int video_i2c_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct video_i2c_data *data; struct v4l2_device *v4l2_dev; struct vb2_queue *queue; @@ -959,7 +959,7 @@ static struct i2c_driver video_i2c_driver = { .of_match_table = video_i2c_of_match, .pm = &video_i2c_pm_ops, }, - .probe = video_i2c_probe, + .probe_new = video_i2c_probe, .remove = video_i2c_remove, .id_table = video_i2c_id_table, };