power: supply: sbs-battery: cache constant string properties
authorIkjoon Jang <ikjn@chromium.org>
Wed, 26 May 2021 11:16:04 +0000 (19:16 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 3 Jun 2021 17:49:58 +0000 (19:49 +0200)
commitb49a81d0fd021a1f0c8660fa40ad9984d9d1f5b7
tree866af9c4edd71fa1ebb5c09c3690b710cdf340cc
parent20a3c8b57b2bc2b372bba55ce9d9a90d0030892e
power: supply: sbs-battery: cache constant string properties

Currently sbs-battery supports three string properties -
manufacturer, model_name, and chemistry. Buffers for those
properties are currently defined as global variables.

This patch moves those global variables into struct sbs_info
and cache/reuse them as they are all constant values.

Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/sbs-battery.c