From patchwork Fri Nov 18 22:44:08 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: 22802 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp466835wrr; Fri, 18 Nov 2022 15:41:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf4I1s6cuqKpPfJ8TYxdUzUiLfBqdM6Ds3Nym8brBc9PF0cyuHlVCFRHupofnfG5z+v+Ku0y X-Received: by 2002:a17:906:ad9a:b0:7ad:8bc6:48e4 with SMTP id la26-20020a170906ad9a00b007ad8bc648e4mr7910958ejb.514.1668814872773; Fri, 18 Nov 2022 15:41:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668814872; cv=none; d=google.com; s=arc-20160816; b=qiX00XZs9c+bNvvLwygfPOtAiMnjVRVxWfF378VKVdSTn4Pl/N2MZWlfqzCXOWipAl DuBwo+V4eQGQBkef4Y1m/DxyG5rdgz1H2Epp1e4cLZPyYEw5PDe92T0a+J3ecb0tgsO2 CmHsilhfDZliYGPWLYvHCUe0EDiZYjoAJQh/6PFfGOpxdd5Ay0opHT13jb7Hl7pcOhYK oqlu0+8aVkDXe1dVtNi4ecZj+2VfqJQyJSBJeze2yun0i0yxxE6CAOQDxgCD2012u6x8 ACzS0pwy9vmLvudke9Rn4dn7aNOrTIXrclzF6p7GDL1n08e4Ha33c+aFPSUIyCudTwZF KyGw== 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=LhpKb/JZ1TZXhIhggjPoaL/llhkIUyqvvQx1Zg5GoKw=; b=f/YTElGSkLRWEwP029rNzhQXPiEU5y5GfMJ3vBPJHSXmtOFYKxQvaJxQCgZsS/IXRB CSDbBk7r6UQESnjJ+GnN/PmcETJrXXdjO1V9FE0Zcajno8SWF6NJUMBG8Ss6d7RzPWeE kIBBAwBb7QPkeGOmO86dcRWoRd4TdYB4Cw8UhGQWcYNXeuib3KF13gJJK4xfz86KprT8 qn5nmQHCP+yWpslylsNCx4ZuK3dBQCA6+IYHEv7/exWlXWCS7uq0zJ7gdBH9h+vk2s5+ r/kwEKq3sC0SC0mS51hzefMp0vk2fJZnPmdUza61KgI6+HIb6K9Ea0UjG8DQ4MVHZigr q/Vw== 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 xb1-20020a170907070100b007aee7ca1161si4630874ejb.711.2022.11.18.15.40.48; Fri, 18 Nov 2022 15:41:12 -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 S236647AbiKRXj4 (ORCPT + 99 others); Fri, 18 Nov 2022 18:39:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236761AbiKRXhv (ORCPT ); Fri, 18 Nov 2022 18:37:51 -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 2F87D6D96D for ; Fri, 18 Nov 2022 15:22:26 -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 1owA9U-0004l2-NY; Fri, 18 Nov 2022 23:48: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 1owA9S-0058mt-6f; Fri, 18 Nov 2022 23:48:03 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA9S-0000QC-F4; Fri, 18 Nov 2022 23:48:02 +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?= , =?utf-8?q?Pali_Roh?= =?utf-8?q?=C3=A1r?= , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 514/606] power: supply: bq2415x: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:44:08 +0100 Message-Id: <20221118224540.619276-515-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?1749879224090564115?= X-GMAIL-MSGID: =?utf-8?q?1749879224090564115?= 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/bq2415x_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/power/supply/bq2415x_charger.c b/drivers/power/supply/bq2415x_charger.c index 6b99e1c675b8..d2cb7431dced 100644 --- a/drivers/power/supply/bq2415x_charger.c +++ b/drivers/power/supply/bq2415x_charger.c @@ -1520,9 +1520,9 @@ static int bq2415x_power_supply_init(struct bq2415x_device *bq) } /* main bq2415x probe function */ -static int bq2415x_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int bq2415x_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); int ret; int num; char *name = NULL; @@ -1780,7 +1780,7 @@ static struct i2c_driver bq2415x_driver = { .of_match_table = of_match_ptr(bq2415x_of_match_table), .acpi_match_table = ACPI_PTR(bq2415x_i2c_acpi_match), }, - .probe = bq2415x_probe, + .probe_new = bq2415x_probe, .remove = bq2415x_remove, .id_table = bq2415x_i2c_id_table, };