From patchwork Fri Nov 18 22:40:24 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: 22679 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp461630wrr; Fri, 18 Nov 2022 15:27:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf5qbit5cqP9k7ZLfgY9S8fiLaj9fZBztvT6CO6RZgq/jeGBevaD62i9hKG53a7XSohofJff X-Received: by 2002:a17:907:8c8e:b0:78d:4167:cf08 with SMTP id td14-20020a1709078c8e00b0078d4167cf08mr7796417ejc.337.1668814061575; Fri, 18 Nov 2022 15:27:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668814061; cv=none; d=google.com; s=arc-20160816; b=b9d10lfY5OWGtugSX0N0XqVPV3bReRhpYtEO9IoFz2udOrkXNAN1qC5nNuR5nB6VJn a+1IuV22/NYhK+4IgMnVv/Y1ZaQZGEtWnCXsuEWbpzVr56bamgzUhW/+EDH3GV5bwbUO 02KB/PSMT+QMjuLn7Ai1ajU0YOhrDh722AzMm/AZqdQhCeaZHtGOng/igTjFoMibhLxf MtmptgFT6PHVA/lP9X/0HTrU/ALQx0/ygU+9DDtigWM1P/nOZl8ys1lSYH+WWmpNbxq4 efwUgKw5ci2TY97V7kNEn2sNXRg3vZvpSLc6TBw7XTpowx87ohSpksZ2VjnI48j3LyBX 73eg== 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=bWyRQj/Y6sZAZJNp9/zHIcqaDX5o3d1QAHUKhr07kt0=; b=a3wvevSdyF4Ii4DuShwwha7aFDW5sbJMT4BCuH8ra5rvuinHjRerLuAMuFF8zWUKKG j7bjNQ+0W1BbRfN1N96Ll8IjWS09iaZ6vt3GIIM6CGcAWNVITdR3ZM+BXTtCWfMRTP0W dYS6stEdq+SiCtbhQeBrhc4gT9SPAnNKvnS4oMmEzshOXEIPStSXMvEVHVSP73V7NxVN 8QdH1Fu0Gx4VwZ5NAR+aJW2aNk1ulhf1MIGnTvG7V8y3PTvjHTihDp6PMDNgEfOrOwCN Xzdj0ydFViUNWmSCpxsO41zfMg7ObfROeJruirJRC2v892kjt/Jb6mBax1CfmFXUUzUl s9+Q== 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 ae6-20020a17090725c600b007309a570223si413740ejc.609.2022.11.18.15.27.17; Fri, 18 Nov 2022 15:27:41 -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 S235642AbiKRX0T (ORCPT + 99 others); Fri, 18 Nov 2022 18:26:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231259AbiKRXYU (ORCPT ); Fri, 18 Nov 2022 18:24: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 EA7EB7FF12 for ; Fri, 18 Nov 2022 15:14:22 -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 1owA8j-0002gY-TA; Fri, 18 Nov 2022 23:47:17 +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 1owA8g-0058V6-3M; Fri, 18 Nov 2022 23:47:15 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA8f-0000AX-Nb; Fri, 18 Nov 2022 23:47:13 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Colin Leroy , Benjamin Herrenschmidt Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de, =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 290/606] macintosh: therm_adt746x: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:40:24 +0100 Message-Id: <20221118224540.619276-291-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?1749878373035737082?= X-GMAIL-MSGID: =?utf-8?q?1749878373035737082?= 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/macintosh/therm_adt746x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index b004ea2a1102..8f5db9093c9a 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c @@ -464,9 +464,9 @@ static void thermostat_remove_files(struct thermostat *th) } -static int probe_thermostat(struct i2c_client *client, - const struct i2c_device_id *id) +static int probe_thermostat(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct device_node *np = client->dev.of_node; struct thermostat* th; const __be32 *prop; @@ -598,7 +598,7 @@ static struct i2c_driver thermostat_driver = { .driver = { .name = "therm_adt746x", }, - .probe = probe_thermostat, + .probe_new = probe_thermostat, .remove = remove_thermostat, .id_table = therm_adt746x_id, };