From patchwork Fri Nov 18 22:40:25 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: 22852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp471997wrr; Fri, 18 Nov 2022 15:58:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf5x0+i1slH7sboctTawMybQauhUnaXDn2Xad7cgRLle6XkmAp8mY9inSbELw3BFP1knzJUF X-Received: by 2002:a05:6a00:194a:b0:56b:a795:e99c with SMTP id s10-20020a056a00194a00b0056ba795e99cmr10254504pfk.14.1668815938700; Fri, 18 Nov 2022 15:58:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668815938; cv=none; d=google.com; s=arc-20160816; b=F0cVVz4tyYhxPaoBMCsA5CDWLNadHvLMmjA8YNyFzgVP10a4zymocsELb+q2gWxd6N LQ8JCZnJc67bOII90NKIQuKQm0uuj5wo1wutQP5xJZzZHtzWQMabsdU+IuUXy8SxPXqF CjQ3ANMZmyaUm9YX+TStn3PXfL6eB8cKa8NzWEfqGGs0xJmP2MrhI8knMMq0zSFsjWZV ka/ezsh1ue+P9V3GhMkVuIAt/Kxjt7Wz+DZoPDNxswV2Ak2Y6bX5VP4n/BljQUkPeQF/ cdqIVZHGvbVW5a+6KTJDrz3BXxIXp9fkvsNKxxMkimyzqX6KynbGts10jNrQ/jeZz5pR bHuw== 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=e+/kQwyjJqLwG6vSRXWeTucLts2FLDpCNBptu9hDzNI=; b=yPJpuAswDw8q0pgmt43jXpxWhwgrGw55ZO0cbfQUZ/H3bLhPOmJjuFYAp0hwsfbhAO th6iPTZ4nfcz75hLYRTbzNPst2M1DfIKuVCF7nJS3RScHJvORACIKJdEjxR9aN9cp2On E75whEoFWFELov5x0lvoF54/3HtJjgAibUDZuQR+akzgNH/WPg5Cj7J+XOOe5A9tzYPq Gd/KES+p1y77znIExrRg0wsNpqPcmGKjFThItMfqlNQUPh8UkBxH4MMgBAxiKTdwwLAm eJZRswp8IdIJ9OGOofdTk7snMUygAd3ZApzcsDo0F/h9OzUnBRRkj4xzkXIqaeiTRdrA imgA== 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 k63-20020a636f42000000b00476e764abf7si4898614pgc.201.2022.11.18.15.58.45; Fri, 18 Nov 2022 15:58:58 -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 S234439AbiKRXvK (ORCPT + 99 others); Fri, 18 Nov 2022 18:51:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234291AbiKRXuL (ORCPT ); Fri, 18 Nov 2022 18:50:11 -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 E6948C6604 for ; Fri, 18 Nov 2022 15:26:42 -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 1owA8n-0002g4-Er; Fri, 18 Nov 2022 23:47:21 +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 1owA8f-0058Uz-U9; Fri, 18 Nov 2022 23:47:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA8f-0000Ac-VJ; 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 , Benjamin Herrenschmidt , Michael Ellerman , Wolfram Sang , Ajay Gupta , Srinivas Pandruvada , Liang He , Christophe Leroy 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 291/606] macintosh: therm_windtunnel: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:40:25 +0100 Message-Id: <20221118224540.619276-292-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?1749880341748697116?= X-GMAIL-MSGID: =?utf-8?q?1749880341748697116?= 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_windtunnel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index b8228ca40454..22b15efcc025 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c @@ -411,8 +411,9 @@ static const struct i2c_device_id therm_windtunnel_id[] = { MODULE_DEVICE_TABLE(i2c, therm_windtunnel_id); static int -do_probe(struct i2c_client *cl, const struct i2c_device_id *id) +do_probe(struct i2c_client *cl) { + const struct i2c_device_id *id = i2c_client_get_device_id(cl); struct i2c_adapter *adapter = cl->adapter; int ret = 0; @@ -441,7 +442,7 @@ static struct i2c_driver g4fan_driver = { .driver = { .name = "therm_windtunnel", }, - .probe = do_probe, + .probe_new = do_probe, .remove = do_remove, .id_table = therm_windtunnel_id, };