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
|
@ -248,14 +248,14 @@ static int spi_cc13xx_cc26xx_set_power_state(const struct device *dev,
|
|||
}
|
||||
|
||||
static int spi_cc13xx_cc26xx_pm_control(const struct device *dev,
|
||||
enum pm_device_state *state)
|
||||
enum pm_device_state state)
|
||||
{
|
||||
int ret = 0;
|
||||
enum pm_device_state curr_state;
|
||||
|
||||
(void)pm_device_state_get(dev, &curr_state);
|
||||
if (*state != curr_state) {
|
||||
ret = spi_cc13xx_cc26xx_set_power_state(dev, *state);
|
||||
if (state != curr_state) {
|
||||
ret = spi_cc13xx_cc26xx_set_power_state(dev, state);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue