Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp803612rda; Sun, 22 Oct 2023 10:23:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHCF6xYiDn+3Em1LMjGSlMt+i4R5NgSfGWEEsUDf4d/qfFQWD7/rjNTIA/Ftrp20WLBydib X-Received: by 2002:a05:6a21:7807:b0:159:e0b9:bd02 with SMTP id be7-20020a056a21780700b00159e0b9bd02mr4971135pzc.40.1697995410997; Sun, 22 Oct 2023 10:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697995410; cv=none; d=google.com; s=arc-20160816; b=KvuDh6JC7NJ6jfQqubWbS4OFgiyo5m6ul1JQ5jOgGO3GvvN8jNFLhGOTFk7VglZgbw h3y3iewSfpfGNz0MI1wamsk3k6u1XYjxNnueW2/7SIvaHs6SA2NKMZnyExH3bPxwTBnb PzbeNzn26Y88FX3/ofXDTcQs+3/cavI2BTWOJUKFb0TI920REdUmlIWpDXnLK22HnOdG HlPN08GCT1J2iQCaQYSx6vtLyGnocrDPg4jBcrqGMOaKLBegKGPid1OxOlb87+5nQc9Y OOi8ctKe4kxY/CUd4r+qjNZ8VjOFXhSvsHZZBNKxjh7SU8wNatwTRQIClNykJPgVcWUy Jefw== 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=/Uvqm6njBSoTbqoFZ5igrrI4fi2hQcKwzs6OhXvSIfM=; fh=+3Kl5MkoC5YVxBPDNGgstMC+RqSqg2phDkuJDzWnxiQ=; b=X9t+oCjSKe+/1MrNoetlXApB97fYWC1+EE20/tYIcU/fH0LcuZG+RQHRuut/RE2PoY vFY8nVye9wpfA77N0+PPUGnff+3nTJkjc/c8xMQU+yo2HOOObKb0YII00vJmA4hOs5x8 /HsD08uYet8GVQfaIQx9q3KScNr4NL7pqtpkuPmg3uEk6FoAigN14O5TXd3JjlbMPe1/ JVMyMRLsVJFuDBLAzp7Eor3VsN5iFhzrbQxKNA+11Xhj+x5pcAZW8kwlv+eskFZkfyk0 JYfQwSndhtIZSwogvQun+W9k5+s4IQBErkmIVhzwR5lTY928CnECQTRL/tNyOhMbM/VJ szEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=O8zMeb2P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id g9-20020a170902c38900b001c71eed110esi5047893plg.254.2023.10.22.10.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 10:23:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=O8zMeb2P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 1104680A7E78; Sun, 22 Oct 2023 10:23:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231909AbjJVRXW (ORCPT + 99 others); Sun, 22 Oct 2023 13:23:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232708AbjJVRXR (ORCPT ); Sun, 22 Oct 2023 13:23:17 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C7CD119; Sun, 22 Oct 2023 10:23:15 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-32d8c2c6dfdso1616764f8f.1; Sun, 22 Oct 2023 10:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697995393; x=1698600193; 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=/Uvqm6njBSoTbqoFZ5igrrI4fi2hQcKwzs6OhXvSIfM=; b=O8zMeb2PJtBLCE2GvaMYdo6zoz4tGDBKVTYdKdE3bx8qCZ4RgmIB36iceC+FG9vuDh hZMuceKDg2D5Vx0HDSLKHHtvBmR8rLoQ8tilcWrHymwP5XCDCYQZe98IyxFLELF3kiOU dED4WBJylOVV9EbX16P4VkKQ4rKOS5gnzZoNFi7/V2M8FfOMuCAEt3o6jpGd8EGo4MKv LG3/ywz7y9bf3RynOorNu5f5mvA14ieNbjZJjj4Ddqzi9uB1voZBistgrQYIdzYLvusx yIEfReA878jbYfPrGpI0+mjbMciO6U4hnlYe8rZw+5043Ca3mHJl/HRAmt2QC1Q7Qe5s gnVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697995393; x=1698600193; 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=/Uvqm6njBSoTbqoFZ5igrrI4fi2hQcKwzs6OhXvSIfM=; b=uwbALmaW9g4SbgdaUmi6xWIBXIH0SY16sDxZXc5ws69+2oTPZxgLOA6VQMQOYREfLV zSkiEF8cqGukfAMiQO5WcL3smIehrFRiekMbSkktbou7xvDTlIcU5YbgE7IbMcZIOBOC gZNJlgu6W36tHDrxDhFvAUyQtO5TGNEkF3wId5EVZtn5E4/Gj84IJH+8wYzEIA3IR9Jg 2JQkx0CALBj/vZPMYjrj4JO1si5GBm+0uUkNtbEIrIw7zK9UT5tNMDhI/uwGlJr4IWUj CTRjC8YmL4d7Hp6zkdNrwyxWFT81N43bMb1WMNOf/a7jKpoBae5iDtXYGUXQeis0onJG wXqQ== X-Gm-Message-State: AOJu0YypB9vMzNZ8DKAdv8qtXtHAZg+XuUuGTYUvRMzy1LjB/HsEPTkm IWefBzrd2wAudbhKeOtFT1nCW87IW2Y= X-Received: by 2002:adf:eed0:0:b0:32d:9572:646e with SMTP id a16-20020adfeed0000000b0032d9572646emr5621672wrp.54.1697995393643; Sun, 22 Oct 2023 10:23:13 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 10:23:13 -0700 (PDT) From: Angel Iglesias To: linux-iio@vger.kernel.org Cc: Biju Das , linux-kernel@vger.kernel.org, Angel Iglesias , Andy Shevchenko , Jonathan Cameron , Lars-Peter Clausen , Phil Elwell , Linus Walleij , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Subject: [PATCH v2 2/5] iio: pressure: bmp280: Use spi_get_device_match_data() Date: Sun, 22 Oct 2023 19:22:18 +0200 Message-ID: <9ea8ac90b2b8a8cf45803d0435243c0bee009b37.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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 22 Oct 2023 10:23:30 -0700 (PDT) Use the spi_get_device_match_data() helper instead of device_get_match_data() and the fallback match_id logic. Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko diff --git a/drivers/iio/pressure/bmp280-spi.c b/drivers/iio/pressure/bmp280-spi.c index 1dff9bb7c4e9..2eed483a8cc4 100644 --- a/drivers/iio/pressure/bmp280-spi.c +++ b/drivers/iio/pressure/bmp280-spi.c @@ -58,9 +58,7 @@ static int bmp280_spi_probe(struct spi_device *spi) return ret; } - chip_info = device_get_match_data(&spi->dev); - if (!chip_info) - chip_info = (const struct bmp280_chip_info *) id->driver_data; + chip_info = spi_get_device_match_data(spi); regmap = devm_regmap_init(&spi->dev, &bmp280_regmap_bus, -- 2.42.0