fix sim:bluetooth compiler error (#18)

wireless/bluetooth/bt_null.c:274:10: warning: implicit declaration of function 'bt_driver_register'; did you mean 'bt_netdev_register'? [-Wimplicit-function-declaration]

   return bt_driver_register(&g_bt_null);

sim_bringup.c:324:9: error: too few arguments to function 'bt_netdev_register'

   ret = bt_netdev_register();
This commit is contained in:
Xiang Xiao 2019-12-31 09:30:44 -06:00 committed by patacongo
parent 90c52e6f8f
commit 3187dde36c
5 changed files with 6 additions and 20 deletions

View File

@ -79,7 +79,7 @@ int sim_bringup(void)
#ifdef CONFIG_RAMMTD #ifdef CONFIG_RAMMTD
FAR uint8_t *ramstart; FAR uint8_t *ramstart;
#endif #endif
int ret; int ret = OK;
#ifdef CONFIG_FS_BINFS #ifdef CONFIG_FS_BINFS
/* Mount the binfs file system */ /* Mount the binfs file system */
@ -300,7 +300,6 @@ int sim_bringup(void)
} }
#endif #endif
#ifdef CONFIG_WIRELESS_BLUETOOTH
#ifdef CONFIG_BLUETOOTH_NULL #ifdef CONFIG_BLUETOOTH_NULL
/* Register the NULL Bluetooth network device */ /* Register the NULL Bluetooth network device */
@ -311,18 +310,5 @@ int sim_bringup(void)
} }
#endif #endif
/* Initialize the Bluetooth stack (This will fail if no device has been return ret;
* registered).
*/
ret = bt_netdev_register();
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: bt_netdev_register() failed: %d\n", ret);
}
#endif
UNUSED(ret);
return OK;
} }

View File

@ -271,5 +271,5 @@ int btnull_register(void)
{ {
/* Register the driver with the Bluetooth stack */ /* Register the driver with the Bluetooth stack */
return bt_driver_register(&g_bt_null); return bt_netdev_register(&g_bt_null);
} }

View File

@ -471,7 +471,7 @@ int btuart_register(FAR const struct btuart_lowerhalf_s *lower)
ret = bt_netdev_register(&upper->dev); ret = bt_netdev_register(&upper->dev);
if (ret < 0) if (ret < 0)
{ {
wlerr("ERROR: bt_driver_register failed: %d\n", ret); wlerr("ERROR: bt_netdev_register failed: %d\n", ret);
kmm_free(upper); kmm_free(upper);
} }

View File

@ -216,7 +216,7 @@ int btuart_register(FAR const struct btuart_lowerhalf_s *lower)
ret = bt_netdev_register(&upper->dev); ret = bt_netdev_register(&upper->dev);
if (ret < 0) if (ret < 0)
{ {
wlerr("ERROR: bt_driver_register failed: %d\n", ret); wlerr("ERROR: bt_netdev_register failed: %d\n", ret);
kmm_free(upper); kmm_free(upper);
} }

View File

@ -110,7 +110,7 @@ int btuart_register(FAR const struct btuart_lowerhalf_s *lower)
ret = bt_netdev_register(&upper->dev); ret = bt_netdev_register(&upper->dev);
if (ret < 0) if (ret < 0)
{ {
wlerr("ERROR: bt_driver_register failed: %d\n", ret); wlerr("ERROR: bt_netdev_registe failed: %d\n", ret);
kmm_free(upper); kmm_free(upper);
} }