Re: [PATCH 2/3] rtc: add rtc controller support for Sophgo CV1800B SoC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28/11/2023 21:22:52+0800, jingbao qiu wrote:
> >
> > > +     ret = cv1800b_rtc_softinit(rtc);
> > > +     if (ret)
> > > +             goto err;
> > > +     cv1800b_rtc_alarm_irq_enable(&pdev->dev, 1);
> > > +     rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev);
> > > +     if (IS_ERR(rtc->rtc_dev)) {
> > > +             ret = PTR_ERR(rtc->rtc_dev);
> > > +             goto err;
> > > +     }
> > > +     rtc->rtc_dev->range_max = U32_MAX;
> > > +     rtc->rtc_dev->ops = &cv800b_rtc_ops;
> > > +
> > > +     return rtc_register_device(rtc->rtc_dev);
> 
> I find the commet of devm_rtc_device_register wirte
> “This function is deprecated, use devm_rtc_allocate_device and
> rtc_register_device instead”
> but all of code about this, they all use devm_rtc_device_register

They don't, they use devm_rtc_register_device

> function. So which one do you suggest I use?
> 
> > > +err:
> > > +     return dev_err_probe(&pdev->dev, ret, "Failed to init cv1800b rtc\n");
> >
> > Drop, just return.
> 
> ok
> 
> >
> > Best regards,
> > Krzysztof
> >
> 
> Best regards,
> Jingbao Qiu

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux