mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 20:56:47 +08:00
wireless/bluetooth: Initialize private bt_driver_s member.
This commit is contained in:
@@ -84,9 +84,17 @@ struct bt_driver_s
|
|||||||
CODE int (*ioctl)(FAR struct bt_driver_s *btdev, int cmd,
|
CODE int (*ioctl)(FAR struct bt_driver_s *btdev, int cmd,
|
||||||
unsigned long arg);
|
unsigned long arg);
|
||||||
|
|
||||||
/* Filled by register function, shouldn't be touched by bt_driver_s */
|
/* For private use by device drivers.
|
||||||
|
* Should NOT be touched by the bluetooth stack.
|
||||||
|
*/
|
||||||
|
|
||||||
FAR void *priv;
|
FAR void *priv;
|
||||||
|
|
||||||
|
/* Reserved for the bluetooth stack.
|
||||||
|
* Should NOT be touched by drivers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
FAR void *bt_net;
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -1194,7 +1194,7 @@ int bt_netdev_register(FAR struct bt_driver_s *btdev)
|
|||||||
|
|
||||||
/* Get the interface structure associated with this interface number. */
|
/* Get the interface structure associated with this interface number. */
|
||||||
|
|
||||||
priv = (FAR struct btnet_driver_s *)
|
btdev->bt_net = priv = (FAR struct btnet_driver_s *)
|
||||||
kmm_zalloc(sizeof(struct btnet_driver_s));
|
kmm_zalloc(sizeof(struct btnet_driver_s));
|
||||||
|
|
||||||
if (priv == NULL)
|
if (priv == NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user