Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e630afd authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'fbdev-v4.17' of git://github.com/bzolnier/linux

Pull fbdev updates from Bartlomiej Zolnierkiewicz:
 "There is nothing really major here, just a couple of small bugfixes,
  improvements and cleanups:

   - make it possible to load radeonfb driver when offb driver is loaded
     first (Mathieu Malaterre)

   - fix memory leak in offb driver (Mathieu Malaterre)

   - fix unaligned access in udlfb driver (Ladislav Michl)

   - convert atmel_lcdfb driver to use GPIO descriptors (Ludovic
     Desroches)

   - avoid mismatched prototypes in sisfb driver (Arnd Bergmann)

   - remove VLA usage from viafb driver (Gustavo A. R. Silva)

   - add missing help text to FB_I810_I2 config option (Ulf Magnusson)

   - misc fixes (Gustavo A. R. Silva, Colin Ian King, Markus Elfring)

   - remove dead code from s3c-fb driver for Exynos and S5PV210
     platforms

   - misc cleanups (Corentin Labbe, Ladislav Michl, Ulf Magnusson,
     Vladimir Zapolskiy, Markus Elfring)"

* tag 'fbdev-v4.17' of git://github.com/bzolnier/linux: (32 commits)
  video: fbdev: s3c-fb: remove dead platform code for Exynos and S5PV210 platforms
  video: au1100fb: Delete an unnecessary variable initialisation in au1100fb_drv_probe()
  video: au1100fb: Improve a size determination in au1100fb_drv_probe()
  video: au1100fb: Delete an error message for a failed memory allocation in au1100fb_drv_probe()
  video/console/sticore: Delete an error message for a failed memory allocation in sti_try_rom_generic()
  video: ARM CLCD: Improve a size determination in clcdfb_probe()
  video: ARM CLCD: Delete an error message for a failed memory allocation in clcdfb_probe()
  video: matroxfb: Delete an error message for a failed memory allocation in matroxfb_crtc2_probe()
  video: s3c-fb: Improve a size determination in s3c_fb_probe()
  video: s3c-fb: Delete an error message for a failed memory allocation in s3c_fb_probe()
  video: fsl-diu-fb: Delete an error message for a failed memory allocation in fsl_diu_init()
  video: ssd1307fb: Improve a size determination in ssd1307fb_probe()
  video: smscufx: Delete an error message for a failed memory allocation in ufx_realloc_framebuffer()
  video: smscufx: Return an error code only as a constant in ufx_realloc_framebuffer()
  video: smscufx: Less checks in ufx_usb_probe() after error detection
  video: udlfb: Return an error code only as a constant in dlfb_realloc_framebuffer()
  video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_init_fb()
  video/fbdev/stifb: Return -ENOMEM after a failed kzalloc() in stifb_init_fb()
  video: fbdev: aty128fb: use true and false for boolean values
  fbdev: aty: fix missing indentation in if statement
  ...
parents 7aa1cf25 7c9b845e
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -9,9 +9,6 @@ if HAS_IOMEM
config HAVE_FB_ATMEL
	bool

config SH_LCD_MIPI_DSI
	bool

source "drivers/char/agp/Kconfig"

source "drivers/gpu/vga/Kconfig"
+1 −3
Original line number Diff line number Diff line
@@ -827,10 +827,8 @@ static struct sti_struct *sti_try_rom_generic(unsigned long address,
	}
	
	sti = kzalloc(sizeof(*sti), GFP_KERNEL);
	if (!sti) {
		printk(KERN_ERR "Not enough memory !\n");
	if (!sti)
		return NULL;
	}

	spin_lock_init(&sti->lock);

+6 −2
Original line number Diff line number Diff line
@@ -1053,6 +1053,11 @@ config FB_I810_I2C
	bool "Enable DDC Support"
	depends on FB_I810 && FB_I810_GTF
	select FB_DDC
	help
	  Add DDC/I2C support for i810fb.  This will allow the driver to get
	  display information, especially for monitors with fickle timings.

	  If unsure, say Y.

config FB_LE80578
	tristate "Intel LE80578 (Vermilion) support"
@@ -1917,8 +1922,7 @@ config FB_TMIO_ACCELL

config FB_S3C
	tristate "Samsung S3C framebuffer support"
	depends on FB && (CPU_S3C2416 || ARCH_S3C64XX || \
		ARCH_S5PV210 || ARCH_EXYNOS)
	depends on FB && (CPU_S3C2416 || ARCH_S3C64XX)
	select FB_CFB_FILLRECT
	select FB_CFB_COPYAREA
	select FB_CFB_IMAGEBLIT
+1 −2
Original line number Diff line number Diff line
@@ -967,9 +967,8 @@ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id)
		goto out;
	}

	fb = kzalloc(sizeof(struct clcd_fb), GFP_KERNEL);
	fb = kzalloc(sizeof(*fb), GFP_KERNEL);
	if (!fb) {
		printk(KERN_INFO "CLCD: could not allocate new clcd_fb struct\n");
		ret = -ENOMEM;
		goto free_region;
	}
+12 −19
Original line number Diff line number Diff line
@@ -18,10 +18,10 @@
#include <linux/delay.h>
#include <linux/backlight.h>
#include <linux/gfp.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_gpio.h>
#include <video/of_display_timing.h>
#include <linux/regulator/consumer.h>
#include <video/videomode.h>
@@ -61,8 +61,7 @@ struct atmel_lcdfb_info {
};

struct atmel_lcdfb_power_ctrl_gpio {
	int gpio;
	int active_low;
	struct gpio_desc *gpiod;

	struct list_head list;
};
@@ -1018,7 +1017,7 @@ static void atmel_lcdfb_power_control_gpio(struct atmel_lcdfb_pdata *pdata, int
	struct atmel_lcdfb_power_ctrl_gpio *og;

	list_for_each_entry(og, &pdata->pwr_gpios, list)
		gpio_set_value(og->gpio, on);
		gpiod_set_value(og->gpiod, on);
}

static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
@@ -1031,11 +1030,11 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
	struct device_node *display_np;
	struct device_node *timings_np;
	struct display_timings *timings;
	enum of_gpio_flags flags;
	struct atmel_lcdfb_power_ctrl_gpio *og;
	bool is_gpio_power = false;
	struct gpio_desc *gpiod;
	int ret = -ENOENT;
	int i, gpio;
	int i;

	sinfo->config = (struct atmel_lcdfb_config*)
		of_match_device(atmel_lcdfb_dt_ids, dev)->data;
@@ -1072,28 +1071,22 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)

	INIT_LIST_HEAD(&pdata->pwr_gpios);
	ret = -ENOMEM;
	for (i = 0; i < of_gpio_named_count(display_np, "atmel,power-control-gpio"); i++) {
		gpio = of_get_named_gpio_flags(display_np, "atmel,power-control-gpio",
					       i, &flags);
		if (gpio < 0)
	for (i = 0; i < gpiod_count(dev, "atmel,power-control"); i++) {
		gpiod = devm_gpiod_get_index(dev, "atmel,power-control",
					     i, GPIOD_ASIS);
		if (IS_ERR(gpiod))
			continue;

		og = devm_kzalloc(dev, sizeof(*og), GFP_KERNEL);
		if (!og)
			goto put_display_node;

		og->gpio = gpio;
		og->active_low = flags & OF_GPIO_ACTIVE_LOW;
		og->gpiod = gpiod;
		is_gpio_power = true;
		ret = devm_gpio_request(dev, gpio, "lcd-power-control-gpio");
		if (ret) {
			dev_err(dev, "request gpio %d failed\n", gpio);
			goto put_display_node;
		}

		ret = gpio_direction_output(gpio, og->active_low);
		ret = gpiod_direction_output(gpiod, gpiod_is_active_low(gpiod));
		if (ret) {
			dev_err(dev, "set direction output gpio %d failed\n", gpio);
			dev_err(dev, "set direction output gpio atmel,power-control[%d] failed\n", i);
			goto put_display_node;
		}
		list_add(&og->list, &pdata->pwr_gpios);
Loading