Re: [PATCH] power: supply: Provide stubs for charge_behaviour helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 1/8/22 16:31, Thomas Weißschuh wrote:
> When CONFIG_SYSFS is not enabled provide stubs for the helper functions
> to not break their callers.
> 
> Fixes: 539b9c94ac83 ("power: supply: add helpers for charge_behaviour sysfs")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


> ---
>  include/linux/power_supply.h | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index d92de670d6a7..e218041cc000 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -723,6 +723,21 @@ ssize_t power_supply_charge_behaviour_show(struct device *dev,
>  					   char *buf);
>  
>  int power_supply_charge_behaviour_parse(unsigned int available_behaviours, const char *buf);
> +#else
> +static inline
> +ssize_t power_supply_charge_behaviour_show(struct device *dev,
> +					   unsigned int available_behaviours,
> +					   enum power_supply_charge_behaviour behaviour,
> +					   char *buf)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
> +static inline int power_supply_charge_behaviour_parse(unsigned int available_behaviours,
> +						      const char *buf)
> +{
> +	return -EOPNOTSUPP;
> +}
>  #endif
>  
>  #endif /* __LINUX_POWER_SUPPLY_H__ */
> 
> base-commit: b8170452cd5121b11a5726e3ea8dbdfc2d74e771
> 






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux