From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C1D0C2BA83 for ; Fri, 14 Feb 2020 18:02:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 725D720848 for ; Fri, 14 Feb 2020 18:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581703376; bh=8gg111GgiL284py8cdb/2hkDji1GxlitkItG9drCMpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QL0wFQDue6/1VART5Tv/02x8/y9c9ZUSCIF4686QFlYZF8hNiVOdZ9nfp2lnl3go4 JNkdfMKWRM3k0EjimotUVmmrnuCyXwUHsBw9WiWIG/RETWvlvJ+ufrtTY4gDgZFS0v m9oGXqVk77I3Cp/t8NYOmuMiaH8JNE4ujvd664Xc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731554AbgBNSCz (ORCPT ); Fri, 14 Feb 2020 13:02:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:37254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731487AbgBNPzy (ORCPT ); Fri, 14 Feb 2020 10:55:54 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 647BD24673; Fri, 14 Feb 2020 15:55:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581695754; bh=8gg111GgiL284py8cdb/2hkDji1GxlitkItG9drCMpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LtxJ7sAPioELoyu7ihvTmGeSUtPWpLxkFftP71ZKUq4fWQJqvcdqryphNbr3u5Vxy hKlq/T/4IDO9RThN/zSNDtsyY4Ub7tQGNstJW2IPA8Zv4sMfnia47eQCSmoKzYT3WL Gu+Rizxw0yTtwsX4G9sGFNUGKmVk35m4NHFQebHI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Claudiu Beznea , Alexandre Belloni , Sasha Levin , linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.5 323/542] ARM: at91: pm: use of_device_id array to find the proper shdwc node Date: Fri, 14 Feb 2020 10:45:15 -0500 Message-Id: <20200214154854.6746-323-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214154854.6746-1-sashal@kernel.org> References: <20200214154854.6746-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Claudiu Beznea [ Upstream commit ec6e618c8c018c1361d77789a100a5f6f6317178 ] Use of_device_id array to find the proper shdwc compatibile node. SAM9X60's shdwc changes were not integrated when commit eaedc0d379da ("ARM: at91: pm: add ULP1 support for SAM9X60") was integrated. Fixes: eaedc0d379da ("ARM: at91: pm: add ULP1 support for SAM9X60") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1576062248-18514-3-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin --- arch/arm/mach-at91/pm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 03250768340e4..52665f30d236d 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -691,6 +691,12 @@ static void __init at91_pm_use_default_mode(int pm_mode) soc_pm.data.suspend_mode = AT91_PM_ULP0; } +static const struct of_device_id atmel_shdwc_ids[] = { + { .compatible = "atmel,sama5d2-shdwc" }, + { .compatible = "microchip,sam9x60-shdwc" }, + { /* sentinel. */ } +}; + static void __init at91_pm_modes_init(void) { struct device_node *np; @@ -700,7 +706,7 @@ static void __init at91_pm_modes_init(void) !at91_is_pm_mode_active(AT91_PM_ULP1)) return; - np = of_find_compatible_node(NULL, NULL, "atmel,sama5d2-shdwc"); + np = of_find_matching_node(NULL, atmel_shdwc_ids); if (!np) { pr_warn("%s: failed to find shdwc!\n", __func__); goto ulp1_default; -- 2.20.1