Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp749946lqo; Fri, 10 May 2024 13:50:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVPbwohk15yYehE4fyY7AJTe0tlIoqgKLpGtLRmKPR6/+z3CdbRahWfRU5cdxCY86V5SburQTzaxrbBIe8zU2bswoLY2m5rby5mT22/Q== X-Google-Smtp-Source: AGHT+IH4XT4J8YVK0vJvraxV5reSo89jyBMmpjxGN8tlb0Ofbai/PKXrpA/th6yDkEuHVUBKCO8x X-Received: by 2002:adf:e586:0:b0:34c:b2df:6f01 with SMTP id ffacd0b85a97d-3504a737f13mr2448947f8f.21.1715374214030; Fri, 10 May 2024 13:50:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715374213; cv=pass; d=google.com; s=arc-20160816; b=Vz3ni8HAAT1h3lT/bXbOlk/uF92IEwRqB3+Fxs+tsoIo+/BhVnBlXZ3Q+HkqQDRHnu TFPFILpWevzgNYV8SDA2nv6XZVKfzWFx6Hlms99+fvP0aTl8Woj+ucF0itC2sbJpx4l6 w3bAL0PjiHvYvRX2z5tjfNsbtJp4xgT0fUIUp9LEYAk0q3aHrnU42SQwv6xdhspdz0Pe Ji1ROIt8Ik0wXGdxSgLZGkhqAckoXlnNiL05MyXkgriOdIxTXMvtT2T9jYVNs+n5jL+X FwghFV+FPRDKU/ivfYIxShgoZhULGXWYW9DySh4WTj6p8F9IOtMJvtGFuh6w1FvmO3Z5 Pw5A== 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=t1yZ0LJBLIcXCm/i/9ATel6nfeu4yON6bpmCtP10VNQ=; fh=YFtScoUunhJmX7ZOPxGiS/33exQVzY/px3W6mPQEyC4=; b=PNe0EFfxc2MIsyF+MomsX8LtLMRwUt9BeUJKArkEhX7CA96hHbWLkukjjkpQYLRTay Y38VpRTyaA3EIcGNaTOukOrXit53/oJr+Qo8lm1eDDWAOEPbvfEX6Punr+onOGb7sX6w joQtEJq0pn07vvaqEHAfJ/Ml0UOUPMpxMZP2xrpphP7+RTMgSlXr7TJLzUCcoOIcNaYn REdPfT8GV+NjLnQ7w7lMjUQt1l295VQ4OXKjBdyQSzYRR0drCdW+NUcM5dL+BZKCkIgI yuy9mnzIuORQqxMOxIaGNJcxsi/S7SR2NSQNvnEh6zqCdS7eAYPytdC6TGdxqe8alfsQ JoqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="VH1hnD/E"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-176180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba57d7si219767366b.656.2024.05.10.13.50.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 13:50:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176180-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=@intel.com header.s=Intel header.b="VH1hnD/E"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-176180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 B76431F22936 for ; Fri, 10 May 2024 20:50:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6658C502B7; Fri, 10 May 2024 20:49:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VH1hnD/E" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04B06502A4; Fri, 10 May 2024 20:49:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715374197; cv=none; b=J1KwfbV1UK3vSvQ7X2HI+qI0M8FamDMwN/LtjGng2hvrGP2U1apscH5GEo+gB6npp79eEc2i8WkHo/KSm2rI9RxTQAvYSBdJdKV/Z64+/eI347cbUKujaIwaq0NyOUw24qAkdj8ByOLg+oDc3u2pBlQKevC44dNq7+iSQhkucuc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715374197; c=relaxed/simple; bh=Yoxu8R4D5J5wOW5Ijg3h7ziEYhdhvaInl9RinJXk/io=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PSY2oUKIW/8yT2h7UcSmzFl348tf6iE5lISJ+ERyR8S9ISOBZAl4g0VP/7dRqpy3zHxgG/OqXlThzcDB1NE88t798qdaTBKkBLAbRY+6LilOWs/Kry5RNaKhLSJ5R6+SGYKogdlYSldFDbirTqqXTtG4NNhHQCZyeAnUPtKPxKk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VH1hnD/E; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715374196; x=1746910196; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Yoxu8R4D5J5wOW5Ijg3h7ziEYhdhvaInl9RinJXk/io=; b=VH1hnD/ERE7f+BK4/jvHbKocIw/e9d9JEYPU+XlwqoX7LIrdlaVukcX3 XTvmTyDkMfaXsHwGo+ERbdcAub28hbZVsaXnuFDrL4XS0l1DdeeJxfr9P jDrQq2IceAPimfvfd/B3Y3VZuvyFycwGUNnQQnIGvPcKQIHAs94qhU0H7 sHj+/L67Jr2c0xVePHFo84rXT767i6R07WmN2YTGvIEqo0BTspMIAl4JX wETr0OTVTzaQZU8nDInardlRK37igR5O2h0AbzK7m4k1wPJ+nYQ6+x2B/ T3LQ8gWekl85IJlWRXcUDgnDqoE33YnFHgZdOjSCUhnLTBIbEm02C+KVJ g==; X-CSE-ConnectionGUID: jAfaQIF4RMqPkT445wR37g== X-CSE-MsgGUID: LEBCyp7HSmSI0X+/5vZeMQ== X-IronPort-AV: E=McAfee;i="6600,9927,11069"; a="15208008" X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="15208008" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 13:49:56 -0700 X-CSE-ConnectionGUID: PMZnT4agQo+msyYF5DyFCA== X-CSE-MsgGUID: aIxpdFNVSjORdayIO6dZzQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,151,1712646000"; d="scan'208";a="30292540" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa007.jf.intel.com with ESMTP; 10 May 2024 13:49:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 11E0B1AC; Fri, 10 May 2024 23:49:53 +0300 (EEST) From: Andy Shevchenko To: Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 1/1] spi: Replace custom code with device_match_acpi_handle() Date: Fri, 10 May 2024 23:49:52 +0300 Message-ID: <20240510204952.2582093-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Since driver core provides a generic device_match_acpi_handle() we may replace the custom code with it. Signed-off-by: Andy Shevchenko --- drivers/spi/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index ef0027b9cae5..b2efd4964f7c 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2712,7 +2712,7 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data) return -ENODEV; if (ctlr) { - if (ACPI_HANDLE(ctlr->dev.parent) != parent_handle) + if (!device_match_acpi_handle(ctlr->dev.parent, parent_handle)) return -ENODEV; } else { struct acpi_device *adev; @@ -2811,7 +2811,7 @@ struct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr, if (!lookup.max_speed_hz && ACPI_SUCCESS(acpi_get_parent(adev->handle, &parent_handle)) && - ACPI_HANDLE(lookup.ctlr->dev.parent) == parent_handle) { + device_match_acpi_handle(lookup.ctlr->dev.parent, parent_handle)) { /* Apple does not use _CRS but nested devices for SPI slaves */ acpi_spi_parse_apple_properties(adev, &lookup); } -- 2.43.0.rc1.1336.g36b5255a03ac