Skip to content

Commit 7807759

Browse files
author
Stefan Richter
committed
firewire: core: code cleanup after vm_map_pages_zero introduction
Commit 22660db turned fw_iso_buffer_map_vma into a one-liner. There is no need to keep this in the core-iso.c collection of buffer management functions; put it inline into the sole user, the character device file driver. Signed-off-by: Stefan Richter <[email protected]>
1 parent b98c751 commit 7807759

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

drivers/firewire/core-cdev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,8 @@ static int fw_device_op_mmap(struct file *file, struct vm_area_struct *vma)
16941694
if (ret < 0)
16951695
goto fail;
16961696

1697-
ret = fw_iso_buffer_map_vma(&client->buffer, vma);
1697+
ret = vm_map_pages_zero(vma, client->buffer.pages,
1698+
client->buffer.page_count);
16981699
if (ret < 0)
16991700
goto fail;
17001701

drivers/firewire/core-iso.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,6 @@ int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
9191
}
9292
EXPORT_SYMBOL(fw_iso_buffer_init);
9393

94-
int fw_iso_buffer_map_vma(struct fw_iso_buffer *buffer,
95-
struct vm_area_struct *vma)
96-
{
97-
return vm_map_pages_zero(vma, buffer->pages,
98-
buffer->page_count);
99-
}
100-
10194
void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer,
10295
struct fw_card *card)
10396
{

drivers/firewire/core.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event);
158158
int fw_iso_buffer_alloc(struct fw_iso_buffer *buffer, int page_count);
159159
int fw_iso_buffer_map_dma(struct fw_iso_buffer *buffer, struct fw_card *card,
160160
enum dma_data_direction direction);
161-
int fw_iso_buffer_map_vma(struct fw_iso_buffer *buffer,
162-
struct vm_area_struct *vma);
163161

164162

165163
/* -topology */

0 commit comments

Comments
 (0)