Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp432870lqt; Thu, 6 Jun 2024 07:51:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXvXgDrnyBo4RGw4VcndxXJ52r5WsKCbastOtbz9FXstgpuDaYyDBwpVr1BAqg2zY8Q+F33+HbymMPz2RX0kSQSm6OriU/uyth+QpqwWw== X-Google-Smtp-Source: AGHT+IF9l2S1gOt8ULjN3sF9/ved7pBw0WSahZjhExefa9dBh+iTGI04QLPE9ATUeb/ZT2pl5gZa X-Received: by 2002:a50:bac8:0:b0:578:6198:d6fa with SMTP id 4fb4d7f45d1cf-57a8b6740a0mr3923081a12.2.1717685490062; Thu, 06 Jun 2024 07:51:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717685490; cv=pass; d=google.com; s=arc-20160816; b=VsfWZJDz5RqIswUFTdqW8+O412jYwTC0Z38amOk0xZkigGfFUwcqYZ8ddbTVF5FVcV SsVjN3NeIscrFOPjIpr769bIUzXa8K0Knp+BKLWWtS2yMHgZgQMrRrIWP0Vp+eknhpyK FV6KtmFZKuBtz9W8QMQtejXPy1CvWPXT9mnukOQ9m7tulti6xpnIMz4CIkYc1MzTq9VZ ZPp9bhmADCsaiVR5g3YWoNLNtKjQCyFL3b4NMsJ3RarFxSryAyb7n1R6FWPgaqG6a9Tl xRMkeTHidORXBkzCPvVf8f8bo/aWKQ/pgQlQck3inqT/mZNo0E9wKKWAUYJHo2N2U+rb VTYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=PVtqnXLiuL7l3W2O7J4uf50LECKlp3bPPW+XuGMKMgU=; fh=9sodtqQIxV14yJh/nz2fIN7oUZ59y2BCn+PNVOktgmU=; b=BVni3H312sQzunvNy2LKaawHAVQoCHZzkX9yXR1V7O1nMOjAOFDvAdhrc3hWz9rzav hy+S0bwNgCCJ9cEor8c27qBRq2RjIduri0vFYihxafV5YEkdrjt9K4+u4e69hBKjunSk ubI3Es7c0PYc8bA69F0y3Ern69H5ZFjH40Hxl5XUJ3yCno9CMhWn4Jia7YrW4Q0Kocg6 R/9jRN50VlcAH5PhecRpaERzK+9zzJksAebmGAGKyZISP88fmfmzFgFf66oo6BlxBNen QcO9wdHn87Rb2Lb1gehaCgc9n34Ti2cv/yvKfZyb0zSc/RyPk4KnFXUkUgCJR8hIMCi0 vaXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oRrvJRWk; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204455-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204455-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae260c5bsi756623a12.492.2024.06.06.07.51.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:51:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204455-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oRrvJRWk; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204455-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204455-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C3B311F25B44 for ; Thu, 6 Jun 2024 14:51:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBE7B1A38E0; Thu, 6 Jun 2024 14:25:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oRrvJRWk" Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0580197A81 for ; Thu, 6 Jun 2024 14:25:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683904; cv=none; b=cBi/4dlR0FPtfwOR5EUrkhD/c2aYo3CyaEN6l8zohxYwO4aoMpXejmWqLHUaBzmZhX0tIAMSrtVNS7AcQ8T+0r+ts8uY4GZWf8X/+a0YPrYmqbaNV+jYmZd1CDbFOXG6JBa78cIcnh4PpIMDEObr45S4Gdc3as5txO9lxvoBFlU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683904; c=relaxed/simple; bh=xJku9zrC1AGBM4qIss9yGk4RWlUTIUI3bVn4WgsRBgA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iOcUGGu4pR4ozHi3975GYkr8tzs3BE9khHvuiy20AMAFzdMH1QXERMY+NTNCHBqpLI3/nUECT489ezH0VAeSibi8SExshUZHN4njUKr2mWNoDtZvJxBsgR2MiTXa29frwh3DRDG0MlchQZeEvhWK1PAuq46oqlTp3/hEz9lHUyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=oRrvJRWk; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a68ee841138so127602066b.1 for ; Thu, 06 Jun 2024 07:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717683901; x=1718288701; 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=PVtqnXLiuL7l3W2O7J4uf50LECKlp3bPPW+XuGMKMgU=; b=oRrvJRWke4JT84U/lD+FVypxXgB2t9Il85RAeG6ePgzeaAlxlSbhlWdzqu9cWS1/wK /zPeemmw0dOa93mKNmgnCcxMawauflLL7SXhvbog0+EPZljuJ0kc6bCsKNJRpdTChbb1 o7Gb1GDTna3v+xfSn1vlTtbo0SGCs7DKyCZ+QYHuJx460FOokxh3nYf7QOgpky6JKIWX lrtpy27Jo+YOuU7muwZmrOZJ9uBpftJHdligPwVl2SrKw7lgGej0MZ5xyuYAWKxigK+M 2X/+eXewxjGOJ0bGDJjwq3YvkOAhywtkeggh1A4HmrAH981mU4RwypXPkTSL3RUSyq6U ZEEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717683901; x=1718288701; 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=PVtqnXLiuL7l3W2O7J4uf50LECKlp3bPPW+XuGMKMgU=; b=vyWEvuIuRRkZSa7JZJ9RseXXjvMpPA4HSz2e7czKD7c5Ak1ZqmxXSAsmDzNcTIkZlX OtspaylLOAnbWJKvoNRAybRGmIu2hjp6kJhpmC/KUiJR5Arvm3YITDRR384Dbab3zmfR RHufrdZgQBx4RpFNcB0D8mSVvuVwkunOFk7sBRcHvdFVpOl/tYBz0n1XXJWw0qhz4D0d RirsLQ+QSQQCAkfqo1yVim1neOk9O9VqhdD3nrMkjlYtsBInvPALryqWnwUCshxfKaLI C3mFbYx6Fi7ljr3Qi3u7Neie1zJkiEgm7FbP0Kx7r4WD66tlaWWsTnhh69a1WJnR6LgH xe8Q== X-Forwarded-Encrypted: i=1; AJvYcCWM1h4zAiu4Xs/WgabmlPBjWRbw51mptVzYCGZ+/txaXzhFyYCwGJjyvNB3EZFfxHiivj8zCqHQhlwjn39XFMt6adxv2KB5hxNXMEJ6 X-Gm-Message-State: AOJu0YyQBH94n9XCA8ltn0ZpzPsS3SBJCTanJn2KRiTRoVNuMGwIIr7z Luy0h7AoydZKuEh9ALiCRZD+88qc5ke4bLYcGJs8qb4z/76YG5CCcsYahlPr/EvR3udOPofRzVd YgJI7Zw== X-Received: by 2002:a17:906:840a:b0:a68:e1a8:9d2b with SMTP id a640c23a62f3a-a69a024f584mr362648366b.68.1717683901196; Thu, 06 Jun 2024 07:25:01 -0700 (PDT) Received: from krzk-bin.. ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c80582110sm104953466b.32.2024.06.06.07.25.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:25:00 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Charles Keepax , Richard Fitzgerald , patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] mfd: madera: Simplify with spi_get_device_match_data() Date: Thu, 6 Jun 2024 16:24:57 +0200 Message-ID: <20240606142457.130553-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240606142457.130553-1-krzysztof.kozlowski@linaro.org> References: <20240606142457.130553-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/madera-spi.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/mfd/madera-spi.c b/drivers/mfd/madera-spi.c index ad07ebe29e59..ce9e90322c9c 100644 --- a/drivers/mfd/madera-spi.c +++ b/drivers/mfd/madera-spi.c @@ -18,21 +18,14 @@ static int madera_spi_probe(struct spi_device *spi) { - const struct spi_device_id *id = spi_get_device_id(spi); struct madera *madera; const struct regmap_config *regmap_16bit_config = NULL; const struct regmap_config *regmap_32bit_config = NULL; - const void *of_data; unsigned long type; const char *name; int ret; - of_data = of_device_get_match_data(&spi->dev); - if (of_data) - type = (unsigned long)of_data; - else - type = id->driver_data; - + type = (unsigned long)spi_get_device_match_data(spi); switch (type) { case CS47L15: if (IS_ENABLED(CONFIG_MFD_CS47L15)) { -- 2.43.0