Skip to content

Commit 2e01ac8

Browse files
sfrothwellchanwoochoi
authored andcommitted
extcon: lc824206xa: Fix build error of POWER_SUPPLY_PROP_USB_TYPE
commit 364ea7c("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/[email protected]/ Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent c135cd8 commit 2e01ac8

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

drivers/extcon/extcon-lc824206xa.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -393,14 +393,6 @@ static int lc824206xa_psy_get_prop(struct power_supply *psy,
393393
return 0;
394394
}
395395

396-
static const enum power_supply_usb_type lc824206xa_psy_usb_types[] = {
397-
POWER_SUPPLY_USB_TYPE_SDP,
398-
POWER_SUPPLY_USB_TYPE_CDP,
399-
POWER_SUPPLY_USB_TYPE_DCP,
400-
POWER_SUPPLY_USB_TYPE_ACA,
401-
POWER_SUPPLY_USB_TYPE_UNKNOWN,
402-
};
403-
404396
static const enum power_supply_property lc824206xa_psy_props[] = {
405397
POWER_SUPPLY_PROP_ONLINE,
406398
POWER_SUPPLY_PROP_USB_TYPE,
@@ -410,8 +402,11 @@ static const enum power_supply_property lc824206xa_psy_props[] = {
410402
static const struct power_supply_desc lc824206xa_psy_desc = {
411403
.name = "lc824206xa-charger-detect",
412404
.type = POWER_SUPPLY_TYPE_USB,
413-
.usb_types = lc824206xa_psy_usb_types,
414-
.num_usb_types = ARRAY_SIZE(lc824206xa_psy_usb_types),
405+
.usb_types = BIT(POWER_SUPPLY_USB_TYPE_SDP) |
406+
BIT(POWER_SUPPLY_USB_TYPE_CDP) |
407+
BIT(POWER_SUPPLY_USB_TYPE_DCP) |
408+
BIT(POWER_SUPPLY_USB_TYPE_ACA) |
409+
BIT(POWER_SUPPLY_USB_TYPE_UNKNOWN),
415410
.properties = lc824206xa_psy_props,
416411
.num_properties = ARRAY_SIZE(lc824206xa_psy_props),
417412
.get_property = lc824206xa_psy_get_prop,

0 commit comments

Comments
 (0)