Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp432811lqt; Thu, 6 Jun 2024 07:51:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXzXPTpHPUcQEPueEQWgVN737dyCnCPJum9aSImx+6hPvwpyBu7+cvVNsfsC3/9b/uCovqKJmjRu1EQysQY/jupD+Ng2kwRoSpkIdYQxQ== X-Google-Smtp-Source: AGHT+IHD9vOANcUqY/p4Pb/4A+HKH1EGExwG78eNc9BSOLZJ7qNAb4aH32IPFiUrOUNL+sYk3QED X-Received: by 2002:a05:620a:1a82:b0:792:bb6e:84bd with SMTP id af79cd13be357-79523d5e585mr711969085a.29.1717685482758; Thu, 06 Jun 2024 07:51:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717685482; cv=pass; d=google.com; s=arc-20160816; b=cGtetKsumFbWKJi/nu1D0fbDxKIGufuddV04CeqEoyD+T+IOiDmATDfsMnhSW5YTaN h9dL0ehDnE44UIeOHtrFPkZXJjQK+c8ukSq0tcT5eP2tryEo+NVLLr1MEombdexQcNX9 qB8TYiGOj4KIfygjUGQbqViMhECBHLngEnox/m0w2D4dUat0K8oEqzvbOu1nQU2Thp75 w9LLF903quLWT9/KGMvUXeQOhDIqyEJd/4qiNBBB39X7epycGVB8R96YSKkPg41NqM+7 TkRZ9ocfiYgqcLIfgN8J1grDA1iTsBB6sP6OMkVmC2QyOjLcbR2gd5HPiKpMvlJhPtQ6 V3Rg== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=ULCmZTLH9n5CknDHZXV8N8Yow6DCNDPV4w3gxTOWljs=; fh=H4BpUpYj+/7jNQJOid+aeEGqzB3K4TKu3YVRnaDAOqk=; b=hGbc68Hv+s8Uqd19GTiF7NHu8g9NrADifQb7wJbBSU7MuKuofzj7iVB5tD1iOYnoBj cLytuzW+M9hemEPwasy6e4N8cxmpdk0x0yAtbK//ZMVZ+4x1DvdM3CgSrH8AuH4k/UlO GoBWjbd/otNOm/Z7MnhTbOB8NqqGYVQDdOXFBtWkB98uiMA8PQk5ePwlgHw5B6Yb8tfR UdvtrhTV4UHPYmq5xv1+fC60q9QvoGeNXl1TNOEQHIbrW/UiGDuAOwKsXW2u8+SepBHk jbO5JIaBNQ89f9d9nEfqWQko7JeXvDw27fY3Dv40FhPAbS2qnA0XFwi6xblgI9NQAHy3 RktQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u27PvCYd; 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-204454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-79538db4c31si51097385a.630.2024.06.06.07.51.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:51:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u27PvCYd; 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-204454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204454-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7C0B71C2496F for ; Thu, 6 Jun 2024 14:51:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDD71199E8D; Thu, 6 Jun 2024 14:25:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="u27PvCYd" Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 79032197A75 for ; Thu, 6 Jun 2024 14:25:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683903; cv=none; b=F/NcClhoztESPUdhw2Tmf7sg+NS6wxTtaULyvYVEGDg3UOcr5bnZQ8izr8Zf02JwJjn7ak2Y/uhbfXD69jdPEoxYwoBpKJ+9U7MbvXOW5gA8+2fVpx04dQ26uEf8pAcDUCLbQ7O6QZZ2xV24g4R0zSs22dOLCf4mlrK3VkPump0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683903; c=relaxed/simple; bh=HxuTLkBQopINQRN4REuwcUtobjjBsG1xC011iW2JoWE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=j8H1jgjCVkXr/9Xr+qYgJ9rlo7EC7PNXzUezgOW/cPAjZq5NHWMnFvYWEYncghPV/lnoGOw7XoJhSYJ19BsFwUAQHRcaR6nKdd0zLD496LMnrlzT3nrd9KHIP8epS6PzXqTzlCxKUD5pRmeyWHyK3ohxErURFdMmuExF17Cncn0= 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=u27PvCYd; arc=none smtp.client-ip=209.85.208.43 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-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-57a677d3d79so4072504a12.1 for ; Thu, 06 Jun 2024 07:25:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717683900; x=1718288700; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ULCmZTLH9n5CknDHZXV8N8Yow6DCNDPV4w3gxTOWljs=; b=u27PvCYdmKHg7SO6PBC1ShHSM1557TcaZ6o7kSdaeLSfuMsDzJNdztOujAN+vEyOHU U1oUmByhSGD7nkLlRnix1n/7N3ktQk+1HthksvTyHju5qMvKwYvL9pu39R5TMH0NDU/R e/kxmHgSG+JvsFEDnRDn5L6mXOsikm5EkHCsDamzKqTyGy1+ZWz/7BKawMKUZmg8hZlN I0htJX1aGZcO5r8CMzZHDBnmkdRyLkN51dxunvaQzi8pVdHUpneaUw62kdFx4aFHUKsC ZWMr7FhU/Z9/gQkITSnwEVzfU5mUnbZqIH5EuOqt2kq0KoWN86EOEEquW5O3TvA+R9Ln 4Pxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717683900; x=1718288700; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ULCmZTLH9n5CknDHZXV8N8Yow6DCNDPV4w3gxTOWljs=; b=DG7BH0QgD6QJ1E+4ZnWw+HaO8rve47ZpohEQIoib2n798UDZ7QSQoW0pvkpGildWGK wC7rKkZdzSrrxVdU1/VQLcM2cYrVcDCHP4pVOdVVW2wcMzK+q+nWNDR6frIpiRJwWjW3 z3UKIa0WkE2Jn+3eRWPowtTwTUzRWZt5m4B3Jo+4keVRzSRjhlBeV8HEPsSZcCuj7GAe jyluy+NLV3rG/fpQ6/kEvd7zy7yhVNWF+LkwGvHWHTlj2Swt/+19AsKS7Wp41Eb9IfEY xvORrrgxOMY3kOahkyq9tmdbrKA++Hexcor4vPKzR4ZWkJ7sRyfosI/uf97hW7qhp1P2 jd8g== X-Forwarded-Encrypted: i=1; AJvYcCUGkf88f0NYKcFZm2yb63v0mXQ+1A+Lkk/ekKNAWfmUl4LEfYvhV/IR7+S4Kt96HZKmcG/oSovlsAL9I9eCEXjH4+PeWQ2iIvBoJ/5h X-Gm-Message-State: AOJu0YxWJxtJvuy+W5pkSmauaYeuCLVfbyFjoWxuIJsUaYBG66XDh189 mrauTDfAWbFmeyupZ++Qv2c1QxF7aHhTNvr1lRqdxN+blf6ummIV1aby3WZsuqM= X-Received: by 2002:a17:906:4154:b0:a68:e268:fa30 with SMTP id a640c23a62f3a-a6c7651ad4emr200470666b.38.1717683899900; Thu, 06 Jun 2024 07:24:59 -0700 (PDT) Received: from krzk-bin.. ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c80582110sm104953466b.32.2024.06.06.07.24.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:24:59 -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 1/2] mfd: arizona: Simplify with spi_get_device_match_data() Date: Thu, 6 Jun 2024 16:24:56 +0200 Message-ID: <20240606142457.130553-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 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/arizona-spi.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/mfd/arizona-spi.c b/drivers/mfd/arizona-spi.c index de5d894ac04a..eaa2b2bc5dd0 100644 --- a/drivers/mfd/arizona-spi.c +++ b/drivers/mfd/arizona-spi.c @@ -190,19 +190,12 @@ static int arizona_spi_acpi_probe(struct arizona *arizona) static int arizona_spi_probe(struct spi_device *spi) { - const struct spi_device_id *id = spi_get_device_id(spi); - const void *match_data; struct arizona *arizona; const struct regmap_config *regmap_config = NULL; unsigned long type = 0; int ret; - match_data = device_get_match_data(&spi->dev); - if (match_data) - type = (unsigned long)match_data; - else if (id) - type = id->driver_data; - + type = (unsigned long)spi_get_device_match_data(spi); switch (type) { case WM5102: if (IS_ENABLED(CONFIG_MFD_WM5102)) -- 2.43.0