device: remove inclusion of pm/device.h
The device PM subsystem _depends_ on device, not vice-versa. Devices only hold a reference to struct pm_device now, and initialize this reference with the value provided in Z_DEVICE_DEFINE. This requirement can be solved with a forward struct declaration, meaning there is no need to include device PM headers. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
84cb35cc04
commit
89a4f36fc8
45 changed files with 46 additions and 3 deletions
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include <init.h>
|
||||
#include <linker/sections.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/device_mmio.h>
|
||||
#include <sys/util.h>
|
||||
|
||||
|
@ -362,6 +361,8 @@ struct device_state {
|
|||
bool initialized : 1;
|
||||
};
|
||||
|
||||
struct pm_device;
|
||||
|
||||
/**
|
||||
* @brief Runtime device structure (in ROM) per driver instance
|
||||
*/
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef ZEPHYR_INCLUDE_PM_DEVICE_H_
|
||||
#define ZEPHYR_INCLUDE_PM_DEVICE_H_
|
||||
|
||||
#include <device.h>
|
||||
#include <kernel.h>
|
||||
#include <sys/atomic.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue