drivers/power/battery_gauge.c: Add missing initialization of semaphore.
drivers/power/battery_charger.c: Add missing initialization of semaphore.
This commit is contained in:
parent
ea846b65c4
commit
3de2533599
|
@ -285,6 +285,10 @@ int battery_charger_register(FAR const char *devpath,
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
/* Initialize the semaphore */
|
||||||
|
|
||||||
|
nxsem_init(&dev->batsem, 0, 1);
|
||||||
|
|
||||||
/* Register the character driver */
|
/* Register the character driver */
|
||||||
|
|
||||||
ret = register_driver(devpath, &g_batteryops, 0555, dev);
|
ret = register_driver(devpath, &g_batteryops, 0555, dev);
|
||||||
|
|
|
@ -248,6 +248,10 @@ int battery_gauge_register(FAR const char *devpath,
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
/* Initialize the semaphore */
|
||||||
|
|
||||||
|
nxsem_init(&dev->batsem, 0, 1);
|
||||||
|
|
||||||
/* Register the character driver */
|
/* Register the character driver */
|
||||||
|
|
||||||
ret = register_driver(devpath, &g_batteryops, 0555, dev);
|
ret = register_driver(devpath, &g_batteryops, 0555, dev);
|
||||||
|
|
Loading…
Reference in New Issue