Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

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

 



Hi,

Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> writes:
>> +static int dbc_buf_alloc(struct dbc_buf *db, unsigned int size)
>> +{
>> +	db->buf_buf = kzalloc(size, GFP_KERNEL);
>> +	if (!db->buf_buf)
>> +		return -ENOMEM;
>> +
>> +	db->buf_size = size;
>> +	db->buf_put = db->buf_buf;
>> +	db->buf_get = db->buf_buf;
>> +
>> +	return 0;
>> +}

you may wanna have a look at kfifo.

-- 
balbi
--
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