From patchwork Fri Feb 24 12:05:52 2023 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: 61285 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp868548wrd; Fri, 24 Feb 2023 04:10:41 -0800 (PST) X-Google-Smtp-Source: AK7set/iZSDy/ep8pA7SIsF7ZIyvgU9BBYMp6LnGIEtvSvr9lxS37pVY/pqVkzn41tqbOXphNfh6 X-Received: by 2002:a17:90b:1b4e:b0:22c:5360:684e with SMTP id nv14-20020a17090b1b4e00b0022c5360684emr16689971pjb.29.1677240640766; Fri, 24 Feb 2023 04:10:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677240640; cv=none; d=google.com; s=arc-20160816; b=JtZ9AqSXs1yv1hNUrWWFReHI3QZFWSk/gp8v3aJQnTaRvsqex3nmO3ZG4cHvCZRv4d 2KiMdv3VcU7r/MFiw+KaqruOmHKk2YuzTuxoDfbCTTceLrAe6U750MeEWK/Z81TY8vNK 1ZwpFx3UUCU5xF43rqi5reRfgOVNfGu9T2ZdpBkRcgV1VSQU6ZwiKYQtJIgGIb1anuSB 9WFdIJ25ORKlt5JG/gsAvsfEHfpJTyt1951J9SfVYkZKGlBaaqiepzTA4rBGZk8rLfml MCAp5k/Q6bxi/D9PFrAX6dYZsksRPFQN69dEUa1AzpUgoAg5U7LpvVhj8q/U8vu8gM9V pP1g== 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=jG1by8RqhsKtQyPA6N0cYLu8URfGDfFzsK7VNC+WBLg=; b=eNblBAhI17kQx226p4y9VFibacfdhVfGTKrJ25Nb57+ux1PIAxaGTwXwP6PMkZI6Hp Iffsx8ZBMu5+UK3ZaaowVDhmaGDMnSo60BhBWcWIjO7xNaVOoF7GtEJfiIzN0ZjnJl9G lyluo6/X5y89tyypWNWD5zMVp0gSsLMynz/TJo4iS940xnOfmznjr3a1YabEUTCxjxi9 lx2DAfakA2G7FdAPri8xe/DcSOI1557J3JIjPPMVn7d3Et0xRPXgNDuzFUs1BooCtrY2 mFo6N5mVkjSx9b8CZNFb0XnSTpboqZExJX57Mq4D3VEZhnrHI+QoYLfDQKV7zdbgffvu Y4zg== 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 z16-20020a17090ad79000b0022bb380256esi2209961pju.106.2023.02.24.04.10.25; Fri, 24 Feb 2023 04:10:40 -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 S229887AbjBXMGS (ORCPT + 99 others); Fri, 24 Feb 2023 07:06:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjBXMGR (ORCPT ); Fri, 24 Feb 2023 07:06:17 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 498EC65336 for ; Fri, 24 Feb 2023 04:06:16 -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 1pVWq3-0000cO-GQ; Fri, 24 Feb 2023 13:06:11 +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 1pVWq1-007Aze-Ft; Fri, 24 Feb 2023 13:06:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pVWq1-006EYk-GX; Fri, 24 Feb 2023 13:06:09 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: kernel@pengutronix.de, Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: [PATCH 1/9] misc: ad525x_dpot-i2c: Convert to i2c's .probe_new() Date: Fri, 24 Feb 2023 13:05:52 +0100 Message-Id: <20230224120600.1681685-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> References: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1292; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=mZMy4fIoX9VoX671/ujh3l6dvR2sZ0vFBfJ5QYZaI/k=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+KgGWYZ8keqte4NLP53S5uCaMlHf1ql5crSHa pOrSxDbA+KJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/ioBgAKCRDB/BR4rcrs CX6MCACDJMLcVlwPFqphiqcsaBpcTjlkPiqn53IelowpPzNxMasMAbZ9xaSQGdfNW7wajIfoThu ijkwGZi3dY26Szqrsf878I+U27c/lYrgrQV0PFRo1saSk1v2fHWczfjc/zQh2KPaokJ4Oiqe+I5 gVo+X+ZCH7sgGmxOrMLIUJJ+jcez/aLDQn0DT270iinI6loLbU2jdUA3OHHkcLGkjCZ6UDiWy8X C4XIatL9rz+rFHtfxc3chUe8W8DPUFWDCNuPbLp4KxsiQ7Osv2KSUJQjVlAQvyiT9E1AErFgM/5 1PzLHBN8mMKCbyud7y6k1KI0W+qjv1est8jwO8EGmqG805aZ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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?1758714281951336627?= X-GMAIL-MSGID: =?utf-8?q?1758714281951336627?= .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/lkml/20221118224540.619276-483-uwe@kleine-koenig.org Signed-off-by: Uwe Kleine-König --- drivers/misc/ad525x_dpot-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/ad525x_dpot-i2c.c b/drivers/misc/ad525x_dpot-i2c.c index 28ffb4377d98..3856d5c04c5f 100644 --- a/drivers/misc/ad525x_dpot-i2c.c +++ b/drivers/misc/ad525x_dpot-i2c.c @@ -50,9 +50,9 @@ static const struct ad_dpot_bus_ops bops = { .write_r8d16 = write_r8d16, }; -static int ad_dpot_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int ad_dpot_i2c_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct ad_dpot_bus_data bdata = { .client = client, .bops = &bops, @@ -106,7 +106,7 @@ static struct i2c_driver ad_dpot_i2c_driver = { .driver = { .name = "ad_dpot", }, - .probe = ad_dpot_i2c_probe, + .probe_new = ad_dpot_i2c_probe, .remove = ad_dpot_i2c_remove, .id_table = ad_dpot_id, }; From patchwork Fri Feb 24 12:05:53 2023 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: 61291 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp869077wrd; Fri, 24 Feb 2023 04:11:39 -0800 (PST) X-Google-Smtp-Source: AK7set/Z9Z5JAE5ekWM3KkRIVM8JPncaUzu38TXvACkgHXxH1FsMXpbsGqCxCtv90qHWzDNAHsVe X-Received: by 2002:a17:90a:1997:b0:230:c272:3cfa with SMTP id 23-20020a17090a199700b00230c2723cfamr15354678pji.22.1677240699290; Fri, 24 Feb 2023 04:11:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677240699; cv=none; d=google.com; s=arc-20160816; b=UMiZRbJBKzqRI2KpbpxiuqizvKyBEOvjaqktMLhfzfszdsCcewT1Z3chCmTSDc7Yjw Ip6idaNyTxCa4JodoCm54CVPDTFNAAiF7GcoPhpm7eBSk+oRbCRcQSCDO6X4nDPXYtp8 +oKyDi8CDlMXkNt1nym282Q6eXmMmAClcou+X0nwBfEqDIkcI2Ls0djHQ8pEUl8J7NXx crfOc6VFJsL9ERw143H+6S0oQlReREh0YpEcVnw+qguOHhup+sKNTwwNxwXKXfSg+6AB Uv8kRUkZY/BezVU74M4N1My9cp4veHtkb712m6R3KEhs0cOP02hdESY9yRo/W7V/YoTV ftCw== 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=OYWVNBAcRWiz9ShGp98mILXYC5kPje/+yeKEkDZOblE=; b=uo+Is4VGfOKvG38qPhPmmkEK9/Dhqn1WeeTaoZ143gfwkw4ucpfw1UEwsRnypCYrMq e1/goWm3MZq0eHJMHbS0+vqDpHnGG17qY3w2fwmeh2KcgZqsQQpqBa6MejAi8usj2nSU YrfWibyT9oS6DEu7MNM6QCmZcHLTwaVVFO7jL/lBMmtjU3WB6XNAzKIoT9+VvEGooq/z uMBrFrs1ypCNES/Q6hnx9Y0Z5ufwahBu33IiIBXL2D9adqZIEvjBhhnWac87M9LrW2e5 QnouPvefm16SWH1/8fmPiN0FU7PbWJp0n9K+x7m8Sn1K9C4xWzkVhyqv7eyzaQTsNzPr COtA== 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 i19-20020a63e453000000b004f26909ea46si3832225pgk.38.2023.02.24.04.11.22; Fri, 24 Feb 2023 04:11:39 -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 S230047AbjBXMGo (ORCPT + 99 others); Fri, 24 Feb 2023 07:06:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229917AbjBXMG1 (ORCPT ); Fri, 24 Feb 2023 07:06:27 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3728658D1 for ; Fri, 24 Feb 2023 04:06:23 -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 1pVWq3-0000cN-Qq; Fri, 24 Feb 2023 13:06:11 +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 1pVWq1-007AzY-87; Fri, 24 Feb 2023 13:06:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pVWq1-006EYn-N4; Fri, 24 Feb 2023 13:06:09 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: kernel@pengutronix.de, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Ajay Gupta , Peter Senna Tschudin , Vladimir Oltean , Luca Ceresoli , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/9] mtd: maps: pismo: Convert to i2c's .probe_new() Date: Fri, 24 Feb 2023 13:05:53 +0100 Message-Id: <20230224120600.1681685-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> References: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1138; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=/0eiJPqFeurijjpkwmurJqwpYiXoK4/V9TBQsEVUx4E=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+KgKBq230DjtR0OENDTBnqh3jGbv7HQJOiXLd 6y9xrOx10OJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/ioCgAKCRDB/BR4rcrs CY4XCACH57ZCK1Vw03Zvu0LsFkiwrHRc8kuPqK/hmjDx7CRhsyr4gxJ0xxXg7CJId36dbm1JTUt 6QWR789F/GDm8Ke3B/p+rJW56+JBqHvlevMucJ/8ufUbR9Q67xjEuH87WwsveZ7iG8/ovUdGcrr sgy3Q1yYjtkhxt39BvnHNHF91FhJdTT5fI91UIW4xHZKwKkjJdj0I9DpliGYGSELePaBm3h8kLo 7YlxhXiPBIvkJAvqRiG5/esKuqv0DXyqRt2UF42xR7hlbu5oHKZFRJ/XpRfCmkNS6m15CboT/Dg 7uxvImtjHzjPAXvCaAFFo6j3oGNqZE+TlK3mXL2fZA9KXnu9 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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?1758714343162612831?= X-GMAIL-MSGID: =?utf-8?q?1758714343162612831?= The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Acked-by: Richard Weinberger Link: https://lore.kernel.org/lkml/20221118224540.619276-497-uwe@kleine-koenig.org Signed-off-by: Uwe Kleine-König --- drivers/mtd/maps/pismo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/maps/pismo.c b/drivers/mtd/maps/pismo.c index 5fcefcd0baca..3e0fff3f129e 100644 --- a/drivers/mtd/maps/pismo.c +++ b/drivers/mtd/maps/pismo.c @@ -206,8 +206,7 @@ static void pismo_remove(struct i2c_client *client) kfree(pismo); } -static int pismo_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int pismo_probe(struct i2c_client *client) { struct pismo_pdata *pdata = client->dev.platform_data; struct pismo_eeprom eeprom; @@ -260,7 +259,7 @@ static struct i2c_driver pismo_driver = { .driver = { .name = "pismo", }, - .probe = pismo_probe, + .probe_new = pismo_probe, .remove = pismo_remove, .id_table = pismo_id, }; From patchwork Fri Feb 24 12:05:54 2023 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: 61289 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp868796wrd; Fri, 24 Feb 2023 04:11:10 -0800 (PST) X-Google-Smtp-Source: AK7set/ec0UVsCMVNy6PjQxcw/Db+ehXmvMHZCyeM1++rC1k8aIM7M9FQ35TWENKxw0ZfB0p546Z X-Received: by 2002:a05:6a20:6909:b0:cc:3f87:a80c with SMTP id q9-20020a056a20690900b000cc3f87a80cmr6757544pzj.3.1677240670531; Fri, 24 Feb 2023 04:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677240670; cv=none; d=google.com; s=arc-20160816; b=PwC3vWE9uyrU1hoASq9VjA8sWYFIndGXHNUiXVUwEtFTSYCiuUvclyfBRaNzLWIjBk tlKy4zqRAJ5gfFHGJrAPmwC9OVlgzw82c6zxICyucm/LUIpmdSbKLfNVqWxvxy+zyM+p pAu+TlV/cNw7WHXYoxK1hWGVfU0/wcNibPbLOyLUXvR+Pwrm/XQc4UmWnBuqmaL/VWxk Nc0aU6CybzUrZik63k2RItl8qMNVpcTr8hDMupQpi+WEoJK9xA4iVWnDEKh3hkcYhtie m2kxvgd4qEevSQfLDpJ7Ynw3QqHBowbRR4sQgqPht2hODd7/P5jgauLNWFxeDvgchKsV zebw== 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=mt2u1FYPGaTOHQre6H/7LkP9DwGgBr9kVIzuCi21Xgc=; b=ecCB7QBEy7NkKfCtLjR3vHcUNwwX2wQ/d+Swdf1TSmY0Hm4ZcgA/4b+3GKaTyT1y/m v7rScfyG5TPyTC994xizOGyq2sDcChuHBY4t++UWUn96KxCfhIX9LiFZwoyVyEImgrij 48Z+x0IjseaVu0E7b7kYr40X/LMdmh+8+P4ZCKrxzw+EocMRjTXde6Go7RbyaqFqMgvl HtTIznn+leGxLmuWkbwMGV8+GoRAwlOdOoFHbUMIYPcAm/gxziuR51XEbf9EAL0zAkjo 8B+KRi1iIHisx3WIGmQN3SVjBDSj8s63VLChWI8Vki7cfgfNc+3AUKTr+fx4h3LeY4DY k7oQ== 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 g8-20020a631108000000b005030e22ea14si1276813pgl.136.2023.02.24.04.10.55; Fri, 24 Feb 2023 04:11:10 -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 S229978AbjBXMG1 (ORCPT + 99 others); Fri, 24 Feb 2023 07:06:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbjBXMGU (ORCPT ); Fri, 24 Feb 2023 07:06:20 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE57E658CA for ; Fri, 24 Feb 2023 04:06:18 -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 1pVWq3-0000cP-GQ; Fri, 24 Feb 2023 13:06:11 +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 1pVWq1-007Azd-Fh; Fri, 24 Feb 2023 13:06:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pVWq1-006EYq-Vw; Fri, 24 Feb 2023 13:06:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: kernel@pengutronix.de, Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/9] serial: sc16is7xx: Convert to i2c's .probe_new() Date: Fri, 24 Feb 2023 13:05:54 +0100 Message-Id: <20230224120600.1681685-4-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> References: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1343; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=SyAwunV7rOOAWji/gEzYK8mQViHExwViHtm1Rqv0acA=; b=owGbwMvMwMV48I9IxdpTbzgZT6slMST/WMHb1X2gbKvcdZ6VfKrZwUmzDjDdX5TFkF6Q9FNeY E5UhdaDTkZjFgZGLgZZMUWWuiItsQkSa/7blSzhhhnEygQyhYGLUwAmop/EwTAnxa/8CkvhjanN dor3v3iaKa1kyZx+S/lRp+4VrvP/O1xj763ze/SVLWv6TF+Fb4zL/q3oyFXLF9RdJKBS96/h2Ad TlofX1zRnzF1+okXL/4ZqSlFzXmqJ5q4YcSGjLwzC4utvPHdL3hP+ZoWbiPj55EOH1a9GGZc/eu Yzx7UoTMAv4rbR9LQJAd+ZFnSwtAVbbMo8HL7YYFdWBLdo+9Ugb/vw/2Ht2lpvwnKOuQavrrc7Z +lzzLDyh3insI/7sy3lcmf0+yWYL1Xe3mQpH8ckdjAvwyhrh2NTiGnu1c+x/EkPv/b9nG8vcvja 5Cjd95/kijnPKFlvb3j8ufPx92fKl7bIbTlaFyxXzSoDAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.2 required=5.0 tests=BAYES_00,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?1758714313103908351?= X-GMAIL-MSGID: =?utf-8?q?1758714313103908351?= .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/lkml/20221118224540.619276-572-uwe@kleine-koenig.org Signed-off-by: Uwe Kleine-König --- drivers/tty/serial/sc16is7xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 39f92eb1e698..8412b25eac86 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1665,9 +1665,9 @@ MODULE_ALIAS("spi:sc16is7xx"); #endif #ifdef CONFIG_SERIAL_SC16IS7XX_I2C -static int sc16is7xx_i2c_probe(struct i2c_client *i2c, - const struct i2c_device_id *id) +static int sc16is7xx_i2c_probe(struct i2c_client *i2c) { + const struct i2c_device_id *id = i2c_client_get_device_id(i2c); const struct sc16is7xx_devtype *devtype; struct regmap *regmap; @@ -1708,7 +1708,7 @@ static struct i2c_driver sc16is7xx_i2c_uart_driver = { .name = SC16IS7XX_NAME, .of_match_table = sc16is7xx_dt_ids, }, - .probe = sc16is7xx_i2c_probe, + .probe_new = sc16is7xx_i2c_probe, .remove = sc16is7xx_i2c_remove, .id_table = sc16is7xx_i2c_id_table, }; From patchwork Fri Feb 24 12:05:55 2023 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: 61292 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp869361wrd; Fri, 24 Feb 2023 04:12:17 -0800 (PST) X-Google-Smtp-Source: AK7set9+StIO7fkJis8r3SMlL6ouvXcR4TYqd5nSAqaYwC8RR88qy8WH57cF9TPdwLAK7d8x5Fax X-Received: by 2002:a05:6a20:1607:b0:cc:109b:6c85 with SMTP id l7-20020a056a20160700b000cc109b6c85mr6974529pzj.7.1677240736820; Fri, 24 Feb 2023 04:12:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677240736; cv=none; d=google.com; s=arc-20160816; b=weu/apt4rJaE0MI3/uRf2Nnk9tBIPw+ZFtN7XOdZrtMEQZ7TqKNNcywS4HkZTLYMGm QPKrgSM3JTh+M5DpahPil69xZBvVCI3DfS0odctx/NoB3x5GbUagu2bPdA7Z5d5S55/K FlURfSK2VBNrKyLR4nDxRB4CoqgH79oUWOPvh1lRkPCRpoHQNh/WbpiLaGDPbp8p8g2N OFrDTfpJeJEelPJGPNorxtdiK5lpqNV4wvFvdqU/peaZvRh6fZJxLBQQ7xMV85INTQ5J j0L7ORcaeU3H0Q7bFmb47AX/hkYmhr4UJxCB5a9VhiYGmcfnSPqeL7BM0rNUVQtdLhgm TPlA== 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=xUNiK3rQd3SVe1FxhguGdaXSvf6lTDnR2DOlBj5j3Dw=; b=gHtn4yVU+WTJ4ud8wjDvHZSjy7nxYTSGu9yNojZ9DK4Yy10qW998ACCN5Q9OvjPScp G0dD3zxNDZ2qhK5/pnpRkE94NwHkVYaaqtTrnqDJDNT+nhnY8TeM6Jua2Y5NDXw8H+eY p1D7umcnMNVGOt+QN0jZGJVkqVjfaSw3aFz6+LqZ7IRxNH0LF1eNui4RvDhmlZ7QziN2 DrxDEsYaPTrSiCr795Z7KKjXHKjRC4bb/B9AwHoqdTZ5Q7u1qww4bCWJTN3um2Y3f4Sb karoE0DM2pWCXBM+IBcBEjL8vcRpg0VVFEqsx/I1A9rycSrulTHKsoHvUBSxzOLYgMd9 16Kg== 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 u1-20020a62d441000000b00591f06fa9d9si15765258pfl.277.2023.02.24.04.12.00; Fri, 24 Feb 2023 04:12:16 -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 S229972AbjBXMHA (ORCPT + 99 others); Fri, 24 Feb 2023 07:07:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbjBXMGl (ORCPT ); Fri, 24 Feb 2023 07:06:41 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1966D671DD for ; Fri, 24 Feb 2023 04:06:28 -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 1pVWq5-0000cQ-Pz; Fri, 24 Feb 2023 13:06:13 +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 1pVWq1-007Azk-O1; Fri, 24 Feb 2023 13:06:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pVWq2-006EYt-6D; Fri, 24 Feb 2023 13:06:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: kernel@pengutronix.de, Evgeniy Polyakov , Crt Mori , Jonathan Cameron , Jean Delvare , Javier Martinez Canillas , linux-kernel@vger.kernel.org Subject: [PATCH 4/9] w1: ds2482: Convert to i2c's .probe_new() Date: Fri, 24 Feb 2023 13:05:55 +0100 Message-Id: <20230224120600.1681685-5-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> References: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1058; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=BzuVYSfwpD9FqWmWpmQJWk/Mwl/NXFiGZ/5Qwvgx0mU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+KgRdtkNQDNgWuRKmbrh+DXfQMjcTk/EPMyGp jfiN54UhIuJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/ioEQAKCRDB/BR4rcrs CdV+B/0aQU9cupvi0J/P9tYJ5xh//u+NoUyh700iUabvg00NxFprJPBgxFW/7Po26ZMc4WThhCv kyES+i34OGGzHEOKSJizsq+7ga1x0WRCbmAnMLLtroM8iojlWk7CR91ByP61Y+tCOXlXWK84o9Y DHxSTc+sGbJa2nHDlxl/3owHgwivqIZywAnHm2NzIjE3VgnQoBMsgfxVY44hvhemSqDl+RH0QTR apaT3dlDiEITXXcVaCi6tBaNWSp2lvXjlxQJaf9FJI7aCgEziK7k9rutBWWoOL3xkncU6xUl7gB 8zRyyMe3XZiqRJBGY0I4dlDzFxAHkT+7sGXK+FoN/w78Byz9 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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?1758714383256411865?= X-GMAIL-MSGID: =?utf-8?q?1758714383256411865?= The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Link: https://lore.kernel.org/lkml/20221118224540.619276-596-uwe@kleine-koenig.org Signed-off-by: Uwe Kleine-König Reviewed-by: Jean Delvare --- drivers/w1/masters/ds2482.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index 62c44616d8a9..3d8b51316bef 100644 --- a/drivers/w1/masters/ds2482.c +++ b/drivers/w1/masters/ds2482.c @@ -442,8 +442,7 @@ static u8 ds2482_w1_set_pullup(void *data, int delay) } -static int ds2482_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int ds2482_probe(struct i2c_client *client) { struct ds2482_data *data; int err = -ENODEV; @@ -553,7 +552,7 @@ static struct i2c_driver ds2482_driver = { .driver = { .name = "ds2482", }, - .probe = ds2482_probe, + .probe_new = ds2482_probe, .remove = ds2482_remove, .id_table = ds2482_id, }; From patchwork Fri Feb 24 12:05:56 2023 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: 61288 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp868774wrd; Fri, 24 Feb 2023 04:11:08 -0800 (PST) X-Google-Smtp-Source: AK7set86KJATv0/fcTweLYZI5MFhIwnn6SNX4E1XZPC6S+hcqHMcaBeV7Zy/1VNQVOx7WFe0Z9+5 X-Received: by 2002:a62:1704:0:b0:5cf:4755:66d9 with SMTP id 4-20020a621704000000b005cf475566d9mr10407014pfx.24.1677240667782; Fri, 24 Feb 2023 04:11:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677240667; cv=none; d=google.com; s=arc-20160816; b=IlwYDzENyz1BzhDOjDwRKwo0oU6o5g0CTAixqj6ahBLDzEL4M+SSKBFin00o7YsGmC BtBofH+KaIyFdvBB4WyoQEOo/MUsppg65/r81yecDbCT4bfasfOIbPu2PQdz79/Bx5e6 X4+YiwJNwcYAuLblpu84kYyxsJtFu9xPXck2v/OKTOiVngtQO+7WrD0GHXAp556p6KZh WvVxYSs/UTYhg3gM2JOMFljA3kG5yd0YwBz6hlrL/JexLxxD7izn8rNxJJowVc7P44gA 4EUhJw7Vfd65VPGgiLdXCBQr6EDJbSo8cF0GQWvC/y43i0sFrntctqvRbBm4HlTUKBqh acLg== 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=5Ttls6suFXIhwz2zpQAZwlt8SHJJ8/scMNMc7MnHz68=; b=gevghzyqy8KFq+SlT+CL815Rh6p//hJMmvnuVrdCVnoYUR6mKNqDYPYgaG+AnNIFSv KRmIQBGShxRe+xXXRRpjfhq8nIoDNRl8eRokWws/LFMIMM6FTV4Y2ocu/e1T2rp+tASg 9s1MoSSoERc3OFBvjXFsYL75ZT2RopEenpE+jrp3jWS4tuLumNK1iJablVpIV0dryc2w VAS4Y5DkSMtm3G4s/429hz9shC6OpzdHfdtAMoIR8oaWpU3iVEu70QQ1Y3gzHoB64A77 jacAeZQshNoCVrzqid1Ci/GIWjmljalnI5x0xPTJ4ocRNcVFHFCqmbm1+XuoBx3LDip0 irNg== 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 t62-20020a638141000000b004fcc0092a06si7976047pgd.663.2023.02.24.04.10.51; Fri, 24 Feb 2023 04:11:07 -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 S230011AbjBXMGh (ORCPT + 99 others); Fri, 24 Feb 2023 07:06:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbjBXMG1 (ORCPT ); Fri, 24 Feb 2023 07:06:27 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E287658C2 for ; Fri, 24 Feb 2023 04:06:21 -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 1pVWq5-0000ck-1X; Fri, 24 Feb 2023 13:06:13 +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 1pVWq2-007Azs-7i; Fri, 24 Feb 2023 13:06:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pVWq2-006EYx-Cv; Fri, 24 Feb 2023 13:06:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: kernel@pengutronix.de, Shunqian Zheng , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Kieran Bingham Subject: [PATCH 5/9] media: i2c: ov5695: convert to i2c's .probe_new() Date: Fri, 24 Feb 2023 13:05:56 +0100 Message-Id: <20230224120600.1681685-6-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> References: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1210; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=siu3f6h9Hr7VMftXLH9Of9pD9INClG+aVvJygDvAciI=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+KgUuVzzJQ/lgJA1HJTlVSb9jZ8IDBZxCv8zA ++zMYKFbPqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/ioFAAKCRDB/BR4rcrs Cf9iCACPvFiFv6Hkzo4LAMaMJ9rXAJObT4N/xkaVjR529Kc8MZ7T64jw2JGjBvd6CUdLeUEdFoR DVGlDHb4B4cFKt7xlszr4UECnguP7OpZailyI+8pPKajoYgscifIaz3IyJkwW3Icr4164NgUwO+ UN1IG9waEIhl47DW0+xBOkHAhsGHnQtn1mjlBsI9SKqhodYkzLtKeRYiKBcglpcgUVLN0L3n/S2 6IMmfrU9cJKu43DigUV5rq76x5uEzWyh8GdlFkOjJVHN7QfBwlE7C3AyyJ088S9hSif2lfuxgbY dFjL65itVfBwQ+GKc1JxQ7kMk6T/adRzP4fw4VWq4LXXkbAO X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.2 required=5.0 tests=BAYES_00,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?1758714310393596928?= X-GMAIL-MSGID: =?utf-8?q?1758714310393596928?= The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/lkml/20221121102705.16092-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Acked-by: Hans Verkuil --- drivers/media/i2c/ov5695.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ov5695.c b/drivers/media/i2c/ov5695.c index 61906fc54e37..b287c28920a6 100644 --- a/drivers/media/i2c/ov5695.c +++ b/drivers/media/i2c/ov5695.c @@ -1267,8 +1267,7 @@ static int ov5695_configure_regulators(struct ov5695 *ov5695) ov5695->supplies); } -static int ov5695_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int ov5695_probe(struct i2c_client *client) { struct device *dev = &client->dev; struct ov5695 *ov5695; @@ -1393,7 +1392,7 @@ static struct i2c_driver ov5695_i2c_driver = { .pm = &ov5695_pm_ops, .of_match_table = of_match_ptr(ov5695_of_match), }, - .probe = &ov5695_probe, + .probe_new = &ov5695_probe, .remove = &ov5695_remove, }; From patchwork Fri Feb 24 12:05:57 2023 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: 61293 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp869490wrd; Fri, 24 Feb 2023 04:12:33 -0800 (PST) X-Google-Smtp-Source: AK7set+cLwFEh8ore8jgjxZ0dy6lFjFithoHVWPci9/P21ps0Hyby0wkRY1Jzz6+KLWKRLIq45ro X-Received: by 2002:a17:90b:390d:b0:236:9eef:e285 with SMTP id ob13-20020a17090b390d00b002369eefe285mr18432023pjb.35.1677240752829; Fri, 24 Feb 2023 04:12:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677240752; cv=none; d=google.com; s=arc-20160816; b=TWB5/TxlpHOhOtIJzKGiUrA/8fhiL8did+FTcqmtp8Mc3KI0iV143tXwEo88gp8SaC TMFQqayZLR6pIebbjX8gsYdwDX8BCIAPYiD6fnxyozhABsQZ4NhrAvXbdrhTr7xUPNwY jHWkwFtHPnRxk8Tk+as1QeChhIwDb7xNNRaEq82fJ0o54wyvVTQUgFhrsmzi7PX/AxOg gqWcVuLB6giXVgBavwOzeZ5rGQcGO3kMUZhTMWA0dSH3Tcsgs8d1OFa/oEgAKlB1G9jv WVQfiX5d0h+gnEH+CCLe1waEsY+QfNsVJZGXDebFxpYfqnChEebEBFzt6chQM977FDsZ 3ohA== 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=xIelhPiEGPQ+Kjo/1DYRSkPRrNKzcVJZJHzHwoxsG0U=; b=VDlRnf5FZ7qzq6sEBc4VTESP2YffZ1GBPCc1EUP0STCssbHX5bQ6jtkuH1Xhq803/Q jLeXu+oMCUVGY2GgNpNDfC97aiTz8aB8UzlwgNbhTEZP4Y5uoxLGFWfKfnpcFlUp4I2i NavkkJQqLzixa3Ice85eDGYV5pBmlmT/8x7dqDOW6hhINsTitZ9AyyrkYa93GpcNg2T6 oTfsVotdu8rbFbpEfuwHbIsqqdFxnd8ybX94U87/2chI08hbbkIj84BCyGflOSbsD6/+ G6GwieHos/HdcyFl5kQIpMyuGLN/3SQ09mucDEpcZNeqrN0p9GDs/vpT5cPBkAJr0S7I beqw== 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 z16-20020a17090ad79000b0022bb380256esi2209961pju.106.2023.02.24.04.12.09; Fri, 24 Feb 2023 04:12:32 -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 S229958AbjBXMGl (ORCPT + 99 others); Fri, 24 Feb 2023 07:06:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229967AbjBXMG1 (ORCPT ); Fri, 24 Feb 2023 07:06:27 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB78B658CF for ; Fri, 24 Feb 2023 04:06:21 -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 1pVWq5-0000cR-1X; Fri, 24 Feb 2023 13:06:13 +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 1pVWq2-007Azo-1R; Fri, 24 Feb 2023 13:06:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pVWq2-006EZ1-KU; Fri, 24 Feb 2023 13:06:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: kernel@pengutronix.de, Shunqian Zheng , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Kieran Bingham Subject: [PATCH 6/9] media: i2c: ov2685: convert to i2c's .probe_new() Date: Fri, 24 Feb 2023 13:05:57 +0100 Message-Id: <20230224120600.1681685-7-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> References: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1206; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=7yv9mXh7sjTNuiY/jTjA3naqJ/nYBGzIZt6uw2F2D8c=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+KgXRLWoSMNc/bOdJhtHrW/tFpDl/midGdlNh EXU3p1BKUOJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/ioFwAKCRDB/BR4rcrs CZbjB/0UsaLUVBgtMCn930I2FROj9MNO1M3bCOISey8f0uxBInDAVmq6o3D6bJ73bPnFyeXEwuf sEv4WmCNjBqeOhLDJiO/gz4SAjK1hXawlmaTiZaRX24hFRTBfrgHa9qj2dlhNJEnUc2otfoljnK WrScX67pVMIVASZXj+49u1rEXFoYQui4RwHsR/TafjSoLBQGSKftFHFr/+fVNlggOW4BjSTwVyS u8REwitycX4UuuKxVQb8iSaKM0I1Ax/RmX26uPeAQZ+EJf9C1+BDi5OUAr3lRgymabA0oOrJe0Q 42IQ2Rx/4+6a5yU5FEGe1cQYCZX9ylgsZ29kaqTRlvTb/RYA X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.2 required=5.0 tests=BAYES_00,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?1758714399889606599?= X-GMAIL-MSGID: =?utf-8?q?1758714399889606599?= The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/lkml/20221121102838.16448-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Acked-by: Hans Verkuil --- drivers/media/i2c/ov2685.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ov2685.c b/drivers/media/i2c/ov2685.c index a3b524f15d89..1c80b121e7d6 100644 --- a/drivers/media/i2c/ov2685.c +++ b/drivers/media/i2c/ov2685.c @@ -707,8 +707,7 @@ static int ov2685_configure_regulators(struct ov2685 *ov2685) ov2685->supplies); } -static int ov2685_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int ov2685_probe(struct i2c_client *client) { struct device *dev = &client->dev; struct ov2685 *ov2685; @@ -830,7 +829,7 @@ static struct i2c_driver ov2685_i2c_driver = { .pm = &ov2685_pm_ops, .of_match_table = of_match_ptr(ov2685_of_match), }, - .probe = &ov2685_probe, + .probe_new = &ov2685_probe, .remove = &ov2685_remove, }; From patchwork Fri Feb 24 12:05:58 2023 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: 61286 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp868687wrd; Fri, 24 Feb 2023 04:10:57 -0800 (PST) X-Google-Smtp-Source: AK7set+REE9wxqcSmdiAjFxffkW3mdxjwtqCVB9W82T5jcsPBjM3HiEGl9eLhH8C6Et5rdhRz5vK X-Received: by 2002:a17:90b:1647:b0:237:461c:b31a with SMTP id il7-20020a17090b164700b00237461cb31amr8859216pjb.32.1677240657287; Fri, 24 Feb 2023 04:10:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677240657; cv=none; d=google.com; s=arc-20160816; b=iBC5FsbwAY36iYLTBD9tFv1CutBSm7rHfF7h5+Jqb7vx8Uym229jwCnTQD+Ha/4A2S kBj8mQgPLeBNXscATIQayhAiSEGHzjcrIhc2N5BhTrRF1IfNmapU6jKUJrDgyi5OeNoU ZzZYzQYih/UdpRLERdi8t/skO//oeutTptJ/KTps95lwJIPOHv5DL5PR2yOvZ4a1Ae3H +Yyh7LJ0f9N3yzpicrrkBK98qS60jx64uaV87fmdetIfCj3WUk3gkh9Z7Y2bvo1klnO2 G6pLQCshN088FCjocmQpk2gX4dKFL+bksj00r6abWRtF/XdZgoncifkvWtUzQk+DuVDk HUBw== 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=wH6ChXuJxxP6+sdtPKH3BtFJbWib+ZAxdJTV9kJtEag=; b=F6dYXTGI8Z39oRlM9NgbdsuoLS3BfElE3r0XyG5SzV2AXmKv8W/AZeaQCGKLlZWk4c s1CQTOSCcwlTkSZRApEpyZRiraIBYjmIV/iHXK1ZtpO639kA1pHJkd59Mt19B8KHwCsQ kySLM37bgXN+1R6HnwYUxerwGc9CH0Rn5Sf7OoUXQH23UV9cEjmoSUuNkS65nhOq6Di+ j7izeQ2zdEBhny+IkYuK+vqYO0C6ZFUWc31GvGYxykLKzFORhvFfdgTeWBdjrHSdf8Md jbglzvom8PiGXdScMWwEHyncNTjDWfHj+3Ak5HC8c9nvaHASYT9purhuvcN05Ct/7WWw jKOQ== 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 k3-20020a170902694300b0019c93e0dce0si9918792plt.254.2023.02.24.04.10.36; Fri, 24 Feb 2023 04:10:57 -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 S229916AbjBXMGU (ORCPT + 99 others); Fri, 24 Feb 2023 07:06:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbjBXMGS (ORCPT ); Fri, 24 Feb 2023 07:06:18 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BE2865332 for ; Fri, 24 Feb 2023 04:06:17 -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 1pVWq4-0000eJ-RL; Fri, 24 Feb 2023 13:06:12 +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 1pVWq2-007B02-SE; Fri, 24 Feb 2023 13:06:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pVWq2-006EZ6-R5; Fri, 24 Feb 2023 13:06:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: kernel@pengutronix.de, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Lee Jones Subject: [PATCH 7/9] i2c: Switch .probe() to not take an id parameter Date: Fri, 24 Feb 2023 13:05:58 +0100 Message-Id: <20230224120600.1681685-8-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> References: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2393; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=+71wz5skFwCbbBFUgxFsdJ/u5S/S5H9btbK8684v6tg=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+KgbOSV8eecJXtOE/I8vpmKMer7YYUfbvTfuh 4KIf3VbH3CJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/ioGwAKCRDB/BR4rcrs Cd/hB/0QzSnaB2XApeqnwGVmjBbn1JKEt8p2M1ZjndmWBEcd6p9MNhUpiTNnfFu4F0hI+E/2Kz/ jdIypObLyi6RXzZFRQkCrVCMd+4v2cLcgzFDbsH3ATwLcDsuSR5qv2gJp8WOnpNlSS3RDem5sUr 0H07bF0xOdXztWWbaWhsJOX1YzNnk74lel98uHQ7RhRk62AAfO2BZ7TvaLImJQ63HvTlmEQ8Jht lomnKcSA+nFKH/PxTX9laKHiCJFS608+fUeEJVfn1xDVFpcajsrWkHlPjfCM5k2KcEjEax3uhFg pvdawi8s275N/SCAav1LQKCmOIzAyXmHG3dNpp8VXNdlzZce X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.2 required=5.0 tests=BAYES_00,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?1758714299243979689?= X-GMAIL-MSGID: =?utf-8?q?1758714299243979689?= Commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type") introduced a new probe callback to convert i2c init routines to not take an i2c_device_id parameter. Now that all in-tree drivers are converted to the temporary .probe_new() callback, .probe() can be modified to match the desired prototype. Now that .probe() and .probe_new() have the same semantic, they can be defined as members of an anonymous union to save some memory and simplify the core code a bit. Signed-off-by: Uwe Kleine-König --- drivers/i2c/i2c-core-base.c | 11 ++--------- include/linux/i2c.h | 14 +++++++++----- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 087e480b624c..1fbe16221085 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -558,15 +558,8 @@ static int i2c_device_probe(struct device *dev) goto err_detach_pm_domain; } - /* - * When there are no more users of probe(), - * rename probe_new to probe. - */ - if (driver->probe_new) - status = driver->probe_new(client); - else if (driver->probe) - status = driver->probe(client, - i2c_match_id(driver->id_table, client)); + if (driver->probe) + status = driver->probe(client); else status = -EINVAL; diff --git a/include/linux/i2c.h b/include/linux/i2c.h index d84e0e99f084..c3e022d53182 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -272,14 +272,18 @@ enum i2c_driver_flags { struct i2c_driver { unsigned int class; + union { /* Standard driver model interfaces */ - int (*probe)(struct i2c_client *client, const struct i2c_device_id *id); + int (*probe)(struct i2c_client *client); + /* + * Legacy callback that was part of a conversion of .probe(). + * Today it has the same semantic as .probe(). Don't use for new + * code. + */ + int (*probe_new)(struct i2c_client *client); + }; void (*remove)(struct i2c_client *client); - /* New driver model interface to aid the seamless removal of the - * current probe()'s, more commonly unused than used second parameter. - */ - int (*probe_new)(struct i2c_client *client); /* driver model interfaces that don't relate to enumeration */ void (*shutdown)(struct i2c_client *client); From patchwork Fri Feb 24 12:05:59 2023 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: 61290 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp868918wrd; Fri, 24 Feb 2023 04:11:23 -0800 (PST) X-Google-Smtp-Source: AK7set9HTW/Z64C8E2wRm1PFCI1VkHIgB1428YtVeY+x7OmvxeBaIfbQgWc8B2GWrh7ItGiirN89 X-Received: by 2002:a05:6a20:a020:b0:cb:db9d:f78d with SMTP id p32-20020a056a20a02000b000cbdb9df78dmr9444933pzj.47.1677240682959; Fri, 24 Feb 2023 04:11:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677240682; cv=none; d=google.com; s=arc-20160816; b=QcrH3VHJrmfMK9lWNJwC0eT4u5zF7FWBoQ5xIMo0psHTiWzRhhKpGPDP85AVFwXXIw qNjzyC3cwkw2wP5kD8NY/4DOalrBGhyfolphonJ7TVSV2hl2b2hgH45zzA+eM72B9dIS FM0Z8cqkyGVo3VsVaWxSs2zAcJ2AYWITBw5+rikRax1MvWElIbv8bVpfD0LUayIbhJhO lbO6J/rsT0CEmovclnZODw6ay40WXyN7fu+0YFjXSYYA3B/PrV4Qo58jwo8ZuSF+fLdv +YeROKeJlnsdhgcwSfzs1yef6yiFGuLM5dOU5BAg2PsCsB7CnlyRzYEd3VZTSUFWxwYD YhpA== 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=pYH4L0aOcHk0Bw8B+LSnu+Ek8vb8ZUgl1xHMy0Cc2Xc=; b=0KVZX0jpJE2KBf5wqcnUZDz/eRjt3N1XtfS9jsmnAGx1GVzNjq7EjUsR3lZs62FR2w o3G/kNxCVmalyQywy3C/dXyJ4ZsQ8uNb/6xsgbxzUVUTAyPMdYtduoFBNYYSB3Tj2OpC paXq0yZV7RTIKQH7WKv5Mtpby1GSylb1Wx1OyRW4sdr77sFmb51HQNTNMRUHdlVV08/M MEuF0CmmW6VqaDMD6VHlnly7/jE4N+JJNb7U/N45fu4Nyzqm4WfF6iEv4F/sk3LZeo3Q tYYiO19vFKjD84zhuEMMEgwaJSaMv/yZeE3RBRJCktXB2f5kpO1dip9v2GAhMIvM2glS he0Q== 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 h191-20020a6383c8000000b00502f49a9b86si4901572pge.635.2023.02.24.04.11.05; Fri, 24 Feb 2023 04:11:22 -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 S229938AbjBXMGf (ORCPT + 99 others); Fri, 24 Feb 2023 07:06:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229951AbjBXMG1 (ORCPT ); Fri, 24 Feb 2023 07:06:27 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B6376533E for ; Fri, 24 Feb 2023 04:06:21 -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 1pVWq5-0000cr-Po; Fri, 24 Feb 2023 13:06:13 +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 1pVWq2-007Azy-Ff; Fri, 24 Feb 2023 13:06:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pVWq3-006EZ9-0k; Fri, 24 Feb 2023 13:06:11 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: kernel@pengutronix.de, Michael Hennerich , Peter Rosin , Guenter Roeck , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/9] i2c: mux: Convert all drivers to new .probe() callback Date: Fri, 24 Feb 2023 13:05:59 +0100 Message-Id: <20230224120600.1681685-9-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> References: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1908; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=HxKNKaD00JoFVk6SwuLkqQlTsGt6ppNbQZJbFgHADZM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+Kge0A/yvIYizp+VRjhKF1BWVxexmJ3/e8od7 5Fk7GMtqJCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/ioHgAKCRDB/BR4rcrs CccACACWHBowhYVb19QXDMNU1/SaBt3C/AeioycgWCTrWlkkJ5ZXruliVYX+6b/jwmGg4QZUXxE pssD7dRtb3mudFvdne6kCBnYo8bFmch7MEnaFCsoK6Kr3AdUqX65lUKja9vPsHoISfgRdsBy4sG hl4dm22sq8TClpBlLGoNVqajAwWG3XAenNX4a55IhPoJhLXTO82SN0Bn1OKSfE1P0gemYuvhtq6 pK4j75pA1NBd0saoNKJ8rjJCzw01+EvU4Anl1ZiFdTHqt9IeGTdnSZqhFnkrGTJhSQL+QwKl3Ds RSsdldPGxh/8Aq4Kg38r2TEE2+CgypfEqMiEukk1PdFwfPOq X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.2 required=5.0 tests=BAYES_00,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?1758714326381670892?= X-GMAIL-MSGID: =?utf-8?q?1758714326381670892?= Now that .probe() was changed not to get the id parameter, drivers can be converted back to that with the eventual goal to drop .probe_new(). Implement that for the i2c mux drivers. Signed-off-by: Uwe Kleine-König Acked-by: Guenter Roeck Acked-by: Peter Rosin --- drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +- drivers/i2c/muxes/i2c-mux-pca9541.c | 2 +- drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/i2c-mux-ltc4306.c index 70835825083f..5a03031519be 100644 --- a/drivers/i2c/muxes/i2c-mux-ltc4306.c +++ b/drivers/i2c/muxes/i2c-mux-ltc4306.c @@ -306,7 +306,7 @@ static struct i2c_driver ltc4306_driver = { .name = "ltc4306", .of_match_table = of_match_ptr(ltc4306_of_match), }, - .probe_new = ltc4306_probe, + .probe = ltc4306_probe, .remove = ltc4306_remove, .id_table = ltc4306_id, }; diff --git a/drivers/i2c/muxes/i2c-mux-pca9541.c b/drivers/i2c/muxes/i2c-mux-pca9541.c index 09d1d9e67e31..ce0fb69249a8 100644 --- a/drivers/i2c/muxes/i2c-mux-pca9541.c +++ b/drivers/i2c/muxes/i2c-mux-pca9541.c @@ -336,7 +336,7 @@ static struct i2c_driver pca9541_driver = { .name = "pca9541", .of_match_table = of_match_ptr(pca9541_of_match), }, - .probe_new = pca9541_probe, + .probe = pca9541_probe, .remove = pca9541_remove, .id_table = pca9541_id, }; diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 3639e6d7304c..0ccee2ae5720 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -554,7 +554,7 @@ static struct i2c_driver pca954x_driver = { .pm = &pca954x_pm, .of_match_table = pca954x_of_match, }, - .probe_new = pca954x_probe, + .probe = pca954x_probe, .remove = pca954x_remove, .id_table = pca954x_id, }; From patchwork Fri Feb 24 12:06:00 2023 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: 61287 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp868722wrd; Fri, 24 Feb 2023 04:11:01 -0800 (PST) X-Google-Smtp-Source: AK7set+DlF6G21ZuxnquVq0jv9YCH9bD711cMPA90+FqkRQqH0BOWio0v8kTyuBDQVkY66n3h4zb X-Received: by 2002:a05:6a20:1610:b0:c0:c429:cbbd with SMTP id l16-20020a056a20161000b000c0c429cbbdmr15964247pzj.6.1677240660993; Fri, 24 Feb 2023 04:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677240660; cv=none; d=google.com; s=arc-20160816; b=r5D/Wk76yokxVyBsPBCp5ez34dFOC0d0t3TDYwNThpEAH5RGEbWQoeOw4HBZ63B2rl VCr39cV3jigPSBP4OvpAWi7EXh9htUvvE45EHW7nxDNNhgMKz7viqbjoAAnTmEceqqK3 dR2M5P199ujGXctBzdD5d9v8EGVjLDa/Gj+oLjpgfSTfC+1yzT4SfJ7N3ah8VJYg/yPi 31hMGp6SHvtwXh34OaW9MD5KSRLxeFQpA3bWIF8Mbrw90og6iCxP0q3Dv4VgU3W9fRy+ 6NXkfNJ1IJc+DoXPoc/jAxUjFk6W3QRZOuyV/Wu1Bc9GiVTJa797YNn5pzE2gUiiLU96 KBsA== 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=NYXpbDynhJOTtSXFS2zpivSMeqAa7OQOT7f0LTtSTk0=; b=S5O8kMMIQnbHNC6FZWnUsLvukQ5mg4l6yCXWc5p0yTyLVOIQOvVzxCGsXCRjLQGgIJ z8HbqkHUtIttBfmV3MTsQcYPX7b55gKkFGzR4eNg0xN4QyX6Smw96vRD4G9pN1Ln3M1C 0wUZZ2ZkDBK7YPz5QrgJb8lgVk44tXDW4yu6XJyQMlpxvhnhzuA3F4d7keNZnQNRvLXV XbKxJvrdzDVAAiweS+/AZdi7cT1JE25vtUC7p3VXGdkxxlHAMHOjAhrWG7RfF+X3QCQO PF1v/zrMTk2rarmRv3BBhjoYLXFEKukV1fbN2RKGaMt7ZxvQW9/IFs8lEsCMES+8cyHV Cy3w== 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 83-20020a630056000000b004fbc4585c48si17973794pga.465.2023.02.24.04.10.43; Fri, 24 Feb 2023 04:11:00 -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 S229941AbjBXMGY (ORCPT + 99 others); Fri, 24 Feb 2023 07:06:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229895AbjBXMGS (ORCPT ); Fri, 24 Feb 2023 07:06:18 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BDC065336 for ; Fri, 24 Feb 2023 04:06:17 -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 1pVWq4-0000eR-TY; Fri, 24 Feb 2023 13:06:12 +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 1pVWq3-007B05-2n; Fri, 24 Feb 2023 13:06:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pVWq3-006EZD-7M; Fri, 24 Feb 2023 13:06:11 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: kernel@pengutronix.de, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 9/9] i2c: Convert drivers to new .probe() callback Date: Fri, 24 Feb 2023 13:06:00 +0100 Message-Id: <20230224120600.1681685-10-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> References: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2320; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=8cexTMV14qFlDVuIXD7jYIZgWUBN5i6f1Hvt7C9j40g=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+KgiKyLe6sNlsuZiFmGT83SWbvpE+de+Dztv1 qKkLYWIl5eJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/ioIgAKCRDB/BR4rcrs CR6qB/94FBVBPf+3KRfvfUbSDM6suyp+EVRroDASxcnN0Z774uBmKRE/pZgYshSSaswCHhKbjMB j1A1xI2hIyKYKptGGUKF7rtcG12KbqTz1GwxWO393ybbdyPsJ8wX4EAlkLIfXbduT3KdJCeO1po pA2EHsbqQmADgwlYC8VwwySVUZ7kwy/8T209s99QyefUW09oiHqi17RXy1hppm/m4FGD/lrZ0Gc /pJ2t1/J2Sdcol6vhr6yiX7vMwp3GZB0N6gSOk7wuS+oS/P8gRWu+0c5HRuQ9FIGlKzDlP2VNKj cQOE7dzelvl5omBeJM3kagwYiDvXrrM9X1cu6lSh5nj974fi X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.2 required=5.0 tests=BAYES_00,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?1758714303169134363?= X-GMAIL-MSGID: =?utf-8?q?1758714303169134363?= Now that .probe() was changed not to get the id parameter, drivers can be converted back to that with the eventual goal to drop .probe_new(). Implement that for the i2c drivers that are part of the i2c core. Signed-off-by: Uwe Kleine-König --- drivers/i2c/i2c-core-base.c | 2 +- drivers/i2c/i2c-slave-eeprom.c | 2 +- drivers/i2c/i2c-slave-testunit.c | 2 +- drivers/i2c/i2c-smbus.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 1fbe16221085..1e38bdaf6ec1 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1018,7 +1018,7 @@ static int dummy_probe(struct i2c_client *client) static struct i2c_driver dummy_driver = { .driver.name = "dummy", - .probe_new = dummy_probe, + .probe = dummy_probe, .id_table = dummy_id, }; diff --git a/drivers/i2c/i2c-slave-eeprom.c b/drivers/i2c/i2c-slave-eeprom.c index 5f25f23c4ff8..5946c0d0aef9 100644 --- a/drivers/i2c/i2c-slave-eeprom.c +++ b/drivers/i2c/i2c-slave-eeprom.c @@ -207,7 +207,7 @@ static struct i2c_driver i2c_slave_eeprom_driver = { .driver = { .name = "i2c-slave-eeprom", }, - .probe_new = i2c_slave_eeprom_probe, + .probe = i2c_slave_eeprom_probe, .remove = i2c_slave_eeprom_remove, .id_table = i2c_slave_eeprom_id, }; diff --git a/drivers/i2c/i2c-slave-testunit.c b/drivers/i2c/i2c-slave-testunit.c index 75ee7ebdb614..a49642bbae4b 100644 --- a/drivers/i2c/i2c-slave-testunit.c +++ b/drivers/i2c/i2c-slave-testunit.c @@ -171,7 +171,7 @@ static struct i2c_driver i2c_slave_testunit_driver = { .driver = { .name = "i2c-slave-testunit", }, - .probe_new = i2c_slave_testunit_probe, + .probe = i2c_slave_testunit_probe, .remove = i2c_slave_testunit_remove, .id_table = i2c_slave_testunit_id, }; diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index cd19546d31fc..138c3f5e0093 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c @@ -169,7 +169,7 @@ static struct i2c_driver smbalert_driver = { .driver = { .name = "smbus_alert", }, - .probe_new = smbalert_probe, + .probe = smbalert_probe, .remove = smbalert_remove, .id_table = smbalert_ids, };