From patchwork Fri Feb 24 12:05:52 2023 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: 61285 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp868548wrd; Fri, 24 Feb 2023 04:10:41 -0800 (PST) X-Google-Smtp-Source: AK7set/iZSDy/ep8pA7SIsF7ZIyvgU9BBYMp6LnGIEtvSvr9lxS37pVY/pqVkzn41tqbOXphNfh6 X-Received: by 2002:a17:90b:1b4e:b0:22c:5360:684e with SMTP id nv14-20020a17090b1b4e00b0022c5360684emr16689971pjb.29.1677240640766; Fri, 24 Feb 2023 04:10:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677240640; cv=none; d=google.com; s=arc-20160816; b=JtZ9AqSXs1yv1hNUrWWFReHI3QZFWSk/gp8v3aJQnTaRvsqex3nmO3ZG4cHvCZRv4d 2KiMdv3VcU7r/MFiw+KaqruOmHKk2YuzTuxoDfbCTTceLrAe6U750MeEWK/Z81TY8vNK 1ZwpFx3UUCU5xF43rqi5reRfgOVNfGu9T2ZdpBkRcgV1VSQU6ZwiKYQtJIgGIb1anuSB 9WFdIJ25ORKlt5JG/gsAvsfEHfpJTyt1951J9SfVYkZKGlBaaqiepzTA4rBGZk8rLfml MCAp5k/Q6bxi/D9PFrAX6dYZsksRPFQN69dEUa1AzpUgoAg5U7LpvVhj8q/U8vu8gM9V pP1g== 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=jG1by8RqhsKtQyPA6N0cYLu8URfGDfFzsK7VNC+WBLg=; b=eNblBAhI17kQx226p4y9VFibacfdhVfGTKrJ25Nb57+ux1PIAxaGTwXwP6PMkZI6Hp Iffsx8ZBMu5+UK3ZaaowVDhmaGDMnSo60BhBWcWIjO7xNaVOoF7GtEJfiIzN0ZjnJl9G lyluo6/X5y89tyypWNWD5zMVp0gSsLMynz/TJo4iS940xnOfmznjr3a1YabEUTCxjxi9 lx2DAfakA2G7FdAPri8xe/DcSOI1557J3JIjPPMVn7d3Et0xRPXgNDuzFUs1BooCtrY2 mFo6N5mVkjSx9b8CZNFb0XnSTpboqZExJX57Mq4D3VEZhnrHI+QoYLfDQKV7zdbgffvu Y4zg== 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 z16-20020a17090ad79000b0022bb380256esi2209961pju.106.2023.02.24.04.10.25; Fri, 24 Feb 2023 04:10:40 -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 S229887AbjBXMGS (ORCPT + 99 others); Fri, 24 Feb 2023 07:06:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjBXMGR (ORCPT ); Fri, 24 Feb 2023 07:06:17 -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 498EC65336 for ; Fri, 24 Feb 2023 04:06:16 -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 1pVWq3-0000cO-GQ; Fri, 24 Feb 2023 13:06:11 +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 1pVWq1-007Aze-Ft; Fri, 24 Feb 2023 13:06:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pVWq1-006EYk-GX; Fri, 24 Feb 2023 13:06:09 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wolfram Sang Cc: kernel@pengutronix.de, Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: [PATCH 1/9] misc: ad525x_dpot-i2c: Convert to i2c's .probe_new() Date: Fri, 24 Feb 2023 13:05:52 +0100 Message-Id: <20230224120600.1681685-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> References: <20230224120600.1681685-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1292; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=mZMy4fIoX9VoX671/ujh3l6dvR2sZ0vFBfJ5QYZaI/k=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj+KgGWYZ8keqte4NLP53S5uCaMlHf1ql5crSHa pOrSxDbA+KJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY/ioBgAKCRDB/BR4rcrs CX6MCACDJMLcVlwPFqphiqcsaBpcTjlkPiqn53IelowpPzNxMasMAbZ9xaSQGdfNW7wajIfoThu ijkwGZi3dY26Szqrsf878I+U27c/lYrgrQV0PFRo1saSk1v2fHWczfjc/zQh2KPaokJ4Oiqe+I5 gVo+X+ZCH7sgGmxOrMLIUJJ+jcez/aLDQn0DT270iinI6loLbU2jdUA3OHHkcLGkjCZ6UDiWy8X C4XIatL9rz+rFHtfxc3chUe8W8DPUFWDCNuPbLp4KxsiQ7Osv2KSUJQjVlAQvyiT9E1AErFgM/5 1PzLHBN8mMKCbyud7y6k1KI0W+qjv1est8jwO8EGmqG805aZ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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?1758714281951336627?= X-GMAIL-MSGID: =?utf-8?q?1758714281951336627?= .probe_new() doesn't get the i2c_device_id * parameter, so determine that explicitly in the probe function. Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/lkml/20221118224540.619276-483-uwe@kleine-koenig.org Signed-off-by: Uwe Kleine-König --- drivers/misc/ad525x_dpot-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/ad525x_dpot-i2c.c b/drivers/misc/ad525x_dpot-i2c.c index 28ffb4377d98..3856d5c04c5f 100644 --- a/drivers/misc/ad525x_dpot-i2c.c +++ b/drivers/misc/ad525x_dpot-i2c.c @@ -50,9 +50,9 @@ static const struct ad_dpot_bus_ops bops = { .write_r8d16 = write_r8d16, }; -static int ad_dpot_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int ad_dpot_i2c_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct ad_dpot_bus_data bdata = { .client = client, .bops = &bops, @@ -106,7 +106,7 @@ static struct i2c_driver ad_dpot_i2c_driver = { .driver = { .name = "ad_dpot", }, - .probe = ad_dpot_i2c_probe, + .probe_new = ad_dpot_i2c_probe, .remove = ad_dpot_i2c_remove, .id_table = ad_dpot_id, };