From 7ccdb2cfa8acf0be275aa045d6cb69ddaddf8af0 Mon Sep 17 00:00:00 2001 From: dulibo1 Date: Wed, 12 Jul 2023 18:20:16 +0800 Subject: [PATCH] battery:fix poll return type Signed-off-by: dulibo1 --- drivers/power/battery/battery_charger.c | 4 ++-- drivers/power/battery/battery_gauge.c | 4 ++-- drivers/power/battery/battery_monitor.c | 4 ++-- include/nuttx/power/battery_monitor.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/power/battery/battery_charger.c b/drivers/power/battery/battery_charger.c index 834068856a..34e0a280cd 100644 --- a/drivers/power/battery/battery_charger.c +++ b/drivers/power/battery/battery_charger.c @@ -415,8 +415,8 @@ static int bat_charger_ioctl(FAR struct file *filep, int cmd, * Name: bat_charger_poll ****************************************************************************/ -static ssize_t bat_charger_poll(FAR struct file *filep, - struct pollfd *fds, bool setup) +static int bat_charger_poll(FAR struct file *filep, + FAR struct pollfd *fds, bool setup) { FAR struct battery_charger_priv_s *priv = filep->f_priv; int ret; diff --git a/drivers/power/battery/battery_gauge.c b/drivers/power/battery/battery_gauge.c index b0cbccda0b..458c500073 100644 --- a/drivers/power/battery/battery_gauge.c +++ b/drivers/power/battery/battery_gauge.c @@ -373,8 +373,8 @@ static int bat_gauge_ioctl(FAR struct file *filep, * Name: bat_gauge_poll ****************************************************************************/ -static ssize_t bat_gauge_poll(FAR struct file *filep, - struct pollfd *fds, bool setup) +static int bat_gauge_poll(FAR struct file *filep, + FAR struct pollfd *fds, bool setup) { FAR struct battery_gauge_priv_s *priv = filep->f_priv; int ret; diff --git a/drivers/power/battery/battery_monitor.c b/drivers/power/battery/battery_monitor.c index 49faab7d25..cfca802529 100644 --- a/drivers/power/battery/battery_monitor.c +++ b/drivers/power/battery/battery_monitor.c @@ -452,8 +452,8 @@ static int bat_monitor_ioctl(FAR struct file *filep, int cmd, * Name: bat_monitor_poll ****************************************************************************/ -static ssize_t bat_monitor_poll(FAR struct file *filep, - struct pollfd *fds, bool setup) +static int bat_monitor_poll(FAR struct file *filep, + FAR struct pollfd *fds, bool setup) { FAR struct battery_monitor_priv_s *priv = filep->f_priv; int ret; diff --git a/include/nuttx/power/battery_monitor.h b/include/nuttx/power/battery_monitor.h index 6dea471412..d88352c9c5 100644 --- a/include/nuttx/power/battery_monitor.h +++ b/include/nuttx/power/battery_monitor.h @@ -296,7 +296,7 @@ struct battery_monitor_operations_s /* Get chip id */ - CODE int (*chipid)(FAR struct battery_charger_dev_s *dev, + CODE int (*chipid)(FAR struct battery_monitor_dev_s *dev, FAR unsigned int *value); };