Commit 77bf5df4 authored by Dario Binacchi's avatar Dario Binacchi Committed by Helge Deller

fbdev: imxfb: Fix style warnings relating to printk()

Resolve the following warning reported by checkpatch:

WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

This made it necessary to move the 'fbi->pdev = pdev' setting to the
beginning of the driver's probing.
Signed-off-by: default avatarDario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 62c82a47
...@@ -414,8 +414,8 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -414,8 +414,8 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
if (--pcr > PCR_PCD_MASK) { if (--pcr > PCR_PCD_MASK) {
pcr = PCR_PCD_MASK; pcr = PCR_PCD_MASK;
printk(KERN_WARNING "Must limit pixel clock to %luHz\n", dev_warn(&fbi->pdev->dev, "Must limit pixel clock to %luHz\n",
lcd_clk / pcr); lcd_clk / pcr);
} }
switch (var->bits_per_pixel) { switch (var->bits_per_pixel) {
...@@ -628,28 +628,28 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf ...@@ -628,28 +628,28 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
#if DEBUG_VAR #if DEBUG_VAR
if (var->xres < 16 || var->xres > 1024) if (var->xres < 16 || var->xres > 1024)
printk(KERN_ERR "%s: invalid xres %d\n", dev_err(&fbi->pdev->dev, "%s: invalid xres %d\n",
info->fix.id, var->xres); info->fix.id, var->xres);
if (var->hsync_len < 1 || var->hsync_len > 64) if (var->hsync_len < 1 || var->hsync_len > 64)
printk(KERN_ERR "%s: invalid hsync_len %d\n", dev_err(&fbi->pdev->dev, "%s: invalid hsync_len %d\n",
info->fix.id, var->hsync_len); info->fix.id, var->hsync_len);
if (var->left_margin < left_margin_low || var->left_margin > 255) if (var->left_margin < left_margin_low || var->left_margin > 255)
printk(KERN_ERR "%s: invalid left_margin %d\n", dev_err(&fbi->pdev->dev, "%s: invalid left_margin %d\n",
info->fix.id, var->left_margin); info->fix.id, var->left_margin);
if (var->right_margin < 1 || var->right_margin > 255) if (var->right_margin < 1 || var->right_margin > 255)
printk(KERN_ERR "%s: invalid right_margin %d\n", dev_err(&fbi->pdev->dev, "%s: invalid right_margin %d\n",
info->fix.id, var->right_margin); info->fix.id, var->right_margin);
if (var->yres < 1 || var->yres > ymax_mask) if (var->yres < 1 || var->yres > ymax_mask)
printk(KERN_ERR "%s: invalid yres %d\n", dev_err(&fbi->pdev->dev, "%s: invalid yres %d\n",
info->fix.id, var->yres); info->fix.id, var->yres);
if (var->vsync_len > 100) if (var->vsync_len > 100)
printk(KERN_ERR "%s: invalid vsync_len %d\n", dev_err(&fbi->pdev->dev, "%s: invalid vsync_len %d\n",
info->fix.id, var->vsync_len); info->fix.id, var->vsync_len);
if (var->upper_margin > 63) if (var->upper_margin > 63)
printk(KERN_ERR "%s: invalid upper_margin %d\n", dev_err(&fbi->pdev->dev, "%s: invalid upper_margin %d\n",
info->fix.id, var->upper_margin); info->fix.id, var->upper_margin);
if (var->lower_margin > 255) if (var->lower_margin > 255)
printk(KERN_ERR "%s: invalid lower_margin %d\n", dev_err(&fbi->pdev->dev, "%s: invalid lower_margin %d\n",
info->fix.id, var->lower_margin); info->fix.id, var->lower_margin);
#endif #endif
...@@ -701,6 +701,7 @@ static int imxfb_init_fbinfo(struct platform_device *pdev) ...@@ -701,6 +701,7 @@ static int imxfb_init_fbinfo(struct platform_device *pdev)
memset(fbi, 0, sizeof(struct imxfb_info)); memset(fbi, 0, sizeof(struct imxfb_info));
fbi->pdev = pdev;
fbi->devtype = pdev->id_entry->driver_data; fbi->devtype = pdev->id_entry->driver_data;
strscpy(info->fix.id, IMX_NAME, sizeof(info->fix.id)); strscpy(info->fix.id, IMX_NAME, sizeof(info->fix.id));
...@@ -1044,7 +1045,6 @@ static int imxfb_probe(struct platform_device *pdev) ...@@ -1044,7 +1045,6 @@ static int imxfb_probe(struct platform_device *pdev)
lcd->props.max_contrast = 0xff; lcd->props.max_contrast = 0xff;
imxfb_enable_controller(fbi); imxfb_enable_controller(fbi);
fbi->pdev = pdev;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment