From patchwork Fri Nov 18 22:37:03 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: 22597 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp448429wrr; Fri, 18 Nov 2022 14:52:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf4/RRg65e47Y7MZG6SFMm/iQGhrYgpSy024BMPRCoqEtpMOZw+YupQCh5V+DkzDB3g5As6E X-Received: by 2002:a17:902:aa88:b0:182:2589:db21 with SMTP id d8-20020a170902aa8800b001822589db21mr1448031plr.151.1668811942824; Fri, 18 Nov 2022 14:52:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668811942; cv=none; d=google.com; s=arc-20160816; b=QvLwdL8452Uw5GW3ZU8hg3lwjVtOMivka2YsrIuOMHrbIwNWdJqD9PQ6/wFjUT/wZE 2mO8yfKP7pOCGLKd7IG1ggIxNhvmMmQ6DIhcBvFU7wdodW/eCcQ48xlVuIvgGdJ/fc8r t3J8RgmRmurtX4LaAhhkviCMcfNmRLZjvpGfX447Eb2RvgGnDZh9BPfXyPsvCYuQUYLN UJPZS5CtwzAmvqojMs5EOlwEQbymY7dZK8DWU0yCJaGP9Fsg3bbNwvRHCpKv5dPZzSsL p0JdUqnSxqvx0mmyFUbU4NNaXAl0sgJYmjoh+DV6caS/8vuzZtHZl+QXP6X/PdzCic5S JYmQ== 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=pO9oFXFBdAlyUSCnOR4V7Z9nVfag+tOtcYGTro5G8jE=; b=0nfqCibr14TB4DuPT6WqRN9WGgtjloKUUD/wp4zhwPsnn+eaLEFr6wEC05lUMBMZcB Udfhoa8fMCzP9da1uyvrMqeCbYh8wLs9zOd7oWJvr9W75sAXdnreQ9d1p/JY0J0aqdKI J9UR/AI8VZui0oY928caFeltGki6YxR2k2M48yKkN6FkurDl6Pnk29XRmS/lLTtVvVJx xKk18Hwn4EcWg+XD2m5yD+F15RbXgI/HLEllvQK3wqLOt6pTSjnZoQ8O7Hh7BzmTrtph +dNb87HYyIxu85hGu2QQFHV9qasIufJJGUVOLC3t/tjEe0vY+yLNLPCEkHqRT4i/PdA3 jDcQ== 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 w130-20020a628288000000b00571b10549b0si4456207pfd.87.2022.11.18.14.52.10; Fri, 18 Nov 2022 14:52:22 -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 S233944AbiKRWvr (ORCPT + 99 others); Fri, 18 Nov 2022 17:51:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233370AbiKRWun (ORCPT ); Fri, 18 Nov 2022 17:50:43 -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 E63EEB9B8D for ; Fri, 18 Nov 2022 14:47:03 -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 1owA7z-0008Qv-5c; Fri, 18 Nov 2022 23:46:31 +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-0058EJ-Ka; 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 1owA7u-00Hb0X-FQ; Fri, 18 Nov 2022 23:46:26 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Jonathan Cameron , Paul Cercueil Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de, =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 089/606] iio: dac: max517: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:37:03 +0100 Message-Id: <20221118224540.619276-90-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?1749876151653670776?= X-GMAIL-MSGID: =?utf-8?q?1749876151653670776?= 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/max517.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c index 373ce6ff83b7..25967c39365d 100644 --- a/drivers/iio/dac/max517.c +++ b/drivers/iio/dac/max517.c @@ -141,9 +141,9 @@ static const struct iio_chan_spec max517_channels[] = { MAX517_CHANNEL(7), }; -static int max517_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int max517_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct max517_data *data; struct iio_dev *indio_dev; struct max517_platform_data *platform_data = client->dev.platform_data; @@ -203,7 +203,7 @@ static struct i2c_driver max517_driver = { .name = MAX517_DRV_NAME, .pm = pm_sleep_ptr(&max517_pm_ops), }, - .probe = max517_probe, + .probe_new = max517_probe, .id_table = max517_id, }; module_i2c_driver(max517_driver);