From patchwork Fri Nov 18 22:44:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 23090 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp487614wrr; Fri, 18 Nov 2022 16:43:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Drfqo9GFHtT60Da90tpMNM/4tbFcV8ZFZUfdoLb1f8VRiTZg52vFLnqy5vAmojlBOZzxW X-Received: by 2002:a17:906:bce9:b0:7ad:960d:3a4d with SMTP id op9-20020a170906bce900b007ad960d3a4dmr7561508ejb.522.1668818614677; Fri, 18 Nov 2022 16:43:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668818614; cv=none; d=google.com; s=arc-20160816; b=fAbSe8jh3mkiZg29iAtTnCsKuuGIeYttKX6FFXzhOztXkdFaPqNeiC/yRkN5SGAIVj lJEFqzpaOZb2Ve6fS2Qq5zFVtoGOcaLU1DInsuD63X2/lTJ5H+g8QVyzxvcqwBxJx3pG H6I3Oo8MoFcj4A0YwTCIymCzFiwbhOBi4bv3zewJbesyJfdMXzbVmKnTW+Vq3EMbGG9b fbMHO9+qF/S1Zv/9YTENMSdr6wyzlk4k/KbVgaqqIvqwADrcbcBDmXjZs5l2E/ebBhfW NSFnwJq2TghceAqsYyGLSCd4CmAa4DIAIV82AAUf1q5iSoP600FdopQjdaJnCnZabwNe pILA== 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=uYRk4gVoeNdTMb0SdPtRXc+wy2TLdKKkZkgKxkd0N2s=; b=Cgha3D8GqKw9eqqKbIYdFeCPJkCWFevN/3zUDsLBVtS2Q4Dju3umB1knbMSEX/WkaW 6qXwO31toPy3l+rLuDuEoUG+gVhWkv/EPxewUb9/echyeSNdc4v06Rf5rjbJ61jdPN8K gbcgKNueqqni6p6tEH8X/h2U5tsN3nAcCP5Nc9kAwnXMeg8qokXpR2j/OAD9I7PwOJnX 07r3B4nBOB70+cFJMjl2GDmYDeg701xyyir8nR749JeM07UhVsbw6tXe522G3IvNK2JB ST2wRfxUXP+w3RAzNq/kQ6UIB/5ahevhUrRxaNv+sRfDQnIkSiKqBld3P1E9t2zS2dya NA3Q== 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 hz3-20020a1709072ce300b0078e06df0d29si3825350ejc.705.2022.11.18.16.43.03; Fri, 18 Nov 2022 16:43: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 S237974AbiKSAZo (ORCPT + 99 others); Fri, 18 Nov 2022 19:25:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236919AbiKSAZP (ORCPT ); Fri, 18 Nov 2022 19:25:15 -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 B11664A051 for ; Fri, 18 Nov 2022 15:38:33 -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 1owA9V-0004nI-Nw; Fri, 18 Nov 2022 23:48:05 +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 1owA9T-0058nI-27; Fri, 18 Nov 2022 23:48:04 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA9T-0000QU-Cf; Fri, 18 Nov 2022 23:48:03 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Sebastian Reichel Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de, =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 518/606] power: supply: bq2515x: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:44:12 +0100 Message-Id: <20221118224540.619276-519-uwe@kleine-koenig.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221118224540.619276-1-uwe@kleine-koenig.org> References: <20221118224540.619276-1-uwe@kleine-koenig.org> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749883147324724486?= X-GMAIL-MSGID: =?utf-8?q?1749883147324724486?= From: Uwe Kleine-König .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Signed-off-by: Uwe Kleine-König --- drivers/power/supply/bq2515x_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/power/supply/bq2515x_charger.c b/drivers/power/supply/bq2515x_charger.c index 4f76ad9c2f18..da224ae8dc61 100644 --- a/drivers/power/supply/bq2515x_charger.c +++ b/drivers/power/supply/bq2515x_charger.c @@ -1078,9 +1078,9 @@ static const struct regmap_config bq25155_regmap_config = { .volatile_reg = bq2515x_volatile_register, }; -static int bq2515x_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int bq2515x_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct device *dev = &client->dev; struct bq2515x_device *bq2515x; struct power_supply_config charger_cfg = {}; @@ -1158,7 +1158,7 @@ static struct i2c_driver bq2515x_driver = { .name = "bq2515x-charger", .of_match_table = bq2515x_of_match, }, - .probe = bq2515x_probe, + .probe_new = bq2515x_probe, .id_table = bq2515x_i2c_ids, }; module_i2c_driver(bq2515x_driver);