From patchwork Fri Nov 18 22:37:00 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: 22863 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp471982wrr; Fri, 18 Nov 2022 15:58:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf5lOx6/O3lchF1UYmTN66sBsR4k2jvUw0YKgjnEdBfJuHIArZIqNE5FP+mfSvgr8FT+wgXM X-Received: by 2002:a50:ff0d:0:b0:461:c6e8:452e with SMTP id a13-20020a50ff0d000000b00461c6e8452emr8027500edu.298.1668815937175; Fri, 18 Nov 2022 15:58:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668815937; cv=none; d=google.com; s=arc-20160816; b=Qm2+jwEoICiHEurpSY25Ht8ypw6ZnAvZs7ZI+PNZdvXj1c0Q+lmRlRqJXnfdCgkuTO g63XgqH+JbCTDZksp6wfDzABVY0UjmKodDcbBHH1gdOHcCyobPC2lHbePuKlu5suZe/j 5U7VnSbKoPstHihx54+n3J+TD4VcfXu9llKWMjtQ2ED3ZjZTU1UYgJH4Mo9xa20KOB2C dw7pmSTYlGc2bSLc848r34Tdwr/Vdxl28dYh3wDjq5UaEV7S0JDIr5miX1ppQx7njgGY ++dwI1LVfbqeSGklKYWblp3qTS7oKZTtfwvGAH1KXlfy0Ev2PVnk1Sk1TETKfOIGFoY4 /h3w== 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=S7tgvhvTkpnh3sPfO3LYbPVWkWEmXx7uS2P6TU52nHU=; b=WKhq/gjLsMF35XoZ9QCeb84LJCoSrFHaNp/VN2iAkumTtXRHG+e9uXzseqDmmAGtpP Wk9fj5nAm49E0qx5Ie12mG4RUejzgDtcrSIz7A4tsN482YLG9sO2FVpUV3b6zvlDx/Bp ZKu4vNR51RxpLitNfWQ2YjyJ7alOreTIze6ZgxoAyIE+RkYGGFdVNnSDQZLgOJgUWHRX Tb5cZn7kHS6nMlCNtzpZE7/R+AYOtvtsABVnO0nNF9294a00661E0iSgYH7bVgRZSZok kZjJVh3Lxhl7eah/Dv1xwF0LSMmhEXdf8DgwJZeeSJHtlvWc0y5HGxKAw2I5cupkqkSq lzfA== 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 mp9-20020a1709071b0900b0078ed891fef3si4132368ejc.440.2022.11.18.15.58.32; Fri, 18 Nov 2022 15:58:57 -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 S236903AbiKRXuA (ORCPT + 99 others); Fri, 18 Nov 2022 18:50:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233587AbiKRXtV (ORCPT ); Fri, 18 Nov 2022 18:49:21 -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 0085EEC09E for ; Fri, 18 Nov 2022 15:26:30 -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 1owA7y-0008PT-CC; Fri, 18 Nov 2022 23:46:30 +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 1owA7u-0058E9-BK; Fri, 18 Nov 2022 23:46:27 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA7t-00Hb0M-Q3; Fri, 18 Nov 2022 23:46:25 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de, =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 086/606] iio: dac: ad5696-i2c: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:37:00 +0100 Message-Id: <20221118224540.619276-87-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?1749880340514188353?= X-GMAIL-MSGID: =?utf-8?q?1749880340514188353?= 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/iio/dac/ad5696-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/dac/ad5696-i2c.c b/drivers/iio/dac/ad5696-i2c.c index aa36cbf0137c..160e80cf9135 100644 --- a/drivers/iio/dac/ad5696-i2c.c +++ b/drivers/iio/dac/ad5696-i2c.c @@ -58,9 +58,9 @@ static int ad5686_i2c_write(struct ad5686_state *st, return (ret != 3) ? -EIO : 0; } -static int ad5686_i2c_probe(struct i2c_client *i2c, - const struct i2c_device_id *id) +static int ad5686_i2c_probe(struct i2c_client *i2c) { + const struct i2c_device_id *id = i2c_client_get_device_id(i2c); return ad5686_probe(&i2c->dev, id->driver_data, id->name, ad5686_i2c_write, ad5686_i2c_read); } @@ -113,7 +113,7 @@ static struct i2c_driver ad5686_i2c_driver = { .name = "ad5696", .of_match_table = ad5686_of_match, }, - .probe = ad5686_i2c_probe, + .probe_new = ad5686_i2c_probe, .remove = ad5686_i2c_remove, .id_table = ad5686_i2c_id, };