@@ -393,14 +393,6 @@ static int lc824206xa_psy_get_prop(struct power_supply *psy,
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 ,
@@ -410,8 +402,11 @@ static const enum power_supply_property lc824206xa_psy_props[] = {
410
402
static const struct power_supply_desc lc824206xa_psy_desc = {
411
403
.name = "lc824206xa-charger-detect" ,
412
404
.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 ),
415
410
.properties = lc824206xa_psy_props ,
416
411
.num_properties = ARRAY_SIZE (lc824206xa_psy_props ),
417
412
.get_property = lc824206xa_psy_get_prop ,
0 commit comments