staging/fbtft : Use BIT() macro when possible
Based on checkpatch.pl recommendations, (1 << x) is replaced by BIT(x) Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6d657dac56
commit
e6ea2028e0
|
@ -113,9 +113,9 @@ static int set_var(struct fbtft_par *par)
|
|||
{
|
||||
/* MADCTL - Memory data access control */
|
||||
/* RGB/BGR can be set with H/W pin SRGB and MADCTL BGR bit */
|
||||
#define MY (1 << 7)
|
||||
#define MX (1 << 6)
|
||||
#define MV (1 << 5)
|
||||
#define MY BIT(7)
|
||||
#define MX BIT(6)
|
||||
#define MV BIT(5)
|
||||
switch (par->info->var.rotate) {
|
||||
case 0:
|
||||
write_reg(par, 0x36, par->bgr << 3);
|
||||
|
|
|
@ -87,9 +87,9 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
|
|||
write_reg(par, 0x2c);
|
||||
}
|
||||
|
||||
#define my (1 << 7)
|
||||
#define mx (1 << 6)
|
||||
#define mv (1 << 5)
|
||||
#define my BIT(7)
|
||||
#define mx BIT(6)
|
||||
#define mv BIT(5)
|
||||
static int set_var(struct fbtft_par *par)
|
||||
{
|
||||
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);
|
||||
|
|
|
@ -111,9 +111,9 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
|
|||
write_reg(par, 0x2C);
|
||||
}
|
||||
|
||||
#define MY (1 << 7)
|
||||
#define MX (1 << 6)
|
||||
#define MV (1 << 5)
|
||||
#define MY BIT(7)
|
||||
#define MX BIT(6)
|
||||
#define MV BIT(5)
|
||||
static int set_var(struct fbtft_par *par)
|
||||
{
|
||||
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);
|
||||
|
|
|
@ -105,9 +105,9 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
|
|||
write_reg(par, 0x2C);
|
||||
}
|
||||
|
||||
#define MY (1 << 7)
|
||||
#define MX (1 << 6)
|
||||
#define MV (1 << 5)
|
||||
#define MY BIT(7)
|
||||
#define MX BIT(6)
|
||||
#define MV BIT(5)
|
||||
static int set_var(struct fbtft_par *par)
|
||||
{
|
||||
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);
|
||||
|
|
Loading…
Reference in New Issue