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 <xiaoxiang@xiaomi.com>
Change-Id: I6561eb53f3211edae8f699fbf9d7625689ee581c
This commit is contained in:
Xiang Xiao
2021-10-11 11:05:27 +08:00
committed by xiaoxiang
parent 1158068ade
commit 0def56d17f
+2 -4
View File
@@ -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;