| 404 | } |
| 405 | |
| 406 | static ssize_t xlate_writeat(const struct region_device *rd, const void *b, |
| 407 | size_t offset, size_t size) |
| 408 | { |
| 409 | struct region req = { |
| 410 | .offset = offset, |
| 411 | .size = size, |
| 412 | }; |
| 413 | const struct xlate_window *xlwindow; |
| 414 | const struct xlate_region_device *xldev; |
| 415 | |
| 416 | xldev = container_of(rd, typeof(*xldev), rdev); |
| 417 | |
| 418 | xlwindow = xlate_find_window(xldev, &req); |
| 419 | if (!xlwindow) |
| 420 | return -1; |
| 421 | |
| 422 | offset -= region_offset(&xlwindow->sub_region); |
| 423 | |
| 424 | return rdev_writeat(xlwindow->access_dev, b, offset, size); |
| 425 | } |
| 426 | |
| 427 | static ssize_t xlate_eraseat(const struct region_device *rd, |
| 428 | size_t offset, size_t size) |
nothing calls this directly
no test coverage detected