Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4270105pxb; Tue, 17 Nov 2020 16:30:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyk9qGL1f5/PuuDKxxdEz7vFMTu78ZUrqeU0niPtew8cjBC9RE/RKXL+cBDis6muOL9hcLN X-Received: by 2002:a17:906:d9dd:: with SMTP id qk29mr22390509ejb.487.1605659432649; Tue, 17 Nov 2020 16:30:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605659432; cv=none; d=google.com; s=arc-20160816; b=QulKKB8eycFbvmZntGkQYnyQFYh9XzHP62qEKxhFuro3fSNo0ugq2WdNrbV3ElvQWr WgxHM0sc/FuCyN/J6O0Q61vkvhkYc/tNEZB6vD1NA/oyYLYcpJWhAvqj+cMGP1tLvzfq LKOEPNf9StrK0uztP5LR6GqH4PVHQUbEOAnhrQW2KbcBVRKjQdMU0kdRJV0INM8XbfZn /YhCQeR1g8iZCxhNl8r5pWGM8TG75PENezniL1xrCw92fbGZnF9lPGyCMOonufuQ7FDP NSoI/wrmgzYNH3rfYrmgR1y4wBcYBP+vC4PGmxJ1g1ogokJ0fn2WA2FwnUGgpTx6dECN tBlQ== 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=4Yq/MZemwHwPljanzme07Ilt2B9JHjC9hQwDcZDaQfA=; b=Mx1YvWiCYq2MI2yZzS5A1AKCrCCf2tnX2i7pPxc2qL1r+QTa5859Smm+/3fJHW8sE1 2p3yXyui14JwzDCWhpH6X1tVNnBTRMhYJwMVgwvvhAd+006a4BP9NfrFcfAAfmwjHAVB 3JU2oJwGHSGq4VMz/cH+0AvGIoNCvaTVZllMFO8joVnLzjBdHK5U8ul7kyk7um8dLWAk JPCfBHPokrNlnrP0SGdPvjnBTGflnvHzmSeNtF4AWYybr7Qne2A4pmf3BYNj98q7e9Gn 6offKe42m89f/CfJkj0P8zvaZSYSYtP76r6GDeRic9Rwk5tekPrSoSn6iM43lqoYs/QF poEw== 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 d8si15101973edn.471.2020.11.17.16.30.10; Tue, 17 Nov 2020 16:30:32 -0800 (PST) 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 S1726592AbgKRA1x (ORCPT + 99 others); Tue, 17 Nov 2020 19:27:53 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:35327 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgKRA1x (ORCPT ); Tue, 17 Nov 2020 19:27:53 -0500 X-Originating-IP: 86.194.74.19 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id D98ACC0007; Wed, 18 Nov 2020 00:27:50 +0000 (UTC) From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] rtc: pcf8523: switch to devm_rtc_allocate_device Date: Wed, 18 Nov 2020 01:27:45 +0100 Message-Id: <20201118002747.1346504-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.28.0 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-pcf8523.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-pcf8523.c b/drivers/rtc/rtc-pcf8523.c index 57d351dfe272..b525998cd70e 100644 --- a/drivers/rtc/rtc-pcf8523.c +++ b/drivers/rtc/rtc-pcf8523.c @@ -356,12 +356,13 @@ static int pcf8523_probe(struct i2c_client *client, if (err < 0) return err; - rtc = devm_rtc_device_register(&client->dev, DRIVER_NAME, - &pcf8523_rtc_ops, THIS_MODULE); + rtc = devm_rtc_allocate_device(&client->dev); if (IS_ERR(rtc)) return PTR_ERR(rtc); - return 0; + rtc->ops = &pcf8523_rtc_ops; + + return devm_rtc_register_device(rtc); } static const struct i2c_device_id pcf8523_id[] = { -- 2.28.0