]> git.sur5r.net Git - u-boot/blobdiff - drivers/video/am335x-fb.c
am335x-fb: cosmetic: fix coding style
[u-boot] / drivers / video / am335x-fb.c
index bb5cc9788abfa61dbe532d292eccbc64a7a44002..697b701ebcd3e897d78ddb61dbad560a42a560fe 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at>
- * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
+ * Copyright (C) 2013-2018 Hannes Schmelzer <oe5hpm@oevsv.at>
+ * B&R Industrial Automation GmbH - http://www.br-automation.com
  *
  * minimal framebuffer driver for TI's AM335x SoC to be compatible with
  * Wolfgang Denk's LCD-Framework (CONFIG_LCD, common/lcd.c)
@@ -108,11 +108,11 @@ int am335xfb_init(struct am335x_lcdpanel *panel)
 {
        u32 raster_ctrl = 0;
 
-       if (0 == gd->fb_base) {
+       if (gd->fb_base == 0) {
                printf("ERROR: no valid fb_base stored in GLOBAL_DATA_PTR!\n");
                return -1;
        }
-       if (0 == panel) {
+       if (panel == NULL) {
                printf("ERROR: missing ptr to am335x_lcdpanel!\n");
                return -1;
        }
@@ -128,7 +128,7 @@ int am335xfb_init(struct am335x_lcdpanel *panel)
                raster_ctrl |= LCD_TFT_24BPP_MODE;
                break;
        default:
-               error("am335x-fb: invalid bpp value: %d\n", panel->bpp);
+               pr_err("am335x-fb: invalid bpp value: %d\n", panel->bpp);
                return -1;
        }
 
@@ -147,7 +147,7 @@ int am335xfb_init(struct am335x_lcdpanel *panel)
        gd->fb_base += 0x20;
 
        /* turn ON display through powercontrol function if accessible */
-       if (0 != panel->panel_power_ctrl)
+       if (panel->panel_power_ctrl != NULL)
                panel->panel_power_ctrl(1);
 
        debug("am335x-fb: wait for stable power ...\n");