mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-01 23:53:16 -04:00
rtc: add devm_rtc_device_{register,unregister}()
These functions allow the driver core to automatically clean up any allocation made by rtc drivers. Thus it simplifies the error paths. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
51b38c62aa
commit
3e217b6602
2 changed files with 76 additions and 0 deletions
|
@ -133,7 +133,13 @@ extern struct rtc_device *rtc_device_register(const char *name,
|
|||
struct device *dev,
|
||||
const struct rtc_class_ops *ops,
|
||||
struct module *owner);
|
||||
extern struct rtc_device *devm_rtc_device_register(const char *name,
|
||||
struct device *dev,
|
||||
const struct rtc_class_ops *ops,
|
||||
struct module *owner);
|
||||
extern void rtc_device_unregister(struct rtc_device *rtc);
|
||||
extern void devm_rtc_device_unregister(struct device *dev,
|
||||
struct rtc_device *rtc);
|
||||
|
||||
extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm);
|
||||
extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue