mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user