@@ -549,8 +549,6 @@ static int gpio_pcal9535a_init(struct device *dev)
549549 }
550550 drv_data -> i2c_master = i2c_master ;
551551
552- dev -> driver_api = & gpio_pcal9535a_drv_api_funcs ;
553-
554552 return 0 ;
555553}
556554
@@ -571,10 +569,11 @@ static struct gpio_pcal9535a_drv_data gpio_pcal9535a_0_drvdata = {
571569};
572570
573571/* This has to init after I2C master */
574- DEVICE_INIT (gpio_pcal9535a_0 , CONFIG_GPIO_PCAL9535A_0_DEV_NAME ,
572+ DEVICE_AND_API_INIT (gpio_pcal9535a_0 , CONFIG_GPIO_PCAL9535A_0_DEV_NAME ,
575573 gpio_pcal9535a_init ,
576574 & gpio_pcal9535a_0_drvdata , & gpio_pcal9535a_0_cfg ,
577- POST_KERNEL , CONFIG_GPIO_PCAL9535A_INIT_PRIORITY );
575+ POST_KERNEL , CONFIG_GPIO_PCAL9535A_INIT_PRIORITY ,
576+ & gpio_pcal9535a_drv_api_funcs );
578577
579578#endif /* CONFIG_GPIO_PCAL9535A_0 */
580579
@@ -595,10 +594,11 @@ static struct gpio_pcal9535a_drv_data gpio_pcal9535a_1_drvdata = {
595594};
596595
597596/* This has to init after I2C master */
598- DEVICE_INIT (gpio_pcal9535a_1 , CONFIG_GPIO_PCAL9535A_1_DEV_NAME ,
597+ DEVICE_AND_API_INIT (gpio_pcal9535a_1 , CONFIG_GPIO_PCAL9535A_1_DEV_NAME ,
599598 gpio_pcal9535a_init ,
600599 & gpio_pcal9535a_1_drvdata , & gpio_pcal9535a_1_cfg ,
601- POST_KERNEL , CONFIG_GPIO_PCAL9535A_INIT_PRIORITY );
600+ POST_KERNEL , CONFIG_GPIO_PCAL9535A_INIT_PRIORITY ,
601+ & gpio_pcal9535a_drv_api_funcs );
602602
603603#endif /* CONFIG_GPIO_PCAL9535A_1 */
604604
@@ -619,10 +619,11 @@ static struct gpio_pcal9535a_drv_data gpio_pcal9535a_2_drvdata = {
619619};
620620
621621/* This has to init after I2C master */
622- DEVICE_INIT (gpio_pcal9535a_2 , CONFIG_GPIO_PCAL9535A_2_DEV_NAME ,
622+ DEVICE_AND_API_INIT (gpio_pcal9535a_2 , CONFIG_GPIO_PCAL9535A_2_DEV_NAME ,
623623 gpio_pcal9535a_init ,
624624 & gpio_pcal9535a_2_drvdata , & gpio_pcal9535a_2_cfg ,
625- POST_KERNEL , CONFIG_GPIO_PCAL9535A_INIT_PRIORITY );
625+ POST_KERNEL , CONFIG_GPIO_PCAL9535A_INIT_PRIORITY ,
626+ & gpio_pcal9535a_drv_api_funcs );
626627
627628#endif /* CONFIG_GPIO_PCAL9535A_2 */
628629
@@ -643,9 +644,10 @@ static struct gpio_pcal9535a_drv_data gpio_pcal9535a_3_drvdata = {
643644};
644645
645646/* This has to init after I2C master */
646- DEVICE_INIT (gpio_pcal9535a_3 , CONFIG_GPIO_PCAL9535A_3_DEV_NAME ,
647+ DEVICE_AND_API_INIT (gpio_pcal9535a_3 , CONFIG_GPIO_PCAL9535A_3_DEV_NAME ,
647648 gpio_pcal9535a_init ,
648649 & gpio_pcal9535a_3_drvdata , & gpio_pcal9535a_3_cfg ,
649- POST_KERNEL , CONFIG_GPIO_PCAL9535A_INIT_PRIORITY );
650+ POST_KERNEL , CONFIG_GPIO_PCAL9535A_INIT_PRIORITY ,
651+ & gpio_pcal9535a_drv_api_funcs );
650652
651653#endif /* CONFIG_GPIO_PCAL9535A_3 */
0 commit comments