diff options
| author | Bartlomiej Zolnierkiewicz <bzolnier@trik.(none)> | 2004-10-19 23:46:59 +0200 |
|---|---|---|
| committer | Bartlomiej Zolnierkiewicz <bzolnier@trik.(none)> | 2004-10-19 23:46:59 +0200 |
| commit | 162aa2bca3010f84f734016cec915f0eea7f748c (patch) | |
| tree | 29c4f881592afd8ef5ec648698d872b671540e25 /include | |
| parent | 2a136606fe21b603a0ce484fc578f862f8e8384d (diff) | |
[ide] add sg_init_one() helper and teach ide about it
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/scatterlist.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h new file mode 100644 index 000000000000..7f717e95ae37 --- /dev/null +++ b/include/linux/scatterlist.h @@ -0,0 +1,14 @@ +#ifndef _LINUX_SCATTERLIST_H +#define _LINUX_SCATTERLIST_H + +static inline void sg_init_one(struct scatterlist *sg, + u8 *buf, unsigned int buflen) +{ + memset(sg, 0, sizeof(*sg)); + + sg->page = virt_to_page(buf); + sg->offset = offset_in_page(buf); + sg->length = buflen; +} + +#endif /* _LINUX_SCATTERLIST_H */ |
