From patchwork Fri Nov 18 22:44:17 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: 22711 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp463151wrr; Fri, 18 Nov 2022 15:31:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf6tawdORJ9jcJYVCfRBI9RIzXZiTQZRWXH1kALlVaTnTVRR6LdT6xZBxTiVyyOhPCtCtsRv X-Received: by 2002:a05:6402:1002:b0:467:7c62:64 with SMTP id c2-20020a056402100200b004677c620064mr7882054edu.82.1668814305851; Fri, 18 Nov 2022 15:31:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668814305; cv=none; d=google.com; s=arc-20160816; b=xoAblId6ZFHYQji4zdWQg54A1eTPcbNscexzBE+FyD7LGxzQ15p45SP6AONUEqZsKX K0rqUlKEIAput57DSBHExT338Z+JfgTKPYJi+KtA7GchWsIv+LZx5WvvaCMoiDXDI8A/ hLQHoujdPObH4229nY+ha70vg1on2t0/UF9CKZLpl1lD9Z5PIu0lmDgSGpF1Cth2c7Jh gVYMdOySv3h5l5pjV626gv8OVcqWz7BbMrHKW1NuMEIA0ASu7g1vxyC0JNew5kK4291l R8231y+vHsJvzY0xbHbpU/uXkWajbqqmMFUukZL7WV8JkXt/egxWeHraB0CyCaCf7aqH K6GA== 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=2AyJG7YZGZjgvC0KRekcoM2iRdzWfm0yEyTHZEWLJMM=; b=EV0bK7ee09iYJxTpWvOcZOHPQoscIEEHX0KJPADeezgm1ZP1WAcY8Wx5HFELcON+p1 aWy15Z84/9Pc9c4YCoMF+bohsasjWzWFX/29RFtK9o06FJVWEFZyZPX+dEVo5LfB4xxQ FoBLpvg68rzg1wbFD4wzSeYLeJL0t9daMYzza9KaH0drb+1229ykyeAmxzsHRjtOdFGT OSNk4GYzmTs6pn+x2BifXEnkITgylPaGTZ6NmiGlGaI2Y4a1zUw3+/cW2YrXnFfJlqw7 NcGCtO88C5PgVBIJT57NK6xxuawZ6SJYO5JpH/dffRhibrsKB19zlP6I4VxFvkTxuhbI fCHg== 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 i2-20020a05640242c200b0046453c385e4si4521592edc.365.2022.11.18.15.31.22; Fri, 18 Nov 2022 15:31:45 -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 S235993AbiKRXaj (ORCPT + 99 others); Fri, 18 Nov 2022 18:30:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235755AbiKRX3P (ORCPT ); Fri, 18 Nov 2022 18:29: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 6BEF6C1F42 for ; Fri, 18 Nov 2022 15:17:24 -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 1owA9X-0004rK-6R; Fri, 18 Nov 2022 23:48:07 +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 1owA9U-0058nl-KB; Fri, 18 Nov 2022 23:48:05 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA9U-0000Qq-S8; Fri, 18 Nov 2022 23:48:04 +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 523/606] power: supply: ds2782: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:44:17 +0100 Message-Id: <20221118224540.619276-524-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?1749878629759831778?= X-GMAIL-MSGID: =?utf-8?q?1749878629759831778?= 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/ds2782_battery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/power/supply/ds2782_battery.c b/drivers/power/supply/ds2782_battery.c index d78cd05402f6..9b9619246902 100644 --- a/drivers/power/supply/ds2782_battery.c +++ b/drivers/power/supply/ds2782_battery.c @@ -368,9 +368,9 @@ static const struct ds278x_battery_ops ds278x_ops[] = { } }; -static int ds278x_battery_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int ds278x_battery_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct ds278x_platform_data *pdata = client->dev.platform_data; struct power_supply_config psy_cfg = {}; struct ds278x_info *info; @@ -458,7 +458,7 @@ static struct i2c_driver ds278x_battery_driver = { .name = "ds2782-battery", .pm = &ds278x_battery_pm_ops, }, - .probe = ds278x_battery_probe, + .probe_new = ds278x_battery_probe, .remove = ds278x_battery_remove, .id_table = ds278x_id, };