| 349 | } |
| 350 | |
| 351 | static void *xlate_mmap(const struct region_device *rd, size_t offset, |
| 352 | size_t size) |
| 353 | { |
| 354 | const struct xlate_region_device *xldev; |
| 355 | struct region req = { |
| 356 | .offset = offset, |
| 357 | .size = size, |
| 358 | }; |
| 359 | const struct xlate_window *xlwindow; |
| 360 | |
| 361 | xldev = container_of(rd, typeof(*xldev), rdev); |
| 362 | |
| 363 | xlwindow = xlate_find_window(xldev, &req); |
| 364 | if (!xlwindow) |
| 365 | return NULL; |
| 366 | |
| 367 | offset -= region_offset(&xlwindow->sub_region); |
| 368 | |
| 369 | return rdev_mmap(xlwindow->access_dev, offset, size); |
| 370 | } |
| 371 | |
| 372 | static int xlate_munmap(const struct region_device *rd __always_unused, |
| 373 | void *mapping __always_unused) |
nothing calls this directly
no test coverage detected