Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stephen Rothwell and committed by
Chanwoo Choi
2e01ac83 c135cd82

+5 -10
+5 -10
drivers/extcon/extcon-lc824206xa.c
··· 393 393 return 0; 394 394 } 395 395 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 - 404 396 static const enum power_supply_property lc824206xa_psy_props[] = { 405 397 POWER_SUPPLY_PROP_ONLINE, 406 398 POWER_SUPPLY_PROP_USB_TYPE, ··· 402 410 static const struct power_supply_desc lc824206xa_psy_desc = { 403 411 .name = "lc824206xa-charger-detect", 404 412 .type = POWER_SUPPLY_TYPE_USB, 405 - .usb_types = lc824206xa_psy_usb_types, 406 - .num_usb_types = ARRAY_SIZE(lc824206xa_psy_usb_types), 413 + .usb_types = BIT(POWER_SUPPLY_USB_TYPE_SDP) | 414 + BIT(POWER_SUPPLY_USB_TYPE_CDP) | 415 + BIT(POWER_SUPPLY_USB_TYPE_DCP) | 416 + BIT(POWER_SUPPLY_USB_TYPE_ACA) | 417 + BIT(POWER_SUPPLY_USB_TYPE_UNKNOWN), 407 418 .properties = lc824206xa_psy_props, 408 419 .num_properties = ARRAY_SIZE(lc824206xa_psy_props), 409 420 .get_property = lc824206xa_psy_get_prop,