pm: device: remove pointer usage for state
Since the state is no longer modified by the device PM callback, just use the state value. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
9e7d545bb4
commit
11eef4d8c8
41 changed files with 100 additions and 100 deletions
|
@ -500,12 +500,12 @@ static int st7735r_enter_sleep(struct st7735r_data *data)
|
|||
}
|
||||
|
||||
static int st7735r_pm_control(const struct device *dev,
|
||||
enum pm_device_state *state)
|
||||
enum pm_device_state state)
|
||||
{
|
||||
int ret = 0;
|
||||
struct st7735r_data *data = (struct st7735r_data *)dev->data;
|
||||
|
||||
if (*state == PM_DEVICE_STATE_ACTIVE) {
|
||||
if (state == PM_DEVICE_STATE_ACTIVE) {
|
||||
ret = st7735r_exit_sleep(data);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
|
|
|
@ -402,11 +402,11 @@ static void st7789v_enter_sleep(struct st7789v_data *data)
|
|||
}
|
||||
|
||||
static int st7789v_pm_control(const struct device *dev,
|
||||
enum pm_device_state *state)
|
||||
enum pm_device_state state)
|
||||
{
|
||||
struct st7789v_data *data = (struct st7789v_data *)dev->data;
|
||||
|
||||
if (*state == PM_DEVICE_STATE_ACTIVE) {
|
||||
if (state == PM_DEVICE_STATE_ACTIVE) {
|
||||
st7789v_exit_sleep(data);
|
||||
} else {
|
||||
st7789v_enter_sleep(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue