mirror of
https://github.com/opnsense/src.git
synced 2026-05-16 11:09:35 -04:00
linuxkpi: Add sg_init_one
Needed for the virtio-gpu driver.
Reviewed By: #linuxkpi, manu, bz, hselasky
Differential Revision: https://reviews.freebsd.org/D32366
(cherry picked from commit 2686b10db4)
This commit is contained in:
parent
cbbdacf4dc
commit
82b4e784f3
1 changed files with 7 additions and 0 deletions
|
|
@ -188,6 +188,13 @@ sg_init_table(struct scatterlist *sg, unsigned int nents)
|
|||
sg_mark_end(&sg[nents - 1]);
|
||||
}
|
||||
|
||||
static inline void
|
||||
sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen)
|
||||
{
|
||||
sg_init_table(sg, 1);
|
||||
sg_set_buf(sg, buf, buflen);
|
||||
}
|
||||
|
||||
static struct scatterlist *
|
||||
sg_kmalloc(unsigned int nents, gfp_t gfp_mask)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue