This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit e5cbb49e9449ecf62f802d592bdb2c79530cd690
Author: cuiziwei <[email protected]>
AuthorDate: Thu Mar 6 11:24:22 2025 +0800

    drivers/video: Adapt to the new vm_map_region/vm_unmap_region.
    
    vm_map_region() and vm_unmap_region() now take the mm_map of the task
    group.  Pass the current one in fb_mmap() and the one of the group in
    fb_munmap().
    
    Assisted-by: Kiro:claude-opus-5-5
    Signed-off-by: cuiziwei <[email protected]>
---
 drivers/video/fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index c5d6ee16e0e..a27869fd290 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -1374,7 +1374,7 @@ static int fb_munmap(FAR struct task_group_s *group,
   if (group && entry)
     {
       ginfo("%p, len=%zu\n", entry->vaddr, entry->length);
-      vm_unmap_region(entry->vaddr, entry->length);
+      vm_unmap_region(get_group_mm(group), entry->vaddr, entry->length);
       mm_map_remove(get_current_mm(), entry);
     }
 
@@ -1417,7 +1417,7 @@ static int fb_mmap(FAR struct file *filep, FAR struct 
mm_map_entry_s *map)
   /* Return the address corresponding to the start of frame buffer. */
 
 #ifdef CONFIG_BUILD_KERNEL
-  map->vaddr = vm_map_region((uintptr_t)addr, map->length);
+  map->vaddr = vm_map_region(get_current_mm(), (uintptr_t)addr, map->length);
   map->munmap = fb_munmap;
   mm_map_add(get_current_mm(), map);
 #else

Reply via email to