From: Mike Rapoport Date: Sun, 17 Jan 2016 18:04:15 +0000 (+0200) Subject: staging: sm750fb: use BIT macro for DE_STATE1 single-bit field X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c808d6ce4a2a2d923fbf29e054ff08c0141703c0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: sm750fb: use BIT macro for DE_STATE1 single-bit field Replace complex definition of DE_STATE1 field and usage of FIELD_SET with BIT() macro and open-coded register value modifications Signed-off-by: Mike Rapoport Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/sm750fb/ddk750_reg.h b/drivers/staging/sm750fb/ddk750_reg.h index 16a01c25442c..7bbe53a12808 100644 --- a/drivers/staging/sm750fb/ddk750_reg.h +++ b/drivers/staging/sm750fb/ddk750_reg.h @@ -3,9 +3,7 @@ /* New register for SM750LE */ #define DE_STATE1 0x100054 -#define DE_STATE1_DE_ABORT 0:0 -#define DE_STATE1_DE_ABORT_OFF 0 -#define DE_STATE1_DE_ABORT_ON 1 +#define DE_STATE1_DE_ABORT BIT(0) #define DE_STATE2 0x100058 #define DE_STATE2_DE_FIFO 3:3 diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c index f9908d942c63..5754af5b9ddf 100644 --- a/drivers/staging/sm750fb/sm750_hw.c +++ b/drivers/staging/sm750fb/sm750_hw.c @@ -468,11 +468,11 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev) if (getChipType() == SM750LE) { reg = PEEK32(DE_STATE1); - reg = FIELD_SET(reg, DE_STATE1, DE_ABORT, ON); + reg |= DE_STATE1_DE_ABORT; POKE32(DE_STATE1, reg); reg = PEEK32(DE_STATE1); - reg = FIELD_SET(reg, DE_STATE1, DE_ABORT, OFF); + reg &= ~DE_STATE1_DE_ABORT; POKE32(DE_STATE1, reg); } else {