From patchwork Sun Feb 26 22:26:46 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: 61662 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2122953wrd; Sun, 26 Feb 2023 14:29:59 -0800 (PST) X-Google-Smtp-Source: AK7set84t34WPs0wp/n/5GFPi8Zuvfp3BGDm9Lx+MolZLxR8Wmjail65ShUNmDr6w+5/6SwQxonW X-Received: by 2002:a05:6a20:548a:b0:c6:d235:ac8c with SMTP id i10-20020a056a20548a00b000c6d235ac8cmr25608924pzk.4.1677450599047; Sun, 26 Feb 2023 14:29:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677450599; cv=none; d=google.com; s=arc-20160816; b=uFlYgykOAd61GV3+wok+V5YcqsTNHoiRbNBu4+oqWCWHtM0nZw2JgvlOACfUueJDin TqTljQjawNHTPAs3RVGdgcXvu+tjnZM72p+DienhTYdRmd/aBJOVqf9jgL8UyghpEau2 pFWzL3wdUypFDEEoMVDXV9W1+pjcgpppCEYCC4lzJxPI2XZvJIAAp1xlrT9Kg/OY3Y/I 2n4bWVxR/ceDjeeeklDR5dUOnduz3XAqggi9hv42e5DOZ+Ogk6cqZDopu/rd0v/Q7a1W XuqIMuZqpX3lQbiaEa0ZlvRm8s9KJbF+V7//I9K6IwjdwNDrUu2qO6V/KVSgWVg9d49y Y0Vg== 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=0RZYUmlJi06KVcamLGVnUgoacvmcfpfU/2PQ9fqvhdnk8Xi+fobzwFN2+g/4Nq+GFD 4UJtor36e5pBHH5QXa69+5R/nRSeJyHXd+3j0MmIpYQ3a825txbL/cUOWz+0PCsSsDaT cu0n7x3v2izcpg5vJ8rianystK1QFBcrn7A2aHTG8Ygc/7iOz0Y7b3TAFQgekvaIb+8a ynwTL3S+wfhHgICQAmZ+2QqnWk67n4OAT7ZVoikQpTFg73hpC37lkURT1G+f25Mk6Uce V9+kuhQWMA5T/rypa0cWLBx/sjw3iFk35ZDnzJN9YX+xHWu7D5UkTNuNdIXv9OwPg38c dPhA== 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 h27-20020a63575b000000b00502d60448dfsi4994195pgm.283.2023.02.26.14.29.46; Sun, 26 Feb 2023 14:29:59 -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 S229732AbjBZW1U (ORCPT + 99 others); Sun, 26 Feb 2023 17:27:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229733AbjBZW1M (ORCPT ); Sun, 26 Feb 2023 17:27:12 -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 8DB1517175 for ; Sun, 26 Feb 2023 14:27:11 -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 1pWPTw-0000v5-RD; Sun, 26 Feb 2023 23:27:00 +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 1pWPTv-000UbO-ES; Sun, 26 Feb 2023 23:26:59 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pWPTu-000YPf-PA; Sun, 26 Feb 2023 23:26:58 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/9] misc: ad525x_dpot-i2c: Convert to i2c's .probe_new() Date: Sun, 26 Feb 2023 23:26:46 +0100 Message-Id: <20230226222654.1741900-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> References: <20230226222654.1741900-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+9yNWYZ8keqte4NLP53S5uCaMlHf1ql5crSHa pOrSxDbA+KJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/vcjQAKCRDB/BR4rcrs CRNrB/9xJRsxeCe2WhSDMmQXgiUB1D1+t6w6SNAKPQOGWwb2DN5wszUF6TT9xlpet/QX612sXab FaeqgQCm7d6h6zkNBdRhHePJJsL/WyoG0EQ6N1ImvY29MLm6X55wTonCVdjfBl9VxS8Y4bij+Jv DBMNTB7karGOnjav7IURRMuPARTdTv0X+3BP7IDeDdSUHj3s5+UGRNUe3Z/x/6PxapCEZwCqeFU FFKEFMONORXgK9WYhtBckPa+8JPMbqolL9G5Q3ZiG5qaZP7SRC7c868KVlOKFFpTIzJ+jGV0gUp 7LucODTt6Z7nuooZwbWzH5A2/WBpBSh9Tx1VziSi/W5sH/ji 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?1758934439703264700?= X-GMAIL-MSGID: =?utf-8?q?1758934439703264700?= .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 Sun Feb 26 22:26:47 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: 61667 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2124723wrd; Sun, 26 Feb 2023 14:35:21 -0800 (PST) X-Google-Smtp-Source: AK7set/wiFJjdgSrhuUEda23QoP8Q9hkZ1AZXGOYGuSi2RMbpi7II1FL33ankFh7W4rZLKlXrHPX X-Received: by 2002:aa7:9153:0:b0:5f5:313e:49dd with SMTP id 19-20020aa79153000000b005f5313e49ddmr1585635pfi.1.1677450920759; Sun, 26 Feb 2023 14:35:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677450920; cv=none; d=google.com; s=arc-20160816; b=iGW8n1x8vjaO/Oeu0lLcWtmeU0k9ZUIm6Q+WXO0w5yKdDtjN5z2Dg7Qtdl1baxFLl5 p7GuyiYseCyJTEeK0ni3J+2M/sPeyzNfVbCWiw2dv2y1hzVgYGddlefXWAf09Yq5WI5Q Y8wdtAuzjMp9kta9JpY6obZgZlEFJUKFGef3hKOtU9eq3+BdIFXesn8RqpDt0L3tfJGZ ysWnuwFeUIeymibAJ2Gag99E3PbZteK0je/5KdFHU4NA1QVTrFp/5H/mtEiVPCKGBwKS OMQToUqgvU9rkITqMwcQhrm5dEzfeMSpAyernbMwERJTL8POglM6bg+4PjV1L7Zecx4l Khnw== 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=0skBgyuOrW3sWLas5M2lgzhYVlZrLphmdm0oUEvoFSTz1v1t1BOSxe1mfxK5/zErEf MzfvyUr94siK/ra5B0RLnNGKeYxmqI/FWOsr+VmCpo5ljb8bs/+KLMsD/bQw0BqhtV7j uWiSxq71SfeibjRWkIS2crMVQNf9JVrNxPTJG1ep4F1uH0bAq5UZ1dTjkZP1JfuoGjX3 +fTy1wBTgcslqoERh59UtLYsD4uP6goMRINKxuB3E0v1xCdTU+Sj9i2WLPYKXHliI0Zi rRtP+M6BTg5J9mIa7Nf1aE2HcDCdNDqmOQ+OeQwQxj7SWw40aHpfGlIMrbf50NQyNzCy CSAA== 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 h27-20020a63575b000000b00502d60448dfsi4994195pgm.283.2023.02.26.14.35.07; Sun, 26 Feb 2023 14:35:20 -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 S229790AbjBZW1h (ORCPT + 99 others); Sun, 26 Feb 2023 17:27:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229733AbjBZW1c (ORCPT ); Sun, 26 Feb 2023 17:27:32 -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 BA52B199F1 for ; Sun, 26 Feb 2023 14:27: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 1pWPU0-0000v8-AW; Sun, 26 Feb 2023 23:27:04 +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 1pWPTw-000Uba-C8; Sun, 26 Feb 2023 23:27:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pWPTv-000YPi-0o; Sun, 26 Feb 2023 23:26:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, 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 v2 2/9] mtd: maps: pismo: Convert to i2c's .probe_new() Date: Sun, 26 Feb 2023 23:26:47 +0100 Message-Id: <20230226222654.1741900-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> References: <20230226222654.1741900-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+9yRBq230DjtR0OENDTBnqh3jGbv7HQJOiXLd 6y9xrOx10OJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/vckQAKCRDB/BR4rcrs CTA9B/44dD9HbqxPEM1quEbcSClDz0+khag7g3WMiBZYqp0NQUhHoEzVubo0MNIW3eQntOL/jEr BUqYwmnu01MOnvQlonYfDZ9KYnGGSk8yeeoofU6PFw0HPe77Lax0squYs1gYyAAkO6x5MWKEdin 5lH5BwfSpcGaBD8JIj+/CkOUgD/9LCdlw7nhaRI+CaAZEUXGQELlHXUUgh7lUll+g5RfvmfNQJ2 OyWSx7t6ao355A1fdCMEB1f01euonq+Xqw3JhVxOA57vUxBj1qHaOACp0rDCN3TOGMITIj8w4vg aRiaTITHPGxGTNG0hBZmjBmtGs+/bL20DV3Bvq6rMUlq5291 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?1758934776466512392?= X-GMAIL-MSGID: =?utf-8?q?1758934776466512392?= 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 Sun Feb 26 22:26:48 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: 61663 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2123392wrd; Sun, 26 Feb 2023 14:31:18 -0800 (PST) X-Google-Smtp-Source: AK7set95s0N/cisOaAZbSfMJ2N1891yeUTy7WGDmBoLItMglc7h6rSFpmOdMBlJzaf8HdnHH0RPg X-Received: by 2002:a05:6a20:5484:b0:bc:b3fa:ee70 with SMTP id i4-20020a056a20548400b000bcb3faee70mr28987763pzk.0.1677450678403; Sun, 26 Feb 2023 14:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677450678; cv=none; d=google.com; s=arc-20160816; b=kz9IwMQNzECufSBNq9nQhTg9hRytt0+7xVbIRR5P0fgfB+KA/U1l9itX2sveya0M68 Cp3SMHidurJZ44qGLMyuQiYugHZ42u09vl2QVZ0f7H6rHv8HAostaNDoZ+bYmgL8I306 CvJ8PchTIIi7XDec5mvqlBHq0Sgj0AIuVx5TkyBVwneiyrl2HpG9XCc2VSpXg0ZsiIGM iJ/Lt+3UDOdWo7afslWO3b2L2TI4HIjfQB5TfdlRg8NYP1EJ+h7oh/AAlzBKka+OOFld 7jODikAj6R0HA+dxZl5pvie9pWOF3N9nDBYAx4Be/IU3ZRvHSJE0dPGCiLz85FjZlNyx oJfg== 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=nYFDeWue4WupohhF98aZVh+m1vYIaaNAuwwvVlnUr4A=; b=enfSFt0CMRGocIipa/XDdUSFQ7/TDm1pI5w5Z978s0ZLB5OkscQjK1TDUR10bztIQO uL4dPFEsZWQ1Nw1n2cky59ckqM9AdkU4fYJ6wEuvJ1SY7sWBgVuqF1TyvPdvPSfAtuJF WRvwKNnjuIeAhL+qKpR6DCfxIFnXLJoyl13aUCGz8pMad1CU+sb1grq+r/gz5OyI7U/k b3r2n5XGTNiigxT3amJVDiy7GEW5ARYcwhzfs80AVhwc/QDTlqbKtayNaMEnV6GFm6rI LX46L4vTgLJ04UQWUoYBEVF5cLlprGk8p0IaFv9x+YABFoKPlMTmTU3EVadv/A3p1XeL 3fdg== 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 h27-20020a63575b000000b00502d60448dfsi4994195pgm.283.2023.02.26.14.31.05; Sun, 26 Feb 2023 14:31:18 -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 S229731AbjBZW1Y (ORCPT + 99 others); Sun, 26 Feb 2023 17:27:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbjBZW1U (ORCPT ); Sun, 26 Feb 2023 17:27: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 C9DB4193DF for ; Sun, 26 Feb 2023 14:27: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 1pWPTx-0000v7-0N; Sun, 26 Feb 2023 23:27:01 +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 1pWPTw-000UbY-AW; Sun, 26 Feb 2023 23:27:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pWPTv-000YPl-7I; Sun, 26 Feb 2023 23:26:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/9] serial: sc16is7xx: Convert to i2c's .probe_new() Date: Sun, 26 Feb 2023 23:26:48 +0100 Message-Id: <20230226222654.1741900-4-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> References: <20230226222654.1741900-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=D79Vaqn/zOmfQLHCMMajfRylVVdeG/UEyphy/fGba08=; b=owGbwMvMwMV48I9IxdpTbzgZT6slMST/vjNFc4/+HfaadnbxdGX/E3FxhXydzV39Uf+1P/Idz emZeHlGJ6MxCwMjF4OsmCJLXZGW2ASJNf/tSpZwwwxiZQKZwsDFKQATSb3H/lfWh4NpGXNOfW4u R78Ui3ceL6fK2Q39y3rafK69l9jr6dp1eOa5h+78jy29tkVVaut9et3P/G3yQYeZ9xKKxS2i3G7 Ke6ybG5t0ajp3id27iZGfirfW+l67xyk9pXBapOqU/OTso953Qmp05y3KS9YRvx+fEefOun/dgx /JvqpXrKcvS+/8+TsocoHJP0mFGW7ia7bMt//cskc1M8Wjrunvooyr6TKvag12rKzgMNZ5v/pv2 v0ZLi9N1mQxNzx2Cs1Z81Wvd1ntvz2BL87X1hY+9y9XjXGfEvlfsXArA/v8DNHdKiY8n96EVv4J uNhwfk9Ud54Rz91i7ZdrFFbZdsXe35JTJnitf1vPw1UXAQ== 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?1758934522511434051?= X-GMAIL-MSGID: =?utf-8?q?1758934522511434051?= .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 29c94be09159..abad091baeea 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1666,9 +1666,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; @@ -1709,7 +1709,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 Sun Feb 26 22:26:49 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: 61668 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2125516wrd; Sun, 26 Feb 2023 14:37:34 -0800 (PST) X-Google-Smtp-Source: AK7set/4kDh/G/tuR1EgthJBU+0BoGON/Ujzsaeh0EHfB4UVrrbDA+aSeDUDJ95sExcTWzcSOio7 X-Received: by 2002:a05:6a20:6918:b0:cb:7cc4:3ddb with SMTP id q24-20020a056a20691800b000cb7cc43ddbmr23319649pzj.3.1677451054286; Sun, 26 Feb 2023 14:37:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677451054; cv=none; d=google.com; s=arc-20160816; b=iCEGxmgNJg3O0mBCAWO4cQMKp79ESnx9lfkAeQhSHOPE00zI/IpHR99onUqZQZ0+l+ 1GFjqE2rzLAqIY5pyAQGRJBc9xfSHDtdiK915QUu5+fRtRqiyOUtTiBCTFzmga2Hs7s1 GCJb8mDbjvlfKblCdIymMyuOtcLmvU0EwMNjEkRdTJ9AheEz2FWw+3At4u0VmDNaiAUI Otonir/+HWPH6WB8qv3hh6/sbr9PbEXAlqpm3B4IOzNrQB14HpEoqSYbvlnTpkBIDJpC 6d/XaK3T4VIIVmwPnHXOCnznWdJQqZJ8kpIMHoUAi6SN8ITlM44iNEpUojRJm4nS13p0 X6uQ== 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=vdZun96IIJxunwWqdbj47h2hOlGwRzJJBFUhyRlE185qXY9hePOhq8A94KQkI284F1 UGQ4/NeruFpQTneFkvwxgpC4pmKyKjA1e+E5hS/jaq+kWX1s9YegrHlpjM2UYSz3+rSJ n9rItUldc9nY6cga8CdowD9kjDDg36LELwV3iLMIxwG7u4qNNJ6JzLsb2tyVe1LwpnFD eb3fsKiV6lL0oQgSBddZd0ojv26TV/2ZKqZJtBBNOm13NrdSceREKUHhe+bGICBQ7/NQ KjFxHgFcrdF+oPIgZ9bALP893wpijl0apB9EypXci4NWV/gXGz+iUDQ474GJsy4x7fEL qTpg== 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 h27-20020a63575b000000b00502d60448dfsi4994195pgm.283.2023.02.26.14.37.21; Sun, 26 Feb 2023 14:37:34 -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 S229542AbjBZW15 (ORCPT + 99 others); Sun, 26 Feb 2023 17:27:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbjBZW14 (ORCPT ); Sun, 26 Feb 2023 17:27:56 -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 DD6A01ABFD for ; Sun, 26 Feb 2023 14:27: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 1pWPTz-0000v6-O7; Sun, 26 Feb 2023 23:27:03 +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 1pWPTw-000UbU-3O; Sun, 26 Feb 2023 23:27:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pWPTv-000YPp-Dt; Sun, 26 Feb 2023 23:26:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Evgeniy Polyakov , Crt Mori , Jonathan Cameron , Jean Delvare , Javier Martinez Canillas , linux-kernel@vger.kernel.org Subject: [PATCH v2 4/9] w1: ds2482: Convert to i2c's .probe_new() Date: Sun, 26 Feb 2023 23:26:49 +0100 Message-Id: <20230226222654.1741900-5-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> References: <20230226222654.1741900-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+9yYdtkNQDNgWuRKmbrh+DXfQMjcTk/EPMyGp jfiN54UhIuJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/vcmAAKCRDB/BR4rcrs CS+nB/9yDXKU44xkfTpIuL+tSEKpsPg7fkuVl5RMKsJYAn34MtwpYVyVOQ89YlNGl2PGUsx62/t q5x16dW3Zoy2evDC0kMuPpmEY/3my1sAqFCUq2CdBWUmpGBq/DgEa4swjvUCIAKIsY3GQI06FVa m29jxO5uhvL9wBSjMjdjf5IEzpy0zQstzBCrRG0iFgcREKL5rClwRiaNryoI2/EEXnMcrqEuOZl lxSNeDggFcR7q1U25b0ocJk4d+/7jhhMlmFGtC98Ut1zX9TpZIJtn0HiFgl+FY4Q/m24ZePDmiT B4KXLOPZ8HQQXRR6ihnkpg5CDvpr636UlE9xCFxGW8NHeiGG 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?1758934916566499307?= X-GMAIL-MSGID: =?utf-8?q?1758934916566499307?= 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 --- 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 Sun Feb 26 22:26:50 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: 61666 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2124442wrd; Sun, 26 Feb 2023 14:34:27 -0800 (PST) X-Google-Smtp-Source: AK7set902av7PSAtZB+9ipg7TlnIKMzrNsdrQnoh3UpEZWatBmC6CH/m2IbIL+fJkUY7UqPcQp/V X-Received: by 2002:a05:6a21:7891:b0:c0:2875:9e8c with SMTP id bf17-20020a056a21789100b000c028759e8cmr26780095pzc.1.1677450867264; Sun, 26 Feb 2023 14:34:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677450867; cv=none; d=google.com; s=arc-20160816; b=xv7IiIMlnpDyys7svkIsfwpiUrz5lGz5L5V8W6+Vkwke1Uaeg4CfujgM5Bkpb3aq6T PE0DXkFrltjE33h+qKqUGRsFSEXjDSBvvg+1fXRKCkNGvkDSmug1FPrP4fvKDf+rPsi/ SCvMCrYzvOfwmlILbfRKrBVoQJqUAyw99R5ON/ytQe434SuJMS6wQb0ODrLksL9cevoF EJWFHU68GVv/9FYhYpl7vpOaMtndSXHutLTgqCL7vhHi3GDjLFHDPkRy/yrB65IDd2dQ PrUOpGP4Qy2DWh4Fe+aCm9DlRTI6wO73aHYgI4tsRxImc/q0q4slQw9XBR3GoX611n9H vdcQ== 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=jWKe50dI3fItQKd15J97BizI1Dk60c6qVdAKx1yrsJQ=; b=IQBmOlpY0g1p6b5OrsxCQZuoYV3PEbM86aDDxcNK8sGa4U6BBJ+zMO1WaUuHJbY0ep yeOM6EkCJftRMRl+p4fzj3sNPSMQbgkoNjHF+bViD12rV9/qvQAC9VlRi9llHnhGFJzd EYgxykzc8p1n6PJz/T99BhocKpFG3nQK51NJ6YX0EGsdRc0L8Ko9TWWiaSbxycJOrX8a im/o1gw+hCL8bKg5I4PMGdRziVQxbpVLKOpxrbcVNwrefnEio+jqBT8+E18zITX6Tv9E 5tcuB6YGbOgri1W7EH5v6DRIfUGclVHw4d4meXU35oOUYHaTvhp5hb1SHJzR3/xuhtA4 wzXQ== 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 b7-20020a656687000000b004fbd2fbbe11si5056933pgw.12.2023.02.26.14.34.14; Sun, 26 Feb 2023 14:34:27 -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 S229755AbjBZW1f (ORCPT + 99 others); Sun, 26 Feb 2023 17:27:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbjBZW1W (ORCPT ); Sun, 26 Feb 2023 17:27:22 -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 56CD61816A for ; Sun, 26 Feb 2023 14:27:19 -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 1pWPU0-0000v9-TX; Sun, 26 Feb 2023 23:27:04 +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 1pWPTw-000Ubf-F9; Sun, 26 Feb 2023 23:27:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pWPTv-000YPt-N7; Sun, 26 Feb 2023 23:26:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Shunqian Zheng , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Kieran Bingham , Hans Verkuil Subject: [PATCH v2 5/9] media: i2c: ov5695: convert to i2c's .probe_new() Date: Sun, 26 Feb 2023 23:26:50 +0100 Message-Id: <20230226222654.1741900-6-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> References: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1261; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=P9qlg6QBcbggriS7J+1m7zrOxMS2j89d2svSwnDX9a8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+9yb9qyVLGhCTDmI4MWGPl3GHVa1A8vwL+TYH yt/aAeTiMOJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/vcmwAKCRDB/BR4rcrs CZ6KB/9m76K8RmvWuTkH3BxbfaNA6EyB4Ih+n5yutyJch+tFjH/SHeovzTFfP5wnYW66D4IyW01 AjZ4g2d7U1uBVkFJ8JCkMZb5KusCiNPYqNGEYEdSKgM8CqjsmWG9GlFVOA8B5p1pzEtR2XOZ91H mlwCmNOnGD2FPs44YFzxOGsnV88ZHmDqrBA8mD1XvR5bNQy6wpyk7UdX6EnTWZKXJ9KxxtSTE6f m7lNpjJq1m8artykh+xCPBHDl2ywuV1kPPerc9UVPboJXabgsPCYU4et/0h4mdPcnjr++Zcte3P kdijJmSG6BjGwYZEcVkjENSt5Nz2V4Om0abrGrdQkZN2BeLB 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?1758934720832359506?= X-GMAIL-MSGID: =?utf-8?q?1758934720832359506?= The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Reviewed-by: Kieran Bingham Acked-by: Hans Verkuil Link: https://lore.kernel.org/lkml/20221121102705.16092-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König --- 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 Sun Feb 26 22:26:51 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: 61664 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2124335wrd; Sun, 26 Feb 2023 14:34:08 -0800 (PST) X-Google-Smtp-Source: AK7set+69As5oms59PjUwWBmhHP60lno8b5nU782R1nbCezp3KG6qnpC5kKtVAAAXihFGF3CMzbB X-Received: by 2002:a05:6a20:7f9c:b0:cc:4118:65c4 with SMTP id d28-20020a056a207f9c00b000cc411865c4mr16340050pzj.5.1677450847930; Sun, 26 Feb 2023 14:34:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677450847; cv=none; d=google.com; s=arc-20160816; b=PbRfJSFDyfKAipYZG8Y3N9E0khmkOpdjphoXCGJKV7vNiz6CXiM7OwNS5z4W0hPB07 a1xRtTaHYOCYC7GATjNN1scWlSQAX89cEPi+Jjo1PV7C739ZS8RVfpewVdCEWFe3OcLl DzSCMCSJDkMO4IEsLRAtLm4ZyyWJqD5dFC+bGhjG/jOgrQVtzBSk1M0JMaw1z3kicGX/ +vX6JZFHvV2zhrCYD6dh/kBmcTQWfgiBRWz8WlyvSjJum68R/xwmB2nGRNX2eox0JrS8 DfaOYFXti93XaGImzkTNzBIVNDbooyNSSBGKn1fLobCY4/5CVJhKs+sGn+vMtM3r1jgJ 100Q== 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=rFOY455cXaXRnqKA7UwxM4OQSRIAZnpZnXwK/Qt5bhc=; b=pnr7OMjqLin/+pxE4WFuXTSrmstFITTFsp8Es7WaaV+iwz5GEKiKviMyWSy3x+9ayS 4otqbPov3GCY3oCgbJHAS5BP8TNadipMCGD2IaGN7KrdFSf5PGzN1Tg/p7SCT2vEhR9f Qe0D/8+I8kM/0CiZd3MTjKgZn8mwIk8qDOlp3FZWL2/H8asGNJSi7eja/7Ld7haXmHgg +SJ1kq1mtLGz8Kf/xH0AhbVAWo2TN8FOTMomPIXJIYrtgQiaXBgkAP1XavXprb95hAl9 6c4bxQHrsT+C7DM/JN4CUvEzbvPnIIIok40Or3cC51ODzK4VoV8EAaFQiBoe8osPuilc Z4XA== 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 h27-20020a63575b000000b00502d60448dfsi4994195pgm.283.2023.02.26.14.33.54; Sun, 26 Feb 2023 14:34: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 S229780AbjBZW11 (ORCPT + 99 others); Sun, 26 Feb 2023 17:27:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbjBZW1U (ORCPT ); Sun, 26 Feb 2023 17:27: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 554F9166EF for ; Sun, 26 Feb 2023 14:27: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 1pWPU0-0000vF-TW; Sun, 26 Feb 2023 23:27:04 +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 1pWPTw-000Ubj-Md; Sun, 26 Feb 2023 23:27:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pWPTv-000YPw-Ur; Sun, 26 Feb 2023 23:26:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Shunqian Zheng , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Kieran Bingham , Hans Verkuil Subject: [PATCH v2 6/9] media: i2c: ov2685: convert to i2c's .probe_new() Date: Sun, 26 Feb 2023 23:26:51 +0100 Message-Id: <20230226222654.1741900-7-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> References: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1257; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=aBqkyIGCTm2IJnMlU0lx7lJGZseSGeJbsq4rjy3NHT0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+9yf+EEOctTufsZ+AVtrS5V/hQ02iCoxI9sHo LwqE3N/1QSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/vcnwAKCRDB/BR4rcrs CT8xB/9dDdrDQ4k0V2v9HzhpOFt99r0hvaW1wSgeqZv2Ei6woQkuEu0EtV/O85Q5qZkgwZUfNjn wOz4/J7CVT5g4ueVCLtLRqroKOLid+dl5IQKz3ZSL3mq+pINsATKrDj9z2pwU4glj2cZB4ZWTM7 68Rqxgpl7+RRLhV4BNF9ulFoizHgzxWG/2mL4DyqkufK/HlbC2+JeWyFWSmAVQsp9vma+c8Sa5q i7OBfZUCoipmqUdvfDBag5SGoqlQVj60WXZf4dAButl7TP9BaDiZLZDh7L3Nc+EXTfadJ796kdt bB9cnJPJiKUtH0TyFRb8+HUJdGI57Nz1nWmyWeF4MQGtqdap 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?1758934700124691764?= X-GMAIL-MSGID: =?utf-8?q?1758934700124691764?= The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Reviewed-by: Kieran Bingham Acked-by: Hans Verkuil Link: https://lore.kernel.org/lkml/20221121102838.16448-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König --- 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 Sun Feb 26 22:26: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: 61660 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2122539wrd; Sun, 26 Feb 2023 14:28:31 -0800 (PST) X-Google-Smtp-Source: AK7set8JSasAFHViQf/QyXneZFT9tF722KCTDL9dXldcNluZxdxffTTPqVp1bje6UvGvsuZzsdA3 X-Received: by 2002:a05:6a00:1d20:b0:5e4:f141:568b with SMTP id a32-20020a056a001d2000b005e4f141568bmr8195126pfx.3.1677450510977; Sun, 26 Feb 2023 14:28:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677450510; cv=none; d=google.com; s=arc-20160816; b=mn6g+Y0gRWOzHIPFUZVK/Z2ku5DmsE6jQ5L8F4GORL+24PmQJys+MStZpaYXK2xoDE dfzmxSPXP0AqotPuzRGqKQAakMcQ+Qlo+R3HyS7F1c3UJA8Txlt4ySGD0UcLVLNV/h1o CGHkgjKFGgPr62zkkps0p9xHxwZqW835+6COYsrmerk9ng3q0AC/PCnsLsUh6fbBjypL /FEQnAPS4MvO4XECJbB8+cmmsCs7HFzh+ooDUoq1AutlBJpWXxDgTFWi770X6boYHMAL 4zg2InXv4CvfGvbHuGZ29jzs6wylFHMihZsiQu4MyKiU4S/uuIXYqWiXQVAHl4Xg6V6M frRA== 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=ZjeW12aN7RWeW/N1hG7lRr48XB1GMIh3F3WBF44+Zn4=; b=lTluO/qeDvHjuu9pq/+F5jwqqEmwz330Ms1a6e3BObpoyfoX6AjP63u+swl0TM3LuH u6AavyxOjpYtT0mQGeEv74GUwH1uTXVW52/DlcfINCmpUpNFcs5NM+c8q1nF6iXLozC0 aM99FlnzkQ2dvXDt0XlYrYTlGqZFoLBC5WnV4W271leEmSdMJ8m1kCSE9j9O5GnspKKD uAxCcfxjoW9cMMwigAi58FEOvKfeZD0eTe9qySSlHOSVt/+wuuxHW3RcZAwScMBhBrZR i8JlLq2KGaK2OefCCazw36u7nEy8SghBOEHxWH62ZMZZSZueON9qcL3euZE9hnvKjO5r qszA== 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 a7-20020a621a07000000b00577e14babaesi5324029pfa.4.2023.02.26.14.28.18; Sun, 26 Feb 2023 14:28:30 -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 S229721AbjBZW1I (ORCPT + 99 others); Sun, 26 Feb 2023 17:27:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbjBZW1H (ORCPT ); Sun, 26 Feb 2023 17:27:07 -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 69AC112589 for ; Sun, 26 Feb 2023 14:27: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 1pWPTx-0000vL-SG; Sun, 26 Feb 2023 23:27:01 +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 1pWPTx-000Ubo-0c; Sun, 26 Feb 2023 23:27:01 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pWPTw-000YPz-4i; Sun, 26 Feb 2023 23:27:00 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Lee Jones Subject: [PATCH v2 7/9] i2c: Switch .probe() to not take an id parameter Date: Sun, 26 Feb 2023 23:26:52 +0100 Message-Id: <20230226222654.1741900-8-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> References: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2954; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=CGs1waPXyH+zFPqAHQV2oj9jU9r+cYpTC2JoFW5f31U=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+9yilC3ENzyV5owVcV5oOynKUfMYW0YAtEKlU TkXAAfjYieJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/vcogAKCRDB/BR4rcrs CVZ6CACGOi8BL9+KAudAYKf3+k3pjp57A90O/bpEst7yIi23GU+DH1xQQu7zxu+3c7Ru/AyizHn oB9IfuaJP8WXIz1Jmte+i82ukcFz1oGMQTdT5ibRqUH4SpjH/0pbS/W8UCeeJRN+FWsSccJ3ApH X7HRD+Awij2JGyDDo+zrBVWXDTzg0nRIw1/kaG/HR5wj8NWprmAwsLqRBz4OE7hcUxC6igKCW/I vtn2FWOQZlWeVcfmGIf8ezNPxWUdXBbQs5TNYwEdwYR1fFvzX+jnN4yp7A/M8wn12P0unF3/EjD 5qqJ7ptN9U89PgxOF5k/TsanlVwuJYGldRTUUxfibV2JptG6 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?1758934347356504278?= X-GMAIL-MSGID: =?utf-8?q?1758934347356504278?= 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 | 18 +++++++++++------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index cb5fa971d67e..63253e2b2c1f 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -561,15 +561,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 500404d85141..5ba89663ea86 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -236,8 +236,8 @@ enum i2c_driver_flags { /** * struct i2c_driver - represent an I2C device driver * @class: What kind of i2c device we instantiate (for detect) - * @probe: Callback for device binding - soon to be deprecated - * @probe_new: New callback for device binding + * @probe: Callback for device binding + * @probe_new: Transitional callback for device binding - do not use * @remove: Callback for device unbinding * @shutdown: Callback for device shutdown * @alert: Alert callback, for example for the SMBus alert protocol @@ -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 Sun Feb 26 22:26: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: 61665 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2124419wrd; Sun, 26 Feb 2023 14:34:23 -0800 (PST) X-Google-Smtp-Source: AK7set8LAEr5e/ynOCi1HmPDeHA3f9qULuZQI8lYPp2WQe/yi2sFCVB0fcgTAsIA12sEZd0R4vQl X-Received: by 2002:a17:90b:148a:b0:233:6d76:27b7 with SMTP id js10-20020a17090b148a00b002336d7627b7mr19595673pjb.3.1677450863461; Sun, 26 Feb 2023 14:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677450863; cv=none; d=google.com; s=arc-20160816; b=nqu7H61tR3bUXQNJ1A4G93vtDCuYJ91ZtFGXO8Fi3JYZ6TEFnEmltZK5vHSkTk8gE4 Ssgkc/n+3W7IFA7G3epJS3gFsmkTl6mSi0n2WIt+HW3ioeV9qZEUoQN+gTyAQ0fRgeJM 3IYCgF+Rjb5FVztjIcvuyeu0FehEwllLtO3uakPnIG9oKwnDTmtCUsL1BEaCZKgNfXRJ WU1HV/Y4YDzUC0X5WI/0tzcqpSvmshLHkIHNs6hQ8A+ReXiXICsenXp5vz0y2/eHmYTx UZ0RmuaFoW/FfvHT/4DAUc2ArIDzi7qXnltXfglx+R4LqclvqVooz6hN3gz1OcnnQ/Zr 6M0A== 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=8QOD/KN5QriDih5rN4Wn1de9xhHNKz05Q0TpvF0okMs=; b=PF8W5xtmSqhW6JHTIy4T2XlFGkKhYgEt3LmfXEAcMe4tnoQRS4hRQrasQB99i0KS/C ClqW1mGBZnUu3w0ZU9TcHnMk1kFSF0oUlJOcwDUwp19RJ6h9KQxYA9vhbeNQlSowlku5 fkHWa28EPNkJ6wJhWbLZwxBfyV6ppYlPjRIPBVM737neN2ZXOuf51B4urQieU1S8ytI1 7Cs6OTeNqbVflaJE+yvu+T3ojXrn/ik3ru9PAAZ7vDZGiia82T8maMpGyreHTiHm42dw Ed2U6tDye3UlhuCSKPAbArhR+5VY2kAMkHKiUgikAdB6VOEKZj1cik6Ph97sFlH7XR0c RaXA== 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 t2-20020a17090a5d8200b00233cee16612si653151pji.151.2023.02.26.14.34.11; Sun, 26 Feb 2023 14:34:23 -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 S229742AbjBZW1d (ORCPT + 99 others); Sun, 26 Feb 2023 17:27:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229741AbjBZW1V (ORCPT ); Sun, 26 Feb 2023 17:27:21 -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 D55301969F for ; Sun, 26 Feb 2023 14:27: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 1pWPTz-0000vN-Su; Sun, 26 Feb 2023 23:27:03 +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 1pWPTx-000Ubv-CF; Sun, 26 Feb 2023 23:27:01 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pWPTw-000YQ3-Bw; Sun, 26 Feb 2023 23:27:00 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Michael Hennerich , Peter Rosin , Guenter Roeck , linux-kernel@vger.kernel.org Subject: [PATCH v2 8/9] i2c: mux: Convert all drivers to new .probe() callback Date: Sun, 26 Feb 2023 23:26:53 +0100 Message-Id: <20230226222654.1741900-9-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> References: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1995; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=jcUywLQFp8WtlmqcLVBYp45E4YG+FnwWrSDjDBieEic=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+9ymaExC7GrV4YWI4fas9uJsKebM3ytL19/1y zQlRoHlIQGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/vcpgAKCRDB/BR4rcrs CbldB/0XJH0RfzmRbquiKKMm85T/XUj3VUvyKhEN4y4/ZHTekqEdaVIixBD0Y5wU5NCS57abnbx 0Sh1xi2uf0o0sMsGKcLao+qJF5YjHon8MzWUlPX7b4XXD4mTZg9MAtolZ0mkfFoOmjah7KKFhP3 QRo6j/31m9kFkDtpZGIjdrhboOE5bi2nojkTemEMTLhUa4Ps6q25l4Pf6aR53AxOSS7S4l/ul2p hmqbz60tN9y6P4HDIAHcKxMoCW6NX+y3pZTN4qojo1bR3evVPQIC/vTTRW98Sq6BsmcFM8aDYeb FRhQoXGjwwbG1gGB4XOIk0XiE6EJX2zLIs7IsqZkh9belYuX 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?1758934716559948362?= X-GMAIL-MSGID: =?utf-8?q?1758934716559948362?= 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. Acked-by: Guenter Roeck Acked-by: Peter Rosin Signed-off-by: Uwe Kleine-König --- 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 Sun Feb 26 22:26: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: 61661 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2122902wrd; Sun, 26 Feb 2023 14:29:49 -0800 (PST) X-Google-Smtp-Source: AK7set/ZliHicDgSpAUhwMz9ismq1EpoX0FMFWBcFyWPpiAdrnrXQYQjWx9BuXpeHqF1Y7qHcQK8 X-Received: by 2002:a17:90a:ce13:b0:236:7144:669f with SMTP id f19-20020a17090ace1300b002367144669fmr23557229pju.2.1677450589464; Sun, 26 Feb 2023 14:29:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677450589; cv=none; d=google.com; s=arc-20160816; b=H8Fg45wPiGjwSuUJQxAUMcPYFR1yZH534B5NE3IUEhgRYgrAZ+v2xoU/Bl9xM7GYyT 7grSoeSXa8yP7zRrncwaXdlFYvhIAWirFCHWqXLjEnwfEYYJBtKuUyfsZkNXB7aJbh98 ffSbp1vUlUiVFf7sycRPIcSTVzU88mc2QaZZsoBIxsI8vgmOkBcejyqE/AqO9P4LOIZV fJOfCAZHXlA5S33q8emrVCNr40hABcZu50RMZE0sv/+fJG+NRUE/U/o4MGuT31/TGaT0 leT8jfEGYatpJuqotebKK+V6/OHGm4VVpHHYcFvJ+VsHbsem0Ngo0Ua+mzE0s1i87B1x O3Sw== 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=5dxahWdknGfXo7pgcGFCncUfKaHQtCKPZvFNfw/2jOQ=; b=MRYTPEGcA4S++oybeotHd5wEPyz4jZ3BkUu5ejlWD0gwpgzkCK7ERq3aNJTCz0LB6X hYz8Y9pgOtfz8Eu+ghVW++9FYo3Io1WiZtrRM6Io5ebyKY2E95ZYyS6m3XNzVgwqP28H fUxpScdQq/5UCuT/K4OKvdRAhIrXZNQCDVKdUa2Iueq+Aw8kbFdj7Hc57ou7CPA+//ot hT5o+VgzLTxP9kTWMZvBQkQOCnoVR7WvSBrrh4/xQ5eIqUEbxGoMFJg7y92MJmA3owCF P/XRkOADDrMMsNQBMVVRy93nc+bjotAYWpPgZsM1tTDzcW0hszFk4WpN2sV7ZoB9HQQb /Mow== 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 o61-20020a17090a0a4300b0022bbae722fcsi13986775pjo.1.2023.02.26.14.29.36; Sun, 26 Feb 2023 14:29:49 -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 S229727AbjBZW1K (ORCPT + 99 others); Sun, 26 Feb 2023 17:27:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbjBZW1I (ORCPT ); Sun, 26 Feb 2023 17:27:08 -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 27E5812868 for ; Sun, 26 Feb 2023 14:27:07 -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 1pWPTx-0000vM-QE; Sun, 26 Feb 2023 23:27:01 +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 1pWPTx-000Ubs-6N; Sun, 26 Feb 2023 23:27:01 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pWPTw-000YQ9-Il; Sun, 26 Feb 2023 23:27:00 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 9/9] i2c: Convert drivers to new .probe() callback Date: Sun, 26 Feb 2023 23:26:54 +0100 Message-Id: <20230226222654.1741900-10-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230226222654.1741900-1-u.kleine-koenig@pengutronix.de> References: <20230226222654.1741900-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=fHXbcu5PGfTBceGcii9O45Co+f4bxyrcH4ebuqLJvyY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+9ypCnRo5areYvsAcw81hYYkfDTuc5tikSN90 Ab3udoASEeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/vcqQAKCRDB/BR4rcrs CSkXB/wOqO7ICtslmsyIrE6bBcBeza91BHEUQhkWaZdi+fRraU4msnf25kLpMaPXrGGP07EwSeT NoHYwJtTAW3dSLcoDMZd4f8JQh+nV4G0ZqjJ6HgTknyBoRpUywsaeeXIzfre4T5jG54AkGlA7yJ LGISNc0Z8mvG/U0WWWao2RI8kS9rCJUZk85/ykBwel9W1sp+DAouPmuT/sdd03Ibi6ARqc0N9+x O8SmBDNPgC1JN/Wk9XVMNGTVh3m1MCZbmnGT4vNCXp2PVZOvXnyCkblYjv/pEjBU5Uvf5u43IYE MAbUkrhsssCMkspEJ8VZb4ZNFRpNidMz+jlk6VLM1vlvWvRx 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?1758934429316898364?= X-GMAIL-MSGID: =?utf-8?q?1758934429316898364?= 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 63253e2b2c1f..ae3af738b03f 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1050,7 +1050,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, };