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: 657966 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6491C7EE2E for ; Sun, 26 Feb 2023 22:27:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229728AbjBZW1K (ORCPT ); Sun, 26 Feb 2023 17:27:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229723AbjBZW1J (ORCPT ); Sun, 26 Feb 2023 17:27:09 -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 87BD112589 for ; Sun, 26 Feb 2023 14:27:08 -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-i2c@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org .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: 656700 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51B14C7EE33 for ; Sun, 26 Feb 2023 22:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229512AbjBZW1Z (ORCPT ); Sun, 26 Feb 2023 17:27:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbjBZW1U (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 1A14419687 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-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-i2c@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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: 656702 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE070C7EE2E for ; Sun, 26 Feb 2023 22:27:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbjBZW1W (ORCPT ); Sun, 26 Feb 2023 17:27:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbjBZW1U (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 ED3FA18B04 for ; Sun, 26 Feb 2023 14:27:14 -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-i2c@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org .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: 657963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03E01C7EE2D for ; Sun, 26 Feb 2023 22:27:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229763AbjBZW1e (ORCPT ); Sun, 26 Feb 2023 17:27:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229779AbjBZW10 (ORCPT ); Sun, 26 Feb 2023 17:27:26 -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 B5AF7199D5 for ; Sun, 26 Feb 2023 14:27:20 -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-i2c@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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: 657964 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E0B0C7EE2D for ; Sun, 26 Feb 2023 22:27:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229772AbjBZW1Y (ORCPT ); Sun, 26 Feb 2023 17:27:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229738AbjBZW1U (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 6152E1716C for ; Sun, 26 Feb 2023 14:27: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 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-i2c@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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: 656701 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BA3BC7EE31 for ; Sun, 26 Feb 2023 22:27:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229765AbjBZW1X (ORCPT ); Sun, 26 Feb 2023 17:27:23 -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 S229731AbjBZW1U (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 CAF4213DE7 for ; Sun, 26 Feb 2023 14:27:15 -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-i2c@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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: 657967 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F155C7EE2D for ; Sun, 26 Feb 2023 22:27:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbjBZW1G (ORCPT ); Sun, 26 Feb 2023 17:27:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbjBZW1F (ORCPT ); Sun, 26 Feb 2023 17:27:05 -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 9239F12589 for ; Sun, 26 Feb 2023 14:27:03 -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-i2c@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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: 657965 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AF70C7EE2F for ; Sun, 26 Feb 2023 22:27:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229759AbjBZW1W (ORCPT ); Sun, 26 Feb 2023 17:27:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbjBZW1U (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 48C7016AF0 for ; Sun, 26 Feb 2023 14:27: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 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-i2c@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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: 656703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47DF3C64ED6 for ; Sun, 26 Feb 2023 22:27:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbjBZW1G (ORCPT ); Sun, 26 Feb 2023 17:27:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbjBZW1F (ORCPT ); Sun, 26 Feb 2023 17:27:05 -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 92941125A7 for ; Sun, 26 Feb 2023 14:27:03 -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-i2c@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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, };