diff --git a/drivers/gpio/gpio_stm32.c b/drivers/gpio/gpio_stm32.c index d3b5411a5c6..d3e700cbe3f 100644 --- a/drivers/gpio/gpio_stm32.c +++ b/drivers/gpio/gpio_stm32.c @@ -717,6 +717,6 @@ static int gpio_stm32_afio_init(const struct device *dev) return 0; } -SYS_DEVICE_DEFINE("gpio_stm32_afio", gpio_stm32_afio_init, NULL, PRE_KERNEL_1, 0); +SYS_DEVICE_DEFINE("gpio_stm32_afio", gpio_stm32_afio_init, PRE_KERNEL_1, 0); #endif /* CONFIG_SOC_SERIES_STM32F1X && !CONFIG_GPIO_STM32_SWJ_ENABLE */ diff --git a/drivers/timer/sys_clock_init.c b/drivers/timer/sys_clock_init.c index 1caaf3e02d9..c280daabe65 100644 --- a/drivers/timer/sys_clock_init.c +++ b/drivers/timer/sys_clock_init.c @@ -30,12 +30,6 @@ int __weak sys_clock_driver_init(const struct device *dev) return 0; } -int __weak sys_clock_device_ctrl(const struct device *dev, - enum pm_device_action action) -{ - return -ENOSYS; -} - void __weak sys_clock_set_timeout(int32_t ticks, bool idle) { } @@ -48,5 +42,5 @@ void __weak sys_clock_disable(void) { } -SYS_DEVICE_DEFINE("sys_clock", sys_clock_driver_init, sys_clock_device_ctrl, +SYS_DEVICE_DEFINE("sys_clock", sys_clock_driver_init, PRE_KERNEL_2, CONFIG_SYSTEM_CLOCK_INIT_PRIORITY); diff --git a/include/device.h b/include/device.h index ba6e6dac5c3..fe50602049c 100644 --- a/include/device.h +++ b/include/device.h @@ -83,16 +83,14 @@ typedef int16_t device_handle_t; /** * @def SYS_DEVICE_DEFINE * - * @brief Run an initialization function at boot at specified priority, - * and define device PM control function. + * @brief Run an initialization function at boot at specified priority. * * @details Invokes DEVICE_DEFINE() with no power management support * (@p pm_action_cb), no API (@p api_ptr), and a device name derived from * the @p init_fn name (@p dev_name). */ -#define SYS_DEVICE_DEFINE(drv_name, init_fn, pm_action_cb, level, prio) \ - DEVICE_DEFINE(Z_SYS_NAME(init_fn), drv_name, init_fn, \ - pm_action_cb, \ +#define SYS_DEVICE_DEFINE(drv_name, init_fn, level, prio) \ + DEVICE_DEFINE(Z_SYS_NAME(init_fn), drv_name, init_fn, NULL, \ NULL, NULL, level, prio, NULL) /** diff --git a/samples/bluetooth/hci_spi/src/main.c b/samples/bluetooth/hci_spi/src/main.c index 41100be9df6..9fc9fbbe9e1 100644 --- a/samples/bluetooth/hci_spi/src/main.c +++ b/samples/bluetooth/hci_spi/src/main.c @@ -279,7 +279,7 @@ static int hci_spi_init(const struct device *unused) return 0; } -SYS_DEVICE_DEFINE("hci_spi", hci_spi_init, NULL, +SYS_DEVICE_DEFINE("hci_spi", hci_spi_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); void main(void) diff --git a/samples/bluetooth/hci_uart/src/main.c b/samples/bluetooth/hci_uart/src/main.c index 8ed95b4f489..5f963b30cfb 100644 --- a/samples/bluetooth/hci_uart/src/main.c +++ b/samples/bluetooth/hci_uart/src/main.c @@ -343,7 +343,7 @@ static int hci_uart_init(const struct device *unused) return 0; } -SYS_DEVICE_DEFINE("hci_uart", hci_uart_init, NULL, +SYS_DEVICE_DEFINE("hci_uart", hci_uart_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE); void main(void)