Commit 2685cffa authored by Bernie Thompson's avatar Bernie Thompson Committed by Greg Kroah-Hartman
Browse files

staging: udlfb: fix checkpatch and style



Fix warnings detected by tools

Signed-off-by: default avatarBernie Thompson <bernie@plugable.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5bea1fbf
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@
#include <linux/slab.h>
#include <linux/delay.h>


#include "udlfb.h"

static struct fb_fix_screeninfo dlfb_fix = {
@@ -256,6 +255,7 @@ static int dlfb_set_video_mode(struct dlfb_data *dev,
	urb = dlfb_get_urb(dev);
	if (!urb)
		return -ENOMEM;

	buf = (char *) urb->transfer_buffer;

	/*
@@ -288,13 +288,14 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma)
	unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
	unsigned long page, pos;

	dl_notice("MMAP: %lu %u\n", offset + size, info->fix.smem_len);

	if (offset + size > info->fix.smem_len)
		return -EINVAL;

	pos = (unsigned long)info->fix.smem_start + offset;

	dl_notice("mmap() framebuffer addr:%lu size:%lu\n",
		  pos, size);

	while (size > 0) {
		page = vmalloc_to_pfn((void *)pos);
		if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
@@ -310,7 +311,6 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma)

	vma->vm_flags |= VM_RESERVED;	/* avoid to swap out this VMA */
	return 0;

}

/*
@@ -378,7 +378,7 @@ static int dlfb_trim_hline(const u8 *bback, const u8 **bfront, int *width_bytes)
 * This has a slightly larger header overhead, but produces more even results.
 * It also processes all data (read and write) in a single pass.
 * Performance benchmarks of common cases show it having just slightly better
 * compression than 256 pixel raw -or- rle commands, with similar CPU consumpion.
 * compression than 256 pixel raw or rle commands, with similar CPU consumpion.
 * But for very rl friendly data, will compress not quite as well.
 */
static void dlfb_compress_hline(
@@ -1536,8 +1536,8 @@ static int dlfb_usb_probe(struct usb_interface *interface,
	struct usb_device *usbdev;
	struct dlfb_data *dev = 0;
	struct fb_info *info = 0;
	int i;
	int retval = -ENOMEM;
	int i;

	/* usb initialization */