mirror of
https://github.com/apache/nuttx.git
synced 2026-09-01 22:53:01 +00: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:
parent
1158068ade
commit
0def56d17f
1 changed files with 2 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue