summaryrefslogtreecommitdiff
path: root/drivers/extcon
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2024-09-04 18:54:21 +0300
committerChanwoo Choi <cw00.choi@samsung.com>2024-09-04 19:44:51 +0300
commit2e01ac83c1c7166e58043ff2bdb0dc7dbfcfd11a (patch)
tree9c21e781b0dd763ae51a4a043b60586ff60fbbee /drivers/extcon
parentc135cd82f194eed0328e2c1942892990b7fb0dc1 (diff)
downloadlinux-2e01ac83c1c7166e58043ff2bdb0dc7dbfcfd11a.tar.xz
extcon: lc824206xa: Fix build error of POWER_SUPPLY_PROP_USB_TYPE
commit 364ea7ccaef9("power: supply: Change usb_types from an array into a bitmask") changes usb_types from an array into a bitmask. Fix the build error of usb_types variables. Link: https://lore.kernel.org/lkml/20240904164325.48386-1-chanwoo@kernel.org/ Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-lc824206xa.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/extcon/extcon-lc824206xa.c b/drivers/extcon/extcon-lc824206xa.c
index d58a2c369018..56938748aea8 100644
--- a/drivers/extcon/extcon-lc824206xa.c
+++ b/drivers/extcon/extcon-lc824206xa.c
@@ -393,14 +393,6 @@ static int lc824206xa_psy_get_prop(struct power_supply *psy,
return 0;
}
-static const enum power_supply_usb_type lc824206xa_psy_usb_types[] = {
- POWER_SUPPLY_USB_TYPE_SDP,
- POWER_SUPPLY_USB_TYPE_CDP,
- POWER_SUPPLY_USB_TYPE_DCP,
- POWER_SUPPLY_USB_TYPE_ACA,
- POWER_SUPPLY_USB_TYPE_UNKNOWN,
-};
-
static const enum power_supply_property lc824206xa_psy_props[] = {
POWER_SUPPLY_PROP_ONLINE,
POWER_SUPPLY_PROP_USB_TYPE,
@@ -410,8 +402,11 @@ static const enum power_supply_property lc824206xa_psy_props[] = {
static const struct power_supply_desc lc824206xa_psy_desc = {
.name = "lc824206xa-charger-detect",
.type = POWER_SUPPLY_TYPE_USB,
- .usb_types = lc824206xa_psy_usb_types,
- .num_usb_types = ARRAY_SIZE(lc824206xa_psy_usb_types),
+ .usb_types = BIT(POWER_SUPPLY_USB_TYPE_SDP) |
+ BIT(POWER_SUPPLY_USB_TYPE_CDP) |
+ BIT(POWER_SUPPLY_USB_TYPE_DCP) |
+ BIT(POWER_SUPPLY_USB_TYPE_ACA) |
+ BIT(POWER_SUPPLY_USB_TYPE_UNKNOWN),
.properties = lc824206xa_psy_props,
.num_properties = ARRAY_SIZE(lc824206xa_psy_props),
.get_property = lc824206xa_psy_get_prop,