forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/common/videobuf2/videobuf2-memops.c
....@@ -26,7 +26,6 @@
2626 * vb2_create_framevec() - map virtual addresses to pfns
2727 * @start: Virtual user address where we start mapping
2828 * @length: Length of a range to map
29
- * @write: Should we map for writing into the area
3029 *
3130 * This function allocates and fills in a vector with pfns corresponding to
3231 * virtual address range passed in arguments. If pfns have corresponding pages,
....@@ -35,17 +34,13 @@
3534 * failure. Returned vector needs to be freed via vb2_destroy_pfnvec().
3635 */
3736 struct frame_vector *vb2_create_framevec(unsigned long start,
38
- unsigned long length,
39
- bool write)
37
+ unsigned long length)
4038 {
4139 int ret;
4240 unsigned long first, last;
4341 unsigned long nr;
4442 struct frame_vector *vec;
45
- unsigned int flags = FOLL_FORCE;
46
-
47
- if (write)
48
- flags |= FOLL_WRITE;
43
+ unsigned int flags = FOLL_FORCE | FOLL_WRITE;
4944
5045 first = start >> PAGE_SHIFT;
5146 last = (start + length - 1) >> PAGE_SHIFT;
....@@ -121,7 +116,7 @@
121116 }
122117
123118 /*
124
- * vb2_common_vm_ops - common vm_ops used for tracking refcount of mmaped
119
+ * vb2_common_vm_ops - common vm_ops used for tracking refcount of mmapped
125120 * video buffers
126121 */
127122 const struct vm_operations_struct vb2_common_vm_ops = {