On 07/08/2019 21:23:57-0700, Kevin Hilman wrote: > +static int meson_vrtc_probe(struct platform_device *pdev) > +{ > + struct meson_vrtc_data *vrtc; > + struct resource *res; > + > + vrtc = devm_kzalloc(&pdev->dev, sizeof(*vrtc), GFP_KERNEL); > + if (!vrtc) > + return -ENOMEM; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + vrtc->io_alarm = devm_ioremap_resource(&pdev->dev, res); You could use devm_platform_ioremap_resource. > + if (IS_ERR(vrtc->io_alarm)) > + return PTR_ERR(vrtc->io_alarm); > + > + device_init_wakeup(&pdev->dev, 1); > + > + platform_set_drvdata(pdev, vrtc); > + > + vrtc->rtc = devm_rtc_device_register(&pdev->dev, "meson-vrtc", > + &meson_vrtc_ops, THIS_MODULE); Please use devm_rtc_allocate_device and rtc_register_device. > + if (IS_ERR(vrtc->rtc)) > + return PTR_ERR(vrtc->rtc); > + > + return 0; > +} > + -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com