Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp803608rda; Sun, 22 Oct 2023 10:23:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbrLa7/YBaLrH6ATlVz2o+6mZpJSLoR7D4P8zIhV+InieuPatvF3EYJsCIvW+UW7Uju8eq X-Received: by 2002:a05:6a00:14ce:b0:691:2d4:23a2 with SMTP id w14-20020a056a0014ce00b0069102d423a2mr6046981pfu.31.1697995409587; Sun, 22 Oct 2023 10:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697995409; cv=none; d=google.com; s=arc-20160816; b=XvhjR7pK3l/xS2tCbcMco9iFWll0j1XiXhxIeeMZvoSPYAusdt7H/Tniy3yJ5u8CXz VYp6KFNxeBdW3QvOJ5XU1J3H6LpJZxqAlsUvJgz6Vc3hO3tcW685Zixhcra3j9UIKKoz FhpCGjm43Kb6t3QpNzi70xDnV5E1HOUKkIQ3ldjKQvwjFdpHwKFToRdyhy9w82W7FE7q no99zWz/CzTpGWu+k0qpx3PCaILxKi47RdP1/XtjOp8MaH4wjNJ2CfV+V4NtrI+iTOmn BE4Go5wmncofKL4N0LOwSlagVMxFzoa/AhiglhYweWtjQDFqHnsCqZWy0X0je9w7W5G5 Z7nQ== 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 :dkim-signature; bh=TR1rbIRAVPmg6FZUklnnnduo61uGU5Ugg06WBamDHUw=; fh=TXKvFY9LASN75wBOUns1/yVAuHT5bGKVUcF/s0mW8sA=; b=LxnH169eG5KrIZo9ZY7k3flN3rndlC7qZT6r2tnO3y3eUL6yEfRKyr+68wuRUyVcNw H8VF6jYmJ4btkabhSGN0xGW9Zl+Kez/dNmPiwR4J2iITbclEiGZNW/WC1TAvvoaj2vOB Gp9aP1UReVJhz3ph/3zwUzqTp0C8ujjev7lF1OsUaxZG/zXfOBoSECzdHuSAZH8XAIlF wW38hiOHT9O0S1gxweQzOlMtf3e6Os0tfI7LD5VLBrjJXVBmDxRiLFxvGCamd2l/ji+p DasiEnkf4G15zhTIPGwmMG4IYQsc7ArC71qKjv9k9HpWXFhqH3SUcHlPUcw20ovWaCOV Qk8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RKs4pyD4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id e6-20020a056a001a8600b006901387b0b3si5254325pfv.9.2023.10.22.10.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 10:23:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RKs4pyD4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 643918057941; Sun, 22 Oct 2023 10:23:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232723AbjJVRXS (ORCPT + 99 others); Sun, 22 Oct 2023 13:23:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232541AbjJVRXL (ORCPT ); Sun, 22 Oct 2023 13:23:11 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8425C13E; Sun, 22 Oct 2023 10:23:09 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-32d9cb5e0fcso1818860f8f.0; Sun, 22 Oct 2023 10:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697995388; x=1698600188; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TR1rbIRAVPmg6FZUklnnnduo61uGU5Ugg06WBamDHUw=; b=RKs4pyD48fYg8PLKWvvb+7iky1q34Gg+JrikWsyCdEtuj2kuKq0R/RTJtenwFp7HI8 szI7nQ00OhnzjyYUPnTiGeHlq+aQHvoAzk1HqS84UEYWL7LaiolsJkBbT028O641Sldx lTAo5D9PAq3ACORRa4JnD1rrXZFRe8LLciOGOFOARG08K+1IBKoCtG1YY8qu493WQuXR dvZhUBTS9R02XOy6YRF2yo06wWaB54RZJgRC9Ylg9PI7oo3/kTYGsC7C8c47jEKQqlUu 48ZVppKik86X+VUrnBdjm0tOIslqALl7WodOXq2e/OxuNDOBIC2vH1YYfCSO1+qEVh0Z MSHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697995388; x=1698600188; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TR1rbIRAVPmg6FZUklnnnduo61uGU5Ugg06WBamDHUw=; b=ojj5gUuwlwBhCFNIJMxCJEznsJgfao7zSSNxcE8B+ZIog10uxZE7dqEqOhq7+Z06NW AfZLu4SU4mtzu/mlp2ml3Ssqy5lDopYXh23TBRu6VjeqH1HKIaKm/KxwefEMMp30uETa d0ZPvYx+tyhMT3KXPC7nHahBv2xi/IBRHzdRBbJ8qkMFxcvUJKBoEF1lpNd6ZIzzkKXM BH4RojBy0L4S3e0dzb7D2NTmHdO/egVGu6c4Zi/fYVa9VyvO9nfDRH8uVkZ9PQ3S4akQ JB6WDquAh4loYq19p/ScNV1LmZ/tU/jkWXW8MFon/U+3gv7gZdbp6y5j1aoawQezSlP9 tNpA== X-Gm-Message-State: AOJu0Yzyo7HUEIWlO7f5DPYWNw0qn8OiwD5Qb0UbKMCJ5p3akaWR5hNN DT7RCKkpoARTEweb6YzGX7cOu6Q3mNs= X-Received: by 2002:a5d:43c2:0:b0:32d:804c:15d1 with SMTP id v2-20020a5d43c2000000b0032d804c15d1mr5051743wrr.47.1697995387780; Sun, 22 Oct 2023 10:23:07 -0700 (PDT) Received: from toolbox.taileb357.ts.net (13.red-83-35-58.dynamicip.rima-tde.net. [83.35.58.13]) by smtp.gmail.com with ESMTPSA id o12-20020adfe80c000000b0032da49e18fasm6043836wrm.23.2023.10.22.10.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 10:23:07 -0700 (PDT) From: Angel Iglesias To: linux-iio@vger.kernel.org Cc: Biju Das , linux-kernel@vger.kernel.org, Andy Shevchenko , Jonathan Cameron , Lars-Peter Clausen , Angel Iglesias , Phil Elwell , Linus Walleij , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Subject: [PATCH v2 1/5] iio: pressure: bmp280: Use i2c_get_match_data() Date: Sun, 22 Oct 2023 19:22:17 +0200 Message-ID: <0554ddae62ba04ccacf58c2de04ec598c876665e.1697994521.git.ang.iglesiasg@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 22 Oct 2023 10:23:26 -0700 (PDT) From: Biju Das Replace device_get_match_data() and id lookup for retrieving match data by i2c_get_match_data(). Signed-off-by: Biju Das Reviewed-by: Andy Shevchenko diff --git a/drivers/iio/pressure/bmp280-i2c.c b/drivers/iio/pressure/bmp280-i2c.c index dbe630ad05b5..b3e069730f97 100644 --- a/drivers/iio/pressure/bmp280-i2c.c +++ b/drivers/iio/pressure/bmp280-i2c.c @@ -11,9 +11,7 @@ static int bmp280_i2c_probe(struct i2c_client *client) const struct bmp280_chip_info *chip_info; const struct i2c_device_id *id = i2c_client_get_device_id(client); - chip_info = device_get_match_data(&client->dev); - if (!chip_info) - chip_info = (const struct bmp280_chip_info *) id->driver_data; + chip_info = i2c_get_match_data(client); regmap = devm_regmap_init_i2c(client, chip_info->regmap_config); if (IS_ERR(regmap)) { -- 2.42.0