From patchwork Fri Nov 18 22:37:31 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: 22966 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp476425wrr; Fri, 18 Nov 2022 16:09:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf42VT9Fb0rS4B5I5EP/USp5Lr2xE0Oimyfjr604lmnXMj1vbD3d7Ksi75RtViFKvTwdVm4E X-Received: by 2002:a17:906:1dc3:b0:7ad:bbcc:814 with SMTP id v3-20020a1709061dc300b007adbbcc0814mr7912664ejh.425.1668816541472; Fri, 18 Nov 2022 16:09:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668816541; cv=none; d=google.com; s=arc-20160816; b=EqWz/TG+JOIPVQp92e5ibPV5OwZWvJNS1QRcMFNFj4UvZf8jV3N9xIXGHtt8G9BPHe slXLZEHxfAMlRLQWNyuKN73SgacLC2HWBQTrfGpC1N/u634Q7JX42kf9L20/VhfI6gTl W8MDPsM2Ids3QnnGiLYYaFyhH2m9JUtNJuzTnSsNrZDnoehkT+4HEJ+rA6HzewK1OWyk 9gZmlF3va0TQYWpf6KEfQNSphSUDqA4jkB6fbardtp07nbk58N6Pih4hfDeDlDL18NXA 9aFfcTIkv/XXZsLUyhE0c5kPFcdcTTKMKp9/kwT+ZPh2t7q9RjuEVeYKsV5tc218xqzp VxsQ== 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=g656bJeQNZcPBCUL66FBinLSguo4AplHBVOnGg/AHf4=; b=aCod4+lenpTBr5O7Tjeaqpb3Y+vrfmuTuAOBRfW/KGKhkjEeNmrA8eW6leyQVyX29z 5oI+5QmWI7225xXSYdyzFr13hyx0tW+MPVTc6ug2Zf12GiefzUbPIafCGI0uGuQTmKxJ U8aWNJ+8PEhy7M0qUmMquLVCfwVTJDMGVSiXimTVJmWHSY1esRHzukqCWjnPFh9KBEjB PsuWUHggKh5VDM+igrjmgY/2lQKHVrXyXcX4s2bA2SvZvRK1yNuyP1e3LvxwUFsfv/cP xAgdE+5XW1b849r/B7a5PDlnOyuZhSb4qb1QD9hkquMO609l95Tgc9HbDjuKoEe6Y9TI 2hnQ== 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 hq28-20020a1709073f1c00b0078d27c1b499si4353138ejc.500.2022.11.18.16.08.10; Fri, 18 Nov 2022 16:09:01 -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 S237267AbiKSAED (ORCPT + 99 others); Fri, 18 Nov 2022 19:04:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237519AbiKSACX (ORCPT ); Fri, 18 Nov 2022 19:02:23 -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 3776EE2B6C for ; Fri, 18 Nov 2022 15:30:11 -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 1owA86-0000TB-Fv; Fri, 18 Nov 2022 23:46:38 +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 1owA81-0058Gn-2s; Fri, 18 Nov 2022 23:46:34 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA80-00Hb2R-PJ; Fri, 18 Nov 2022 23:46:32 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Jonathan Cameron , Matt Ranostay , Jeremy Kerr , Hans Verkuil , =?utf-8?q?Alejandro_Concepci=C3=B3?= =?utf-8?q?n_Rodr=C3=ADguez?= , Miquel Raynal , Subhajit Ghosh 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 117/606] iio: light: apds9960: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:37:31 +0100 Message-Id: <20221118224540.619276-118-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?1749880973596113691?= X-GMAIL-MSGID: =?utf-8?q?1749880973596113691?= From: Uwe Kleine-König The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König Acked-by: Matt Ranostay --- drivers/iio/light/apds9960.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index a585ce0c122f..cc5974a95bd3 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -988,8 +988,7 @@ static int apds9960_chip_init(struct apds9960_data *data) return apds9960_set_powermode(data, 1); } -static int apds9960_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int apds9960_probe(struct i2c_client *client) { struct apds9960_data *data; struct iio_dev *indio_dev; @@ -1132,7 +1131,7 @@ static struct i2c_driver apds9960_driver = { .pm = &apds9960_pm_ops, .acpi_match_table = apds9960_acpi_match, }, - .probe = apds9960_probe, + .probe_new = apds9960_probe, .remove = apds9960_remove, .id_table = apds9960_id, };