From patchwork Fri Nov 18 22:37:25 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: 23016 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp478239wrr; Fri, 18 Nov 2022 16:13:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf533/TlctfveJRZpogsGy1WR2g0hiOXFNZsB1HqTkUxRlYGY3VW5MhDMf33gGR1vCoc6pPO X-Received: by 2002:a63:f152:0:b0:476:a612:abd7 with SMTP id o18-20020a63f152000000b00476a612abd7mr8555255pgk.241.1668816820629; Fri, 18 Nov 2022 16:13:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668816820; cv=none; d=google.com; s=arc-20160816; b=M2KbmUxBRS7oW8mzKcGDguPVvOzTjUO0Ycrspe3mcP9Shy1ZfcsTYMpkZtbnoJlrvu oZMrlhDD2IEMWXIaollCG1SJVbLw72hLIzm8XYdcsCkHhWn2fENM+ipdl2y7jpAFXKTk gXzDHTRnDX+ZOyHnBqZuhFbnadcdpx178oqbe7bnjU1J22qvYRXrlmHbq6lMOWpkUY/w mBRNbEc6IidOg9zQFyy5OmZV0k4qyjFCybIXESxSobQzm7zhqeGyO1WC+ezMaNIsrhwC 2FZIyklBR6MsWgOyLXq15deruAC5u5afCG4E+dHxiXlZT+IxB7XC6UJAl2fBFdeW+a3l yuuA== 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=afiCHV/wX28nA4Yz7Vyw8I8JdgxhL810H55DaT6bGUk=; b=AWTjwZLpTTMqEDux6oRb6ngAoa9eHOx5Q8i0ASCyw8zvzRTsXMlpQ8WTuEk4kpyL3s ytt/0Bbhas0kFbvFtofvmoQ5/xNurLaTAiAnhV36qHq/O865uf3r8QUhk70cUqXOfsOI l8xW9zco8qJb4FW52PKWu102amHqINHlXGJZs72vzvnCnM8nZk+BT3e6SaIfB8UT4Udq nW/rnoujPCdupak0Fy3dkt4XFeooN1n1PXd0Cub4OQ7pjONoJ6N/HDWdMLsv1UiH4Vc5 f/Qqy3I3QUG2Xg0lueK6LkgzYLymsp6YsioqgAX25UFCIiHq60DuVbOjaeYLImCBuC1m SpZw== 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 b14-20020a17090acc0e00b00213120e0c85si8010365pju.156.2022.11.18.16.13.27; Fri, 18 Nov 2022 16:13: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 S237772AbiKSAMq (ORCPT + 99 others); Fri, 18 Nov 2022 19:12:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237661AbiKSAKx (ORCPT ); Fri, 18 Nov 2022 19:10:53 -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 52DF4165B0 for ; Fri, 18 Nov 2022 15:33:34 -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 1owA84-0000LW-HX; Fri, 18 Nov 2022 23:46:36 +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 1owA7z-0058GF-BO; Fri, 18 Nov 2022 23:46:32 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1owA7z-00Hb24-Dm; Fri, 18 Nov 2022 23:46:31 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Angel Iglesias , Lee Jones , Grant Likely , Wolfram Sang , Lorenzo Bianconi , 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 111/606] iio: imu: st_lsm6dsx: Convert to i2c's .probe_new() Date: Fri, 18 Nov 2022 23:37:25 +0100 Message-Id: <20221118224540.619276-112-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?1749881266539428510?= X-GMAIL-MSGID: =?utf-8?q?1749881266539428510?= 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/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c index 0faf1b4c11af..3570fac1b612 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c @@ -21,9 +21,9 @@ static const struct regmap_config st_lsm6dsx_i2c_regmap_config = { .val_bits = 8, }; -static int st_lsm6dsx_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int st_lsm6dsx_i2c_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); int hw_id = id->driver_data; struct regmap *regmap; @@ -152,7 +152,7 @@ static struct i2c_driver st_lsm6dsx_driver = { .pm = pm_sleep_ptr(&st_lsm6dsx_pm_ops), .of_match_table = st_lsm6dsx_i2c_of_match, }, - .probe = st_lsm6dsx_i2c_probe, + .probe_new = st_lsm6dsx_i2c_probe, .id_table = st_lsm6dsx_i2c_id_table, }; module_i2c_driver(st_lsm6dsx_driver);