From 0def56d17f0394ca98e17610020530955da03416 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 11 Oct 2021 11:05:27 +0800 Subject: [PATCH] power/polaris: Replace ops and batsem with dev and remove the batsem initialization since it is arleady done in common code Signed-off-by: Xiang Xiao Change-Id: I6561eb53f3211edae8f699fbf9d7625689ee581c --- drivers/power/polaris.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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;