Commit 1007e613 authored by Maninder Singh's avatar Maninder Singh Committed by Greg Kroah-Hartman
Browse files

staging: fbtft: Fix 'line over 80 characters'



This patch fixes the following checkpatch.pl warning
WARNING: line over 80 characters

Signed-off-by: default avatarManinder Singh <maninder.s2@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fbcda650
Loading
Loading
Loading
Loading
+20 −11
Original line number Diff line number Diff line
@@ -253,7 +253,8 @@ static int fbtft_backlight_update_status(struct backlight_device *bd)
		"%s: polarity=%d, power=%d, fb_blank=%d\n",
		__func__, polarity, bd->props.power, bd->props.fb_blank);

	if ((bd->props.power == FB_BLANK_UNBLANK) && (bd->props.fb_blank == FB_BLANK_UNBLANK))
	if ((bd->props.power == FB_BLANK_UNBLANK) &&
	    (bd->props.fb_blank == FB_BLANK_UNBLANK))
		gpio_set_value(par->gpio.led[0], polarity);
	else
		gpio_set_value(par->gpio.led[0], !polarity);
@@ -299,7 +300,8 @@ void fbtft_register_backlight(struct fbtft_par *par)
		bl_props.state |= BL_CORE_DRIVER1;

	bd = backlight_device_register(dev_driver_string(par->info->device),
				par->info->device, par, &fbtft_bl_ops, &bl_props);
				       par->info->device, par,
				       &fbtft_bl_ops, &bl_props);
	if (IS_ERR(bd)) {
		dev_err(par->info->device,
			"cannot register backlight device (%ld)\n",
@@ -350,9 +352,11 @@ static void fbtft_update_display(struct fbtft_par *par, unsigned int start_line,
	bool timeit = false;
	int ret = 0;

	if (unlikely(par->debug & (DEBUG_TIME_FIRST_UPDATE | DEBUG_TIME_EACH_UPDATE))) {
	if (unlikely(par->debug & (DEBUG_TIME_FIRST_UPDATE |
			DEBUG_TIME_EACH_UPDATE))) {
		if ((par->debug & DEBUG_TIME_EACH_UPDATE) ||
				((par->debug & DEBUG_TIME_FIRST_UPDATE) && !par->first_update_done)) {
				((par->debug & DEBUG_TIME_FIRST_UPDATE) &&
				!par->first_update_done)) {
			ts_start = ktime_get();
			timeit = true;
		}
@@ -366,10 +370,12 @@ static void fbtft_update_display(struct fbtft_par *par, unsigned int start_line,
		start_line = 0;
		end_line = par->info->var.yres - 1;
	}
	if (start_line > par->info->var.yres - 1 || end_line > par->info->var.yres - 1) {
	if (start_line > par->info->var.yres - 1 ||
	    end_line > par->info->var.yres - 1) {
		dev_warn(par->info->device,
			"%s: start_line=%u or end_line=%u is larger than max=%d. Shouldn't happen, will do full display update\n",
			__func__, start_line, end_line, par->info->var.yres - 1);
			 __func__, start_line,
			 end_line, par->info->var.yres - 1);
		start_line = 0;
		end_line = par->info->var.yres - 1;
	}
@@ -665,7 +671,8 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
	unsigned long *gamma_curves = NULL;

	/* sanity check */
	if (display->gamma_num * display->gamma_len > FBTFT_GAMMA_MAX_VALUES_TOTAL) {
	if (display->gamma_num * display->gamma_len >
			FBTFT_GAMMA_MAX_VALUES_TOTAL) {
		dev_err(dev, "FBTFT_GAMMA_MAX_VALUES_TOTAL=%d is exceeded\n",
			FBTFT_GAMMA_MAX_VALUES_TOTAL);
		return NULL;
@@ -832,11 +839,13 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
#ifdef CONFIG_HAS_DMA
		if (dma) {
			dev->coherent_dma_mask = ~0;
			txbuf = dmam_alloc_coherent(dev, txbuflen, &par->txbuf.dma, GFP_DMA);
			txbuf = dmam_alloc_coherent(dev, txbuflen,
						    &par->txbuf.dma, GFP_DMA);
		} else
#endif
		{
			txbuf = devm_kzalloc(par->info->device, txbuflen, GFP_KERNEL);
			txbuf = devm_kzalloc(par->info->device,
					     txbuflen, GFP_KERNEL);
		}
		if (!txbuf)
			goto alloc_fail;