From patchwork Fri Jan 27 10:17:26 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: 49160 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp755866wrn; Fri, 27 Jan 2023 02:19:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXviOn6Gl0j0wovcGgdK75sjWS9zRcbgaetSZbg694GJqUE/MnauL5P3dCUqXCRmsFoNn/9Z X-Received: by 2002:a05:6a20:8b0f:b0:af:ac38:911a with SMTP id l15-20020a056a208b0f00b000afac38911amr39888322pzh.59.1674814753768; Fri, 27 Jan 2023 02:19:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674814753; cv=none; d=google.com; s=arc-20160816; b=H/3kphqtDqNy5TOMRd9YLMOdSNUzl/4KJ65IkDjegmLonVOkfPqDzNS7N5awHsq2sB l2IJwAIPipR6O4+d+yCTn/a+BBBjWb3j0qCIvv5ZdSJrueyWj3XAjqe5J6NguDSIZdxe BpBFlLUJowk5Ja7jX1eIcm8mjqxt+udoC8X8tJn4RslEJYreV1GazAI6bVkeK159Vaa/ vuHcc8noZzOxy8JrzAPDaC9CEmIz/EI0TOI6ZEw59+tq+n8aB++YaCvl/sOaq4UII+bS B4qreaic9L/E4RaJVR+8Gr4mf19W75im5Wr71Iq5tCZIDrpTFrDdMcoRaA5lLFQxOtfx fJVg== 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 :message-id:date:subject:cc:to:from; bh=rQDZ2Zpo3wVaipkIyE0EoeDvBDDpFa6+/Qfyr8TUo48=; b=oiqSny+AQBnkGcO/5xxrhdeQlvdAF0ufmMjADMuXvXV1QRUaluh0illLFK7ICAqd2W wWKVE3v9V3j39BTJkgfwmtdEMDwxJ3JneUiI7el5ikPDJObbFKzyztV6mjdQBhGftXNm Cb8HB/yWl4D8NuZ46sKYNbZFDh63KQF0Lw7RLWm/Ih1DwHUGiMuvbwvJtyo9/Oa/a7a8 0wVcWnsfIAgLN1uvDiUdMVSbmrCipRfJ/qiDS/TPfPxYvcIVCVCJ80s10zysL3lFtAUZ gppfvH4VgbAncieJJg4msLxaT0RtQpM2ryPqtR5TJxKh2O8RlXoQ7xhwXUNOydE5d8SU fwYw== 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 z124-20020a633382000000b004daa13455ddsi3866342pgz.331.2023.01.27.02.19.01; Fri, 27 Jan 2023 02:19:13 -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 S232966AbjA0KRq (ORCPT + 99 others); Fri, 27 Jan 2023 05:17:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232356AbjA0KRl (ORCPT ); Fri, 27 Jan 2023 05:17:41 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20762DBC9 for ; Fri, 27 Jan 2023 02:17:37 -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 1pLLnb-0000It-0H; Fri, 27 Jan 2023 11:17:35 +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 1pLLnb-000lL8-7F; Fri, 27 Jan 2023 11:17:34 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pLLnZ-00GGtV-5Y; Fri, 27 Jan 2023 11:17:33 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH] regulator: max20411: Convert to i2c's .probe_new() Date: Fri, 27 Jan 2023 11:17:26 +0100 Message-Id: <20230127101726.1313927-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1585; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=K8fuR6YVVy7Mx50qAVTWWO9NTfOzag1c/ArLj19HLJo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj06SxrxsgOLxNcybYyLgjPyJkoaFPB+EHJCvqKpny 7bwP14eJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY9OksQAKCRDB/BR4rcrsCUSkCA Cafz5WWJZJ9KkTDMUpcxDdmWrK0L+kTUTDd9xRatOHSYfAWbe1lRp7hTeFz1MoyBVaT2ED4e5JEjmn 8rFt79hFTuAKMqFgIliqXmZrf82CKQUVk3ZvGs/i266q7VXvx3JLcl9kfWcJOskpKwTNJW0kAqEDds ZMpbJyfYZHVVXo2gbxMyvY0rsfH/yIRVvfdefL2eVtOnURajkyt6TU/q7purPQOu1lyoIx+RpAGMBt RzoI4Cem9bKBrQ3cKqMDEzmDDqV9Hhw/RsgoUGQUn/yNANDAFm6yixcuL0G4JR4LSIqepv7X56D/Yr OG5koMTKFK262DKBvKXyKlrkbnU1mo X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756170554850150794?= X-GMAIL-MSGID: =?utf-8?q?1756170554850150794?= The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König --- There is an ongoing effort to convert all drivers to .probe_new to eventually drop .probe with the i2c_device_id parameter. This driver currently sits in next so wasn't on my radar before. My plan is to tackle that after the next merge window. So I ask you to either apply this patch during the next merge window or accept that it will go in via the i2c tree together with the patch that drops .probe(). --- drivers/regulator/max20411-regulator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/max20411-regulator.c b/drivers/regulator/max20411-regulator.c index b4faad54c458..e75d16048e2f 100644 --- a/drivers/regulator/max20411-regulator.c +++ b/drivers/regulator/max20411-regulator.c @@ -96,8 +96,7 @@ static const struct regulator_desc max20411_desc = { .n_ramp_values = ARRAY_SIZE(max20411_slew_rates), }; -static int max20411_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int max20411_probe(struct i2c_client *client) { struct regulator_init_data *init_data; struct device *dev = &client->dev; @@ -156,7 +155,7 @@ static struct i2c_driver max20411_i2c_driver = { .name = "max20411", .of_match_table = of_max20411_match_tbl, }, - .probe = max20411_probe, + .probe_new = max20411_probe, .id_table = max20411_id, }; module_i2c_driver(max20411_i2c_driver);