Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp50826pxt; Wed, 4 Aug 2021 05:47:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRvEZIam6dXvKJ7lITDbeHMWgt370r0zgkf6vysG7E1Fhgijnsmtbcb9upWCmkhzSA5/yg X-Received: by 2002:a05:6e02:1a83:: with SMTP id k3mr204454ilv.150.1628081225254; Wed, 04 Aug 2021 05:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628081225; cv=none; d=google.com; s=arc-20160816; b=GHXGFzlUhO1YZszAxHeGr25/cvEtvGF9PAH2sMlBzVJJ2s0Az2JFxmAbtNjEEVfixY eB8qSGuWit5QB86p6tJyRuzZaMlf73ZC3XNl3QyZ66IRDs1BjvDEsjcLWgSypxthiTrx KYJlquUHXYZCLTSBCzXYCVRdReAyffxpP9rVUDFV7rDFNv7JYTjbrAPTG0cN30SBkDQX FoGF7NPbx7ZnqEagJmGwmOBbLwkr/DIP+a0D1AOoUHxW9P0C1LeL9kTpZt2/k0QmjGAS akg8DHaq1pCY185w9muCS4lnr+TfZ3S9vJSRFnVuh+sC/Ot8y91wPDuKCxJAqVr1jWAA m/Rw== 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; bh=IfNQzq+K2C1joto6/q/kzeV+a/9+DuwWg8/TAUHvyf4=; b=nQdUhPkMFaY9oklSlhBV8cf5GlIjZbgCMXW5R7nqdktYZcKCX4IxSxCRu27u4WRnxp VbaKN/rCN+rtOexF8GjqwA9FhzoJ6d+c74bDHZDqiFYM3cjVCgtYECbM933muv9ei+f/ BFfJs3fPlZLV4/za9Zi9+Cc+bwaRHoFtYxAsx/bvF+7BOUchH6Hf2Ei4BjpS+oMB6+hg ENQyFpZbiptmP8vuPyss79Qxoy+NjpdpAVcb93LYWGskaB55wEgeBEJTqIvrUYtxv26g RmeRSC6O8nx+Gvnq66gsHScobB+owKzO/XVhlFwg9N+iVLR6OrvcFvbqgEwG9h8db/Am H0qQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d22si2092073ioo.71.2021.08.04.05.46.41; Wed, 04 Aug 2021 05:47:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237557AbhHDKmz (ORCPT + 99 others); Wed, 4 Aug 2021 06:42:55 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:60173 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236759AbhHDKme (ORCPT ); Wed, 4 Aug 2021 06:42:34 -0400 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 65AB42000D; Wed, 4 Aug 2021 10:42:11 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/4] rtc: s5m: enable wakeup only when available Date: Wed, 4 Aug 2021 12:41:31 +0200 Message-Id: <20210804104133.5158-3-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210804104133.5158-1-alexandre.belloni@bootlin.com> References: <20210804104133.5158-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Call device_init_wakeup() only when alarms are available and the RTC is actually able to wake up the system. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-s5m.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c index ee195697e6c6..87df797758fc 100644 --- a/drivers/rtc/rtc-s5m.c +++ b/drivers/rtc/rtc-s5m.c @@ -786,8 +786,6 @@ static int s5m_rtc_probe(struct platform_device *pdev) if (ret) return ret; - device_init_wakeup(&pdev->dev, 1); - info->rtc_dev = devm_rtc_allocate_device(&pdev->dev); if (IS_ERR(info->rtc_dev)) return PTR_ERR(info->rtc_dev); @@ -805,6 +803,7 @@ static int s5m_rtc_probe(struct platform_device *pdev) info->irq, ret); return ret; } + device_init_wakeup(&pdev->dev, 1); } return devm_rtc_register_device(info->rtc_dev); -- 2.31.1