On Mon, Oct 19, 2020 at 9:57 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote: > > Cleanup the ACER_CAP_FOO defines: > -Switch to using BIT() macro. > -The ACER_CAP_RFBTN flag is set, but it is never checked anywhere, drop it. > -Drop the unused ACER_CAP_ANY define. > > Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> > --- > drivers/platform/x86/acer-wmi.c | 18 +++++++----------- > 1 file changed, 7 insertions(+), 11 deletions(-) > > diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c > index db6167a10981..2f69d418ed3b 100644 > --- a/drivers/platform/x86/acer-wmi.c > +++ b/drivers/platform/x86/acer-wmi.c > @@ -205,14 +205,12 @@ struct hotkey_function_type_aa { Should't we add bits.h as well? > /* > * Interface capability flags > */ > -#define ACER_CAP_MAILLED (1<<0) > -#define ACER_CAP_WIRELESS (1<<1) > -#define ACER_CAP_BLUETOOTH (1<<2) > -#define ACER_CAP_BRIGHTNESS (1<<3) > -#define ACER_CAP_THREEG (1<<4) > -#define ACER_CAP_ACCEL (1<<5) > -#define ACER_CAP_RFBTN (1<<6) > -#define ACER_CAP_ANY (0xFFFFFFFF) > +#define ACER_CAP_MAILLED BIT(0) > +#define ACER_CAP_WIRELESS BIT(1) > +#define ACER_CAP_BLUETOOTH BIT(2) > +#define ACER_CAP_BRIGHTNESS BIT(3) > +#define ACER_CAP_THREEG BIT(4) > +#define ACER_CAP_ACCEL BIT(5) > > /* > * Interface type flags > @@ -1247,10 +1245,8 @@ static void __init type_aa_dmi_decode(const struct dmi_header *header, void *d) > interface->capability |= ACER_CAP_THREEG; > if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_BLUETOOTH) > interface->capability |= ACER_CAP_BLUETOOTH; > - if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_RFBTN) { > - interface->capability |= ACER_CAP_RFBTN; > + if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_RFBTN) > commun_func_bitmap &= ~ACER_WMID3_GDS_RFBTN; > - } > > commun_fn_key_number = type_aa->commun_fn_key_number; > } > -- > 2.28.0 > -- With Best Regards, Andy Shevchenko