diff --git a/drivers/power/polaris.c b/drivers/power/polaris.c index b283f8a3412..881efb99d3b 100644 --- a/drivers/power/polaris.c +++ b/drivers/power/polaris.c @@ -139,8 +139,7 @@ struct stwlc38_dev_s { /* The common part of the battery driver visible to the upper-half driver */ - FAR const struct battery_charger_operations_s *ops; /* Battery operations */ - sem_t batsem; /* Enforce mutually exclusive access */ + struct battery_charger_dev_s dev; /* Battery charger device */ /* Data fields specific to the lower half STWLC38 driver follow */ @@ -763,8 +762,7 @@ FAR struct battery_charger_dev_s * { /* Initialize the SC8551 device structure */ - nxsem_init(&priv->batsem, 0, 1); - priv->ops = &g_stwlc38ops; + priv->dev.ops = &g_stwlc38ops; priv->i2c = i2c; priv->addr = addr; priv->frequency = frequency;