Commit cf424ef0 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-5.18/fbdev-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull fbdev fixes and updates from Helge Deller:
 "A bunch of outstanding fbdev patches - all trivial and small"

* tag 'for-5.18/fbdev-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  video: fbdev: clps711x-fb: Use syscon_regmap_lookup_by_phandle
  video: fbdev: mmp: replace usage of found with dedicated list iterator variable
  video: fbdev: sh_mobile_lcdcfb: Remove sh_mobile_lcdc_check_var() declaration
  video: fbdev: i740fb: Error out if 'pixclock' equals zero
  video: fbdev: i740fb: use memset_io() to clear screen
  video: fbdev: s3fb: Error out if 'pixclock' equals zero
  video: fbdev: arkfb: Error out if 'pixclock' equals zero
  video: fbdev: tridentfb: Error out if 'pixclock' equals zero
  video: fbdev: vt8623fb: Error out if 'pixclock' equals zero
  video: fbdev: kyro: Error out if 'lineclock' equals zero
  video: fbdev: neofb: Fix the check of 'var->pixclock'
  video: fbdev: imxfb: Fix missing of_node_put in imxfb_probe
  video: fbdev: omap: Make it CCF clk API compatible
  video: fbdev: aty/matrox/...: Prepare cleanup of powerpc's asm/prom.h
  video: fbdev: pm2fb: Fix a kernel-doc formatting issue
  linux/fb.h: Spelling s/palette/palette/
  video: fbdev: sis: fix potential NULL dereference in sisfb_post_sis300()
  video: fbdev: pxafb: use if else instead
  video: fbdev: udlfb: properly check endpoint type
  video: fbdev: of: display_timing: Remove a redundant zeroing of memory
parents 4fad37d5 6fbe0cc5
...@@ -566,6 +566,9 @@ static int arkfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -566,6 +566,9 @@ static int arkfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{ {
int rv, mem, step; int rv, mem, step;
if (!var->pixclock)
return -EINVAL;
/* Find appropriate format */ /* Find appropriate format */
rv = svga_match_format (arkfb_formats, var, NULL); rv = svga_match_format (arkfb_formats, var, NULL);
if (rv < 0) if (rv < 0)
......
...@@ -68,7 +68,6 @@ ...@@ -68,7 +68,6 @@
#ifdef CONFIG_PPC_PMAC #ifdef CONFIG_PPC_PMAC
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/pmac_feature.h> #include <asm/pmac_feature.h>
#include <asm/prom.h>
#include "../macmodes.h" #include "../macmodes.h"
#endif #endif
......
...@@ -79,7 +79,6 @@ ...@@ -79,7 +79,6 @@
#ifdef __powerpc__ #ifdef __powerpc__
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/prom.h>
#include "../macmodes.h" #include "../macmodes.h"
#endif #endif
#ifdef __sparc__ #ifdef __sparc__
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#ifdef CONFIG_PPC_PMAC #ifdef CONFIG_PPC_PMAC
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/prom.h>
#include <asm/pmac_feature.h> #include <asm/pmac_feature.h>
#endif #endif
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <asm/io.h> #include <asm/io.h>
#if defined(CONFIG_PPC) || defined(CONFIG_SPARC) #ifdef CONFIG_SPARC
#include <asm/prom.h> #include <asm/prom.h>
#endif #endif
......
...@@ -268,8 +268,7 @@ static int clps711x_fb_probe(struct platform_device *pdev) ...@@ -268,8 +268,7 @@ static int clps711x_fb_probe(struct platform_device *pdev)
goto out_fb_release; goto out_fb_release;
} }
cfb->syscon = cfb->syscon = syscon_regmap_lookup_by_phandle(np, "syscon");
syscon_regmap_lookup_by_compatible("cirrus,ep7209-syscon1");
if (IS_ERR(cfb->syscon)) { if (IS_ERR(cfb->syscon)) {
ret = PTR_ERR(cfb->syscon); ret = PTR_ERR(cfb->syscon);
goto out_fb_release; goto out_fb_release;
......
...@@ -47,9 +47,6 @@ ...@@ -47,9 +47,6 @@
#include <linux/nvram.h> #include <linux/nvram.h>
#include <linux/adb.h> #include <linux/adb.h>
#include <linux/cuda.h> #include <linux/cuda.h>
#ifdef CONFIG_PPC_PMAC
#include <asm/prom.h>
#endif
#ifdef CONFIG_BOOTX_TEXT #ifdef CONFIG_BOOTX_TEXT
#include <asm/btext.h> #include <asm/btext.h>
#endif #endif
......
...@@ -657,6 +657,9 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var, ...@@ -657,6 +657,9 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var,
static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{ {
if (!var->pixclock)
return -EINVAL;
switch (var->bits_per_pixel) { switch (var->bits_per_pixel) {
case 8: case 8:
var->red.offset = var->green.offset = var->blue.offset = 0; var->red.offset = var->green.offset = var->blue.offset = 0;
...@@ -740,7 +743,7 @@ static int i740fb_set_par(struct fb_info *info) ...@@ -740,7 +743,7 @@ static int i740fb_set_par(struct fb_info *info)
if (i) if (i)
return i; return i;
memset(info->screen_base, 0, info->screen_size); memset_io(info->screen_base, 0, info->screen_size);
vga_protect(par); vga_protect(par);
......
...@@ -925,10 +925,12 @@ static int imxfb_probe(struct platform_device *pdev) ...@@ -925,10 +925,12 @@ static int imxfb_probe(struct platform_device *pdev)
sizeof(struct imx_fb_videomode), GFP_KERNEL); sizeof(struct imx_fb_videomode), GFP_KERNEL);
if (!fbi->mode) { if (!fbi->mode) {
ret = -ENOMEM; ret = -ENOMEM;
of_node_put(display_np);
goto failed_of_parse; goto failed_of_parse;
} }
ret = imxfb_of_read_mode(&pdev->dev, display_np, fbi->mode); ret = imxfb_of_read_mode(&pdev->dev, display_np, fbi->mode);
of_node_put(display_np);
if (ret) if (ret)
goto failed_of_parse; goto failed_of_parse;
} }
......
...@@ -494,6 +494,8 @@ static int kyrofb_set_par(struct fb_info *info) ...@@ -494,6 +494,8 @@ static int kyrofb_set_par(struct fb_info *info)
info->var.hsync_len + info->var.hsync_len +
info->var.left_margin)) / 1000; info->var.left_margin)) / 1000;
if (!lineclock)
return -EINVAL;
/* time for a frame in ns (precision in 32bpp) */ /* time for a frame in ns (precision in 32bpp) */
frameclock = lineclock * (info->var.yres + frameclock = lineclock * (info->var.yres +
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#if defined(CONFIG_PPC_PMAC) #if defined(CONFIG_PPC_PMAC)
#include <asm/prom.h>
#include "../macmodes.h" #include "../macmodes.h"
#endif #endif
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/pci.h> #include <linux/pci.h>
#if defined(CONFIG_OF) #if defined(CONFIG_OF)
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#endif #endif
#include "mb862xxfb.h" #include "mb862xxfb.h"
......
...@@ -127,19 +127,18 @@ EXPORT_SYMBOL_GPL(mmp_unregister_panel); ...@@ -127,19 +127,18 @@ EXPORT_SYMBOL_GPL(mmp_unregister_panel);
*/ */
struct mmp_path *mmp_get_path(const char *name) struct mmp_path *mmp_get_path(const char *name)
{ {
struct mmp_path *path; struct mmp_path *path = NULL, *iter;
int found = 0;
mutex_lock(&disp_lock); mutex_lock(&disp_lock);
list_for_each_entry(path, &path_list, node) { list_for_each_entry(iter, &path_list, node) {
if (!strcmp(name, path->name)) { if (!strcmp(name, iter->name)) {
found = 1; path = iter;
break; break;
} }
} }
mutex_unlock(&disp_lock); mutex_unlock(&disp_lock);
return found ? path : NULL; return path;
} }
EXPORT_SYMBOL_GPL(mmp_get_path); EXPORT_SYMBOL_GPL(mmp_get_path);
......
...@@ -585,7 +585,7 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -585,7 +585,7 @@ neofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
DBG("neofb_check_var"); DBG("neofb_check_var");
if (var->pixclock && PICOS2KHZ(var->pixclock) > par->maxClock) if (!var->pixclock || PICOS2KHZ(var->pixclock) > par->maxClock)
return -EINVAL; return -EINVAL;
/* Is the mode larger than the LCD panel? */ /* Is the mode larger than the LCD panel? */
......
...@@ -964,7 +964,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode, ...@@ -964,7 +964,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode,
if ((r = calc_extif_timings(ext_clk, &extif_mem_div)) < 0) if ((r = calc_extif_timings(ext_clk, &extif_mem_div)) < 0)
goto err3; goto err3;
hwa742.extif->set_timings(&hwa742.reg_timings); hwa742.extif->set_timings(&hwa742.reg_timings);
clk_enable(hwa742.sys_ck); clk_prepare_enable(hwa742.sys_ck);
calc_hwa742_clk_rates(ext_clk, &sys_clk, &pix_clk); calc_hwa742_clk_rates(ext_clk, &sys_clk, &pix_clk);
if ((r = calc_extif_timings(sys_clk, &extif_mem_div)) < 0) if ((r = calc_extif_timings(sys_clk, &extif_mem_div)) < 0)
...@@ -1023,7 +1023,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode, ...@@ -1023,7 +1023,7 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode,
return 0; return 0;
err4: err4:
clk_disable(hwa742.sys_ck); clk_disable_unprepare(hwa742.sys_ck);
err3: err3:
hwa742.extif->cleanup(); hwa742.extif->cleanup();
err2: err2:
...@@ -1037,7 +1037,7 @@ static void hwa742_cleanup(void) ...@@ -1037,7 +1037,7 @@ static void hwa742_cleanup(void)
hwa742_set_update_mode(OMAPFB_UPDATE_DISABLED); hwa742_set_update_mode(OMAPFB_UPDATE_DISABLED);
hwa742.extif->cleanup(); hwa742.extif->cleanup();
hwa742.int_ctrl->cleanup(); hwa742.int_ctrl->cleanup();
clk_disable(hwa742.sys_ck); clk_disable_unprepare(hwa742.sys_ck);
} }
struct lcd_ctrl hwa742_ctrl = { struct lcd_ctrl hwa742_ctrl = {
......
...@@ -711,7 +711,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode, ...@@ -711,7 +711,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode,
dev_err(fbdev->dev, "failed to adjust LCD rate\n"); dev_err(fbdev->dev, "failed to adjust LCD rate\n");
goto fail1; goto fail1;
} }
clk_enable(lcdc.lcd_ck); clk_prepare_enable(lcdc.lcd_ck);
r = request_irq(OMAP_LCDC_IRQ, lcdc_irq_handler, 0, MODULE_NAME, fbdev); r = request_irq(OMAP_LCDC_IRQ, lcdc_irq_handler, 0, MODULE_NAME, fbdev);
if (r) { if (r) {
...@@ -746,7 +746,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode, ...@@ -746,7 +746,7 @@ static int omap_lcdc_init(struct omapfb_device *fbdev, int ext_mode,
fail3: fail3:
free_irq(OMAP_LCDC_IRQ, lcdc.fbdev); free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
fail2: fail2:
clk_disable(lcdc.lcd_ck); clk_disable_unprepare(lcdc.lcd_ck);
fail1: fail1:
clk_put(lcdc.lcd_ck); clk_put(lcdc.lcd_ck);
fail0: fail0:
...@@ -760,7 +760,7 @@ static void omap_lcdc_cleanup(void) ...@@ -760,7 +760,7 @@ static void omap_lcdc_cleanup(void)
free_fbmem(); free_fbmem();
omap_free_lcd_dma(); omap_free_lcd_dma();
free_irq(OMAP_LCDC_IRQ, lcdc.fbdev); free_irq(OMAP_LCDC_IRQ, lcdc.fbdev);
clk_disable(lcdc.lcd_ck); clk_disable_unprepare(lcdc.lcd_ck);
clk_put(lcdc.lcd_ck); clk_put(lcdc.lcd_ck);
} }
......
...@@ -598,7 +598,7 @@ static int sossi_init(struct omapfb_device *fbdev) ...@@ -598,7 +598,7 @@ static int sossi_init(struct omapfb_device *fbdev)
l &= ~CONF_SOSSI_RESET_R; l &= ~CONF_SOSSI_RESET_R;
omap_writel(l, MOD_CONF_CTRL_1); omap_writel(l, MOD_CONF_CTRL_1);
clk_enable(sossi.fck); clk_prepare_enable(sossi.fck);
l = omap_readl(ARM_IDLECT2); l = omap_readl(ARM_IDLECT2);
l &= ~(1 << 8); /* DMACK_REQ */ l &= ~(1 << 8); /* DMACK_REQ */
omap_writel(l, ARM_IDLECT2); omap_writel(l, ARM_IDLECT2);
...@@ -649,7 +649,7 @@ static int sossi_init(struct omapfb_device *fbdev) ...@@ -649,7 +649,7 @@ static int sossi_init(struct omapfb_device *fbdev)
return 0; return 0;
err: err:
clk_disable(sossi.fck); clk_disable_unprepare(sossi.fck);
clk_put(sossi.fck); clk_put(sossi.fck);
return r; return r;
} }
...@@ -657,6 +657,7 @@ static int sossi_init(struct omapfb_device *fbdev) ...@@ -657,6 +657,7 @@ static int sossi_init(struct omapfb_device *fbdev)
static void sossi_cleanup(void) static void sossi_cleanup(void)
{ {
omap_lcdc_free_dma_callback(); omap_lcdc_free_dma_callback();
clk_unprepare(sossi.fck);
clk_put(sossi.fck); clk_put(sossi.fck);
iounmap(sossi.base); iounmap(sossi.base);
} }
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/nvram.h> #include <linux/nvram.h>
#include <linux/of_address.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <asm/prom.h>
#include "macmodes.h" #include "macmodes.h"
#include "platinumfb.h" #include "platinumfb.h"
......
...@@ -1504,9 +1504,7 @@ static const struct fb_ops pm2fb_ops = { ...@@ -1504,9 +1504,7 @@ static const struct fb_ops pm2fb_ops = {
/** /**
* Device initialisation * pm2fb_probe - Initialise and allocate resource for PCI device.
*
* Initialise and allocate resource for PCI device.
* *
* @pdev: PCI device. * @pdev: PCI device.
* @id: PCI device ID. * @id: PCI device ID.
...@@ -1711,9 +1709,7 @@ static int pm2fb_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1711,9 +1709,7 @@ static int pm2fb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
} }
/** /**
* Device removal. * pm2fb_remove - Release all device resources.
*
* Release all device resources.
* *
* @pdev: PCI device to clean up. * @pdev: PCI device to clean up.
*/ */
......
...@@ -2256,10 +2256,10 @@ static int pxafb_probe(struct platform_device *dev) ...@@ -2256,10 +2256,10 @@ static int pxafb_probe(struct platform_device *dev)
goto failed; goto failed;
for (i = 0; i < inf->num_modes; i++) for (i = 0; i < inf->num_modes; i++)
inf->modes[i] = pdata->modes[i]; inf->modes[i] = pdata->modes[i];
} else {
inf = of_pxafb_of_mach_info(&dev->dev);
} }
if (!pdata)
inf = of_pxafb_of_mach_info(&dev->dev);
if (IS_ERR_OR_NULL(inf)) if (IS_ERR_OR_NULL(inf))
goto failed; goto failed;
......
...@@ -549,6 +549,9 @@ static int s3fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -549,6 +549,9 @@ static int s3fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
int rv, mem, step; int rv, mem, step;
u16 m, n, r; u16 m, n, r;
if (!var->pixclock)
return -EINVAL;
/* Find appropriate format */ /* Find appropriate format */
rv = svga_match_format (s3fb_formats, var, NULL); rv = svga_match_format (s3fb_formats, var, NULL);
......
...@@ -531,9 +531,6 @@ static void sh_mobile_lcdc_display_off(struct sh_mobile_lcdc_chan *ch) ...@@ -531,9 +531,6 @@ static void sh_mobile_lcdc_display_off(struct sh_mobile_lcdc_chan *ch)
ch->tx_dev->ops->display_off(ch->tx_dev); ch->tx_dev->ops->display_off(ch->tx_dev);
} }
static int sh_mobile_lcdc_check_var(struct fb_var_screeninfo *var,
struct fb_info *info);
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Format helpers * Format helpers
*/ */
......
...@@ -4463,7 +4463,7 @@ static void sisfb_post_sis300(struct pci_dev *pdev) ...@@ -4463,7 +4463,7 @@ static void sisfb_post_sis300(struct pci_dev *pdev)
SiS_SetReg(SISCR, 0x37, 0x02); SiS_SetReg(SISCR, 0x37, 0x02);
SiS_SetReg(SISPART2, 0x00, 0x1c); SiS_SetReg(SISPART2, 0x00, 0x1c);
v4 = 0x00; v5 = 0x00; v6 = 0x10; v4 = 0x00; v5 = 0x00; v6 = 0x10;
if(ivideo->SiS_Pr.UseROM) { if (ivideo->SiS_Pr.UseROM && bios) {
v4 = bios[0xf5]; v4 = bios[0xf5];
v5 = bios[0xf6]; v5 = bios[0xf6];
v6 = bios[0xf7]; v6 = bios[0xf7];
......
...@@ -996,6 +996,9 @@ static int tridentfb_check_var(struct fb_var_screeninfo *var, ...@@ -996,6 +996,9 @@ static int tridentfb_check_var(struct fb_var_screeninfo *var,
int ramdac = 230000; /* 230MHz for most 3D chips */ int ramdac = 230000; /* 230MHz for most 3D chips */
debug("enter\n"); debug("enter\n");
if (!var->pixclock)
return -EINVAL;
/* check color depth */ /* check color depth */
if (bpp == 24) if (bpp == 24)
bpp = var->bits_per_pixel = 32; bpp = var->bits_per_pixel = 32;
......
...@@ -1650,8 +1650,9 @@ static int dlfb_usb_probe(struct usb_interface *intf, ...@@ -1650,8 +1650,9 @@ static int dlfb_usb_probe(struct usb_interface *intf,
const struct device_attribute *attr; const struct device_attribute *attr;
struct dlfb_data *dlfb; struct dlfb_data *dlfb;
struct fb_info *info; struct fb_info *info;
int retval = -ENOMEM; int retval;
struct usb_device *usbdev = interface_to_usbdev(intf); struct usb_device *usbdev = interface_to_usbdev(intf);
struct usb_endpoint_descriptor *out;
/* usb initialization */ /* usb initialization */
dlfb = kzalloc(sizeof(*dlfb), GFP_KERNEL); dlfb = kzalloc(sizeof(*dlfb), GFP_KERNEL);
...@@ -1665,6 +1666,12 @@ static int dlfb_usb_probe(struct usb_interface *intf, ...@@ -1665,6 +1666,12 @@ static int dlfb_usb_probe(struct usb_interface *intf,
dlfb->udev = usb_get_dev(usbdev); dlfb->udev = usb_get_dev(usbdev);
usb_set_intfdata(intf, dlfb); usb_set_intfdata(intf, dlfb);
retval = usb_find_common_endpoints(intf->cur_altsetting, NULL, &out, NULL, NULL);
if (retval) {
dev_err(&intf->dev, "Device should have at lease 1 bulk endpoint!\n");
goto error;
}
dev_dbg(&intf->dev, "console enable=%d\n", console); dev_dbg(&intf->dev, "console enable=%d\n", console);
dev_dbg(&intf->dev, "fb_defio enable=%d\n", fb_defio); dev_dbg(&intf->dev, "fb_defio enable=%d\n", fb_defio);
dev_dbg(&intf->dev, "shadow enable=%d\n", shadow); dev_dbg(&intf->dev, "shadow enable=%d\n", shadow);
...@@ -1674,6 +1681,7 @@ static int dlfb_usb_probe(struct usb_interface *intf, ...@@ -1674,6 +1681,7 @@ static int dlfb_usb_probe(struct usb_interface *intf,
if (!dlfb_parse_vendor_descriptor(dlfb, intf)) { if (!dlfb_parse_vendor_descriptor(dlfb, intf)) {
dev_err(&intf->dev, dev_err(&intf->dev,
"firmware not recognized, incompatible device?\n"); "firmware not recognized, incompatible device?\n");
retval = -ENODEV;
goto error; goto error;
} }
...@@ -1687,8 +1695,10 @@ static int dlfb_usb_probe(struct usb_interface *intf, ...@@ -1687,8 +1695,10 @@ static int dlfb_usb_probe(struct usb_interface *intf,
/* allocates framebuffer driver structure, not framebuffer memory */ /* allocates framebuffer driver structure, not framebuffer memory */
info = framebuffer_alloc(0, &dlfb->udev->dev); info = framebuffer_alloc(0, &dlfb->udev->dev);
if (!info) if (!info) {
retval = -ENOMEM;
goto error; goto error;
}
dlfb->info = info; dlfb->info = info;
info->par = dlfb; info->par = dlfb;
......
...@@ -54,10 +54,9 @@ ...@@ -54,10 +54,9 @@
#include <linux/nvram.h> #include <linux/nvram.h>
#include <linux/adb.h> #include <linux/adb.h>
#include <linux/cuda.h> #include <linux/cuda.h>
#include <linux/of_address.h>
#ifdef CONFIG_MAC #ifdef CONFIG_MAC
#include <asm/macintosh.h> #include <asm/macintosh.h>
#else
#include <asm/prom.h>
#endif #endif
#include "macmodes.h" #include "macmodes.h"
......
...@@ -321,6 +321,9 @@ static int vt8623fb_check_var(struct fb_var_screeninfo *var, struct fb_info *inf ...@@ -321,6 +321,9 @@ static int vt8623fb_check_var(struct fb_var_screeninfo *var, struct fb_info *inf
{ {
int rv, mem, step; int rv, mem, step;
if (!var->pixclock)
return -EINVAL;
/* Find appropriate format */ /* Find appropriate format */
rv = svga_match_format (vt8623fb_formats, var, NULL); rv = svga_match_format (vt8623fb_formats, var, NULL);
if (rv < 0) if (rv < 0)
......
...@@ -199,7 +199,7 @@ struct display_timings *of_get_display_timings(const struct device_node *np) ...@@ -199,7 +199,7 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
struct display_timing *dt; struct display_timing *dt;
int r; int r;
dt = kzalloc(sizeof(*dt), GFP_KERNEL); dt = kmalloc(sizeof(*dt), GFP_KERNEL);
if (!dt) { if (!dt) {
pr_err("%pOF: could not allocate display_timing struct\n", pr_err("%pOF: could not allocate display_timing struct\n",
np); np);
......
...@@ -182,7 +182,7 @@ struct fb_fix_screeninfo { ...@@ -182,7 +182,7 @@ struct fb_fix_screeninfo {
* *
* For pseudocolor: offset and length should be the same for all color * For pseudocolor: offset and length should be the same for all color
* components. Offset specifies the position of the least significant bit * components. Offset specifies the position of the least significant bit
* of the pallette index in a pixel value. Length indicates the number * of the palette index in a pixel value. Length indicates the number
* of available palette entries (i.e. # of entries = 1 << length). * of available palette entries (i.e. # of entries = 1 << length).
*/ */
struct fb_bitfield { struct fb_bitfield {
......
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