From patchwork Fri Nov 18 22:37:36 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: 22858 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp472018wrr; Fri, 18 Nov 2022 15:59:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf5qjKdrvFQrLuSHXVUTrWBvOX915F8oQCcPnNZdfsd6xO1SFqbnQUGM6efFS03AVF5Gbdzf X-Received: by 2002:a17:906:d78e:b0:7ae:c0b:a25e with SMTP id pj14-20020a170906d78e00b007ae0c0ba25emr7409064ejb.603.1668815944137; Fri, 18 Nov 2022 15:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668815944; cv=none; d=google.com; s=arc-20160816; b=MjMTy4nujZqbkBJa4PI9JE+MrdmdGV+50SXUbvP+mrIalfUE5AOtA6I2hzA7UFMzp6 l10vgOywOG4X8ZelWZ7JjDCQzcrxeTmcwSd83VeNBi/RnEP50+q0FN//vuLb2HZYCf49 JnbvX3u2rYGuZPfxtkPXJC+PLRnTQkqlpRA25K7e8bZaD2Avt5AZ3oEllJGAb5CPCFv9 1faLBYUMYl6ByKZRn91soTxLPtHHgwP/GWw6PcL/IDLvc64FYDFYxQdFWe5LmH2ZOUfb QAzF7SvXrbtkeXuTtsfY5PXZ+kJUCLqTEeqbYbLFaT8AKrdDOS9CrhjaL7Jq6cy7KHsA tAdg== 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=9Z6HT7NlMjYLQMb+iMFh6lrIyLx+PRnUr6YXih/Iqc4=; b=zYe11vzZCsaIKVDOvO2dXEK7PKNj+c5BJY6NZ8flBgyfJWb9sVbtghleYi1kXzpuVF 8xSQnmbESJbAWtW8H5KgSCM2Q8sP1FN7sYvnmYNEExmuhwLSx1BYIjxZ/iFohR3tnUCQ exwF2bLwdoKnTHdarfPPFns81i1ONoUgoFnWNsb2+V79WxS0pu6BsmKBLOL52YRt3iPC klubeqXeS1TE0mwUJtGD2F+lwaq0v/Jl+6AJnLLw7l5WH0P5qEi1H2NPfBhMHkDvAK+X SqS/itnBJizsTHI5dGxJfDq8glCWSBk7Q6MRIeFQvkQNISoYeskxoqjmfINQIdKRnbGN 78zQ== 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 z19-20020a05640240d300b00468cd0b1cafsi4507279edb.163.2022.11.18.15.58.40; Fri, 18 Nov 2022 15:59:04 -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 S233466AbiKRXuh (ORCPT + 99 others); Fri, 18 Nov 2022 18:50:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236840AbiKRXt3 (ORCPT ); Fri, 18 Nov 2022 18:49:29 -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 B88D0D08B4 for ; Fri, 18 Nov 2022 15:26:37 -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 1owA87-0000aT-8i; Fri, 18 Nov 2022 23:46:39 +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 1owA82-0058HO-FU; Fri, 18 Nov 2022 23:46:35 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA81-00Hb2k-Sx; Fri, 18 Nov 2022 23:46:33 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Kevin Tsai , Jonathan Cameron 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 122/606] iio: light: cm36651: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:37:36 +0100 Message-Id: <20221118224540.619276-123-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?1749880347059611708?= X-GMAIL-MSGID: =?utf-8?q?1749880347059611708?= 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/light/cm36651.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/light/cm36651.c b/drivers/iio/light/cm36651.c index 6615c98b601c..1707dbf2ce26 100644 --- a/drivers/iio/light/cm36651.c +++ b/drivers/iio/light/cm36651.c @@ -618,9 +618,9 @@ static const struct iio_info cm36651_info = { .attrs = &cm36651_attribute_group, }; -static int cm36651_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int cm36651_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct cm36651_data *cm36651; struct iio_dev *indio_dev; int ret; @@ -730,7 +730,7 @@ static struct i2c_driver cm36651_driver = { .name = "cm36651", .of_match_table = cm36651_of_match, }, - .probe = cm36651_probe, + .probe_new = cm36651_probe, .remove = cm36651_remove, .id_table = cm36651_id, };