Re: [PATCH] Add support for usbfs zerocopy.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 26, 2015 at 01:19:13AM +0100, Steinar H. Gunderson wrote:
> +static int usbdev_mmap(struct file *file, struct vm_area_struct *vma)
> +{
> +	struct usb_memory *usbm = NULL;
> +	struct usb_dev_state *ps = file->private_data;
> +	size_t size = vma->vm_end - vma->vm_start;
> +	void *mem;
> +	unsigned long flags;
> +	dma_addr_t dma_handle;
> +	int ret;
> +
> +	ret = usbfs_increase_memory_usage(size + sizeof(struct usb_memory));
> +	if (ret) {
> +		return ret;
> +	}

The braces are not needed.

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux