Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp58705pxt; Wed, 4 Aug 2021 05:59:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwADOnIi2X9OkWCCczBPQH1T24s9mSlW42W1xE4c1kkmrrHXZD6OyqU2O/PdoZQru4UvFuh X-Received: by 2002:a17:906:72ce:: with SMTP id m14mr24753784ejl.394.1628081955107; Wed, 04 Aug 2021 05:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628081955; cv=none; d=google.com; s=arc-20160816; b=SuT0ce6ReCoD7th1JWn3xHWNwQJ0qLFUaWFRz9fivzsYzLi0P3AgBdJgrLSUq3usU/ XCgC3CiOzas+k/kIuo24rV5WhSqpaR/8Fo1w6888+l/TXIPzsxpOs+9boyqxfh6B5GKv F9EF1W9JifVkXWpo3nWXIQS8QjS5UKuC1k14fCdxzjtNUBBxC2Sha4KS5M68I7M9pP7G 0uOQO892Ntyjs7rd7SHf4lhcaEjCY/CBgm7cQIGpeesOJq8HCGa1sGYB39uz+IWBpeWj WYp11dTZGmqNk3dikg2VllqC4VSIpU7nazAQG7VbUSSqZilk02f+x/vNWotNRyOi9o8x FAoA== 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 :message-id:date:subject:cc:to:from; bh=t0EHbGhlIN9lHsa9kItVMsJs4g10L2zJAAzUfjK5lKo=; b=yBi3Hy8T7JPKaE6GPA8cjVy+1D6HvmXHPTMiT1YXDEKcKITzw9hzIiAKdi+GZDzvoF /u3QudRKHIXI0Gp1E4KaJSPhFUZQ88FF6/R8uIKchZVidpVIQVooVKMR7dJDVl2Xfa9Z y5jEzibhTj+gaQTE2chSvhHF2+2iADY9UkADxcww5Oh0GjxOKtykVm3tp/kNEyhHnKhk VbzDzSxvxShL7s1+XeRBIN+EVoN4118GY9xtmDTV5K3oDtcX1TvJ47638zVEOS/1nhm5 Ts3zfom94aMI1KmdcDnvwuZuP8DDtWtoLkgu/Cu3eg87VQds8dBsUPoINiMY+ezSfxLr DJBg== 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 s23si2067625ejj.684.2021.08.04.05.58.48; Wed, 04 Aug 2021 05:59:15 -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 S237576AbhHDKnI (ORCPT + 99 others); Wed, 4 Aug 2021 06:43:08 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:46251 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237508AbhHDKme (ORCPT ); Wed, 4 Aug 2021 06:42:34 -0400 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id B5522200004; Wed, 4 Aug 2021 10:41:50 +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 1/4] rtc: s5m: switch to devm_rtc_allocate_device Date: Wed, 4 Aug 2021 12:41:29 +0200 Message-Id: <20210804104133.5158-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch to devm_rtc_allocate_device/devm_rtc_register_device, this allows for further improvement of the driver. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-s5m.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c index 6b56f8eacba6..4c1596c55de8 100644 --- a/drivers/rtc/rtc-s5m.c +++ b/drivers/rtc/rtc-s5m.c @@ -788,12 +788,16 @@ static int s5m_rtc_probe(struct platform_device *pdev) device_init_wakeup(&pdev->dev, 1); - info->rtc_dev = devm_rtc_device_register(&pdev->dev, "s5m-rtc", - &s5m_rtc_ops, THIS_MODULE); - + info->rtc_dev = devm_rtc_allocate_device(&pdev->dev); if (IS_ERR(info->rtc_dev)) return PTR_ERR(info->rtc_dev); + info->rtc_dev->ops = &s5m_rtc_ops; + + err = devm_rtc_register_device(info->rtc_dev); + if (err) + return err; + if (!info->irq) { dev_info(&pdev->dev, "Alarm IRQ not available\n"); return 0; -- 2.31.1