Received: by 10.213.65.68 with SMTP id h4csp756361imn; Tue, 27 Mar 2018 08:12:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Mxr1VcAeTn/QBmmu2D8W9Fb+C4lxZKG2VGppW97r/WuCKlKFbfCkus16KPLUJmjDiaEa6 X-Received: by 10.98.59.139 with SMTP id w11mr9811789pfj.96.1522163579600; Tue, 27 Mar 2018 08:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522163579; cv=none; d=google.com; s=arc-20160816; b=rzeL/TW8FwaL1SmmmaKNEBVf7xAg/NwiIAMmErAucGp+KA3JAHfbsyGt59L5QaLY2s r0ql2hJmaPTkMH2Q/41zFo1iVXJBoUyVsntzGjCLMCxTEpGQXjqGEcs14HkYvq662Kj5 AERxe0UPB7/deKP1w59oo4Q8T/lyWz/KqwEAbPciKlmpKLO5Xa96bWGiiEl4AjyGi6Aj JZwHh1tBKAjJN8TZVvj2jbbAR5QjnRJkt1UuEIcVR4iPntlYODIaSEWI4xaw8syudteF tNk+dP4jBIk+/aJ0fMiKV27+A8rVYO4r7/IkSspZstb3m8ok+akQ9ZFGWhzlu0X9Ngsf oLbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=oc3h1+ooX7MeXA5fYSiTSt6rd7bh4F5nY68U8pzQPz8=; b=qST+E4o1hnp5L7VxZELaQF1C5V/FJXNQ0KwKef9eP6pULyy5mpUPjosFJL8wBgqf12 Fx32s2u/vOyrrYV5KkO2akeLUmCjMCpbDgiWBZTG56uux1NNiTWpkzbDlhUF+tUh82xE KlphEhOiiFeoejT9Ijy88GL5gku4IcZfDhtdz2F4hd6vPT0jQSJOSJR7DaUCZSa1jVLw 45ArjVVEnTJD/kzBI3SX9fkqQEksCeD5nhSv+PxwYNwDHmgwoY1jYIAY8byqkMI/2Pdc tw8MRsHizbCULoH+K+tF9C6QUjLdiXGyO8ZJr9HZdCHemGDZXLRx7dQ/9pdd0K+zeCOg MhEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r20si1029032pff.361.2018.03.27.08.12.44; Tue, 27 Mar 2018 08:12:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752832AbeC0PKy (ORCPT + 99 others); Tue, 27 Mar 2018 11:10:54 -0400 Received: from mail.bootlin.com ([62.4.15.54]:56023 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752626AbeC0PHx (ORCPT ); Tue, 27 Mar 2018 11:07:53 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id B346120722; Tue, 27 Mar 2018 17:07:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 5EBA42055C; Tue, 27 Mar 2018 17:07:50 +0200 (CEST) Date: Tue, 27 Mar 2018 17:07:51 +0200 From: Alexandre Belloni To: Sean Wang Cc: robh+dt@kernel.org, mark.rutland@arm.com, sre@kernel.org, lee.jones@linaro.org, a.zummo@towertech.it, eddie.huang@mediatek.com, devicetree@vger.kernel.org, linux-rtc@vger.kernel.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 09/16] rtc: mediatek: convert to use device managed functions Message-ID: <20180327150751.GC22441@piout.net> References: <20180323105017.GI3417@piout.net> <1522037265.18424.14.camel@mtkswgap22> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522037265.18424.14.camel@mtkswgap22> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/03/2018 at 12:07:45 +0800, Sean Wang wrote: > > > - rtc->rtc_dev = rtc_device_register("mt6397-rtc", &pdev->dev, > > > - &mtk_rtc_ops, THIS_MODULE); > > > + rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, "mt6397-rtc", > > > + &mtk_rtc_ops, THIS_MODULE); > > > > You should probably switch to devm_rtc_allocate_device() and > > rtc_register_device instead of devm_rtc_device_register. > > > > Just would like to know something details > > It seems you just encourage me to switch into the new registration > method and currently devm_rtc_device_register I used for the driver > shouldn't cause any harm. right? > It will work but it will have to be converted to rtc_register_device later anyway. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com