# Re: \[PATCH v3 14/16\] rtc: utilize new cdev\_device\_add helper function

- From: Alexandre Belloni \<hidden\>
- Date: 2017-03-07 22:41:35 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2017/03/119378
- Thread: https://ratatoskr.run/linux-fsdevel/2017/03/119378/t.md

```text
On 06/03/2017 at 00:04:30 -0700, Logan Gunthorpe wrote:
> Mostly straightforward, but we had to remove the rtc_dev_add/del_device
> functions as they split up the cdev_add and the device_add.
> 
> Doing this also revealed that there was likely another subtle bug:
> seeing cdev_add was done after device_register, the cdev probably
> was not ready before device_add when the uevent occurs. This would
> race with userspace, if it tried to use the device directly after
> the uevent. This is fixed just by using the new helper function.
> 
> Signed-off-by: Logan Gunthorpe <redacted>

I think I already acked v2 but
Acked-by: Alexandre Belloni <redacted>

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
```
