extcon: Use DECLARE_BITMAP() to declare bit arrays
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 22 Mar 2023 14:39:54 +0000 (16:39 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 29 May 2023 14:41:28 +0000 (23:41 +0900)
Bit arrays has a specific type helper for the declaration.
Use it instead of homegronw equivalent.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon.c

index 79006ab5334b9bda637cb1541bc45d21a8aec111..70e9755ba2bc2ec77f3c23bbe6350aea14cfb624 100644 (file)
@@ -230,10 +230,10 @@ struct extcon_cable {
        union extcon_property_value jack_propval[EXTCON_PROP_JACK_CNT];
        union extcon_property_value disp_propval[EXTCON_PROP_DISP_CNT];
 
-       unsigned long usb_bits[BITS_TO_LONGS(EXTCON_PROP_USB_CNT)];
-       unsigned long chg_bits[BITS_TO_LONGS(EXTCON_PROP_CHG_CNT)];
-       unsigned long jack_bits[BITS_TO_LONGS(EXTCON_PROP_JACK_CNT)];
-       unsigned long disp_bits[BITS_TO_LONGS(EXTCON_PROP_DISP_CNT)];
+       DECLARE_BITMAP(usb_bits, EXTCON_PROP_USB_CNT);
+       DECLARE_BITMAP(chg_bits, EXTCON_PROP_CHG_CNT);
+       DECLARE_BITMAP(jack_bits, EXTCON_PROP_JACK_CNT);
+       DECLARE_BITMAP(disp_bits, EXTCON_PROP_DISP_CNT);
 };
 
 static struct class *extcon_class;