diff options
Diffstat (limited to 'drivers/staging/fbtft/fb_ssd1351.c')
-rw-r--r-- | drivers/staging/fbtft/fb_ssd1351.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/staging/fbtft/fb_ssd1351.c b/drivers/staging/fbtft/fb_ssd1351.c index 062d986..9bcd7a0 100644 --- a/drivers/staging/fbtft/fb_ssd1351.c +++ b/drivers/staging/fbtft/fb_ssd1351.c @@ -72,6 +72,7 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) static int set_var(struct fbtft_par *par) { unsigned remap; + fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__); if (par->fbtftops.init_display != init_display) { @@ -86,16 +87,16 @@ static int set_var(struct fbtft_par *par) switch (par->info->var.rotate) { case 0: - write_reg(par, 0xA0, remap | 0b00 | 1<<4); + write_reg(par, 0xA0, remap | 0x00 | 1<<4); break; case 270: - write_reg(par, 0xA0, remap | 0b11 | 1<<4); + write_reg(par, 0xA0, remap | 0x03 | 1<<4); break; case 180: - write_reg(par, 0xA0, remap | 0b10); + write_reg(par, 0xA0, remap | 0x02); break; case 90: - write_reg(par, 0xA0, remap | 0b01); + write_reg(par, 0xA0, remap | 0x01); break; } @@ -217,12 +218,8 @@ static void register_onboard_backlight(struct fbtft_par *par) bl_ops = devm_kzalloc(par->info->device, sizeof(struct backlight_ops), GFP_KERNEL); - if (!bl_ops) { - dev_err(par->info->device, - "%s: could not allocate memory for backlight operations.\n", - __func__); + if (!bl_ops) return; - } bl_ops->update_status = update_onboard_backlight; bl_props.type = BACKLIGHT_RAW; |