Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp612024pxp; Wed, 9 Mar 2022 09:05:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4fulCwtwyIbfbQ5WXA3cjUZVdqJ8M+kxGonFOcjWRBrvilXe7ZcM5HwqCnDh089T58geV X-Received: by 2002:a63:e716:0:b0:380:85d1:656c with SMTP id b22-20020a63e716000000b0038085d1656cmr546985pgi.321.1646845544139; Wed, 09 Mar 2022 09:05:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646845544; cv=none; d=google.com; s=arc-20160816; b=zMeYfq6iQ7iEXE1PR3GTdM9dmtBXeBPOn1agM0Pq7qH4sxaGSezYdSUSOT4hJ6XOEk tQXsOd20Aa8POl/CbPIiQ0zwzKeQnkrlLLQOMVEp1l3xtplZVY8i5ZkvzZTC1E67mT+x rc4YyWIGyM0Gw888dkBcJwbkF/2ZYDDnnj35ibS424gwNd9zUPrcW4sJlSymGUKs471L g75HhRTqnLX1B1I62AKNUMqkG00qt+eTxm8tSkgwlmqidpsTUx+aAfeFgHf94h+kP8J8 B/jH82bB0M7Yjpbmvx1bOn6E3PQJ4wmdVnZ9sHMzFdfLXSZWAhAyAipaSMtWtp+zXXLa Ynow== 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 :dkim-signature; bh=EEPSbW9S4d2L35mbOYIMHxYeEfgjpCAR1ZuLCMs0vvE=; b=s9iC/gXx/vqPnfNcrz9j93HI6QhWgTku69rbvcLOtEcOK7OsLWeXeBz1UgHD4NaID0 R8rzi0fIcchdpK01UjVJmgQIlaMWpFy1nXrceMhcVJXxMz24ku1ow6OvY+Fi5IVIYoI2 9mcx/hM9pAE0b7ndyGGqhHvaTTsLbBKvDcZxt7JpLlS85ND0sDk984C3op97ZiKcKCaY XS02i8zEYAJAlXomAxht2AMYUOZYGq/zbpOf/8Lt0md3Myhc60r/Unbr1SQT3emhfrx6 DV8CHeIbs2CclXoVjZU+Hv38jFuya0oPN3efCc9DMjW9MCvhAZvHmtXHq3/wV9JnloTY O/Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=VGyCHZL3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h7-20020a056a00230700b004f704ae0489si2570907pfh.14.2022.03.09.09.05.25; Wed, 09 Mar 2022 09:05:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=VGyCHZL3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236657AbiCIQr5 (ORCPT + 99 others); Wed, 9 Mar 2022 11:47:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236798AbiCIQaO (ORCPT ); Wed, 9 Mar 2022 11:30:14 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DBE6C1172; Wed, 9 Mar 2022 08:23:38 -0800 (PST) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 7EF08E000B; Wed, 9 Mar 2022 16:23:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1646843014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EEPSbW9S4d2L35mbOYIMHxYeEfgjpCAR1ZuLCMs0vvE=; b=VGyCHZL3Y8HGCs4fwbr360lrpNe3EBRtoAAl7M8fFalidHko51klB1xnMggG7Hkb+OzwJc Jqald3bNvBj/pOd1qtGv9QXh8cWlGzWWLuwZu3SCLNgZFy58YcYDV1Oqb2ABpwxCe15yeR unGqq/iHozFdYTkj0CkI+toEoYn5jnXthIpJHmjGtd+sILxco7uCqQCn74fdtcoWM+KV9D BxtOPzpBKatEBm+VvCkFpMTYDhsaaL+OwyzzE/3Vk9hnk7lH0IxYBrSBFyKys5ylXboc1Z r811m2rr9d0Djjo9neDNUcYkR21N9aVYT+DDV8k9bjJi4DHFQVdi2xa8N/I2PA== From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 23/29] rtc: efi: switch to devm_rtc_allocate_device Date: Wed, 9 Mar 2022 17:22:54 +0100 Message-Id: <20220309162301.61679-23-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220309162301.61679-1-alexandre.belloni@bootlin.com> References: <20220309162301.61679-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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-efi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c index 138c5e0046c8..0c0e382c22e2 100644 --- a/drivers/rtc/rtc-efi.c +++ b/drivers/rtc/rtc-efi.c @@ -261,15 +261,16 @@ static int __init efi_rtc_probe(struct platform_device *dev) if (efi.get_time(&eft, &cap) != EFI_SUCCESS) return -ENODEV; - rtc = devm_rtc_device_register(&dev->dev, "rtc-efi", &efi_rtc_ops, - THIS_MODULE); + rtc = devm_rtc_allocate_device(&dev->dev); if (IS_ERR(rtc)) return PTR_ERR(rtc); - rtc->uie_unsupported = 1; platform_set_drvdata(dev, rtc); - return 0; + rtc->ops = &efi_rtc_ops; + rtc->uie_unsupported = 1; + + return devm_rtc_register_device(rtc); } static struct platform_driver efi_rtc_driver = { -- 2.35.1