* Register a device with PM feature * * @param device the device with PM feature * @param ops the PM ops for device */
| 813 | * @param ops the PM ops for device |
| 814 | */ |
| 815 | void rt_pm_device_register(struct rt_device *device, const struct rt_device_pm_ops *ops) |
| 816 | { |
| 817 | struct rt_device_pm *device_pm; |
| 818 | |
| 819 | device_pm = RT_KERNEL_MALLOC(sizeof(struct rt_device_pm)); |
| 820 | if (device_pm != RT_NULL) |
| 821 | { |
| 822 | rt_slist_append(&_pm.device_list, &device_pm->list); |
| 823 | device_pm->device = device; |
| 824 | device_pm->ops = ops; |
| 825 | } |
| 826 | } |
| 827 | |
| 828 | /** |
| 829 | * Unregister device from PM manager. |
no test coverage detected