Commit eec4ed31 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull fbdev updates from Helge Deller:
 "Here's a fix for the smscufx USB graphics card to prevent a kernel
  crash if it's plugged in/out too fast.

  The other patches are mostly small cleanups, fixes in failure paths
  and code removal:

   - fix an use-after-free in smscufx USB graphics driver

   - add missing pci_disable_device() in tridentfb failure paths

   - correctly handle irq detection failure in mb862xx driver

   - fix resume code in omapfb/dss

   - drop unused code in controlfb, tridentfb, arkfb, imxfb and udlfb

   - convert uvesafb to use scnprintf() instead of snprintf()

   - convert gbefb to use dev_groups

   - add MODULE_DEVICE_TABLE() entry to vga16fb"

* tag 'fbdev-for-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  fbdev: mb862xx: Fix check of return value from irq_of_parse_and_map()
  fbdev: vga16fb: Add missing MODULE_DEVICE_TABLE() entry
  fbdev: tridentfb: Fix missing pci_disable_device() in probe and remove
  fbdev: smscufx: Fix use-after-free in ufx_ops_open()
  fbdev: gbefb: Convert to use dev_groups
  fbdev: imxfb: Remove redundant dev_err() call
  fbdev: omapfb/dss: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
  fbdev: uvesafb: Convert snprintf to scnprintf
  fbdev: arkfb: Remove the unused function dac_read_reg()
  fbdev: tridentfb: Remove the unused function shadowmode_off()
  fbdev: controlfb: Remove the unused function VAR_MATCH()
  fbdev: udlfb: Remove redundant initialization to variable identical
parents 500b717f 29926f1c
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -318,14 +318,6 @@ struct dac_info
	void *data;
};


static inline u8 dac_read_reg(struct dac_info *info, u8 reg)
{
	u8 code[2] = {reg, 0};
	info->dac_read_regs(info->data, code, 1);
	return code[1];
}

static inline void dac_read_regs(struct dac_info *info, u8 *code, int count)
{
	info->dac_read_regs(info->data, code, count);
+0 −7
Original line number Diff line number Diff line
@@ -108,13 +108,6 @@ static inline int PAR_EQUAL(struct fb_par_control *x, struct fb_par_control *y)
	return (!DIRTY(cmode) && !DIRTY(xres) && !DIRTY(yres)
		&& !DIRTY(vxres) && !DIRTY(vyres));
}
static inline int VAR_MATCH(struct fb_var_screeninfo *x, struct fb_var_screeninfo *y)
{
	return (!DIRTY(bits_per_pixel) && !DIRTY(xres)
		&& !DIRTY(yres) && !DIRTY(xres_virtual)
		&& !DIRTY(yres_virtual)
		&& !DIRTY_CMAP(red) && !DIRTY_CMAP(green) && !DIRTY_CMAP(blue));
}

struct fb_info_control {
	struct fb_info		info;
+7 −13
Original line number Diff line number Diff line
@@ -1072,17 +1072,12 @@ static ssize_t gbefb_show_rev(struct device *device, struct device_attribute *at

static DEVICE_ATTR(revision, S_IRUGO, gbefb_show_rev, NULL);

static void gbefb_remove_sysfs(struct device *dev)
{
	device_remove_file(dev, &dev_attr_size);
	device_remove_file(dev, &dev_attr_revision);
}

static void gbefb_create_sysfs(struct device *dev)
{
	device_create_file(dev, &dev_attr_size);
	device_create_file(dev, &dev_attr_revision);
}
static struct attribute *gbefb_attrs[] = {
	&dev_attr_size.attr,
	&dev_attr_revision.attr,
	NULL,
};
ATTRIBUTE_GROUPS(gbefb);

/*
 * Initialization
@@ -1221,7 +1216,6 @@ static int gbefb_probe(struct platform_device *p_dev)
	}

	platform_set_drvdata(p_dev, info);
	gbefb_create_sysfs(&p_dev->dev);

	fb_info(info, "%s rev %d @ 0x%08x using %dkB memory\n",
		info->fix.id, gbe_revision, (unsigned)GBE_BASE,
@@ -1248,7 +1242,6 @@ static int gbefb_remove(struct platform_device* p_dev)
	gbe_turn_off();
	arch_phys_wc_del(par->wc_cookie);
	release_mem_region(GBE_BASE, sizeof(struct sgi_gbe));
	gbefb_remove_sysfs(&p_dev->dev);
	framebuffer_release(info);

	return 0;
@@ -1259,6 +1252,7 @@ static struct platform_driver gbefb_driver = {
	.remove = gbefb_remove,
	.driver	= {
		.name = "gbefb",
		.dev_groups	= gbefb_groups,
	},
};

+0 −1
Original line number Diff line number Diff line
@@ -972,7 +972,6 @@ static int imxfb_probe(struct platform_device *pdev)

	fbi->regs = devm_ioremap_resource(&pdev->dev, res);
	if (IS_ERR(fbi->regs)) {
		dev_err(&pdev->dev, "Cannot map frame buffer registers\n");
		ret = PTR_ERR(fbi->regs);
		goto failed_ioremap;
	}
+1 −1
Original line number Diff line number Diff line
@@ -693,7 +693,7 @@ static int of_platform_mb862xx_probe(struct platform_device *ofdev)
	par->dev = dev;

	par->irq = irq_of_parse_and_map(np, 0);
	if (par->irq == NO_IRQ) {
	if (!par->irq) {
		dev_err(dev, "failed to map irq\n");
		ret = -ENODEV;
		goto fbrel;
Loading