Skip to content

Commit

Permalink
Staging: comedi: remove wrapper.h
Browse files Browse the repository at this point in the history
Just make the bit call when it is needed, no need to wrap
things up like this for no reason.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed May 11, 2010
1 parent 47c9285 commit be29eac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 38 deletions.
18 changes: 5 additions & 13 deletions drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <linux/mm.h>
#include <linux/slab.h>
#include "comedidev.h"
#include "wrapper.h"
#include <linux/highmem.h> /* for SuSE brokenness */
#include <linux/vmalloc.h>
#include <linux/cdev.h>
Expand Down Expand Up @@ -442,9 +441,7 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned i;
for (i = 0; i < async->n_buf_pages; ++i) {
if (async->buf_page_list[i].virt_addr) {
mem_map_unreserve(virt_to_page
(async->buf_page_list[i].
virt_addr));
clear_bit(PG_reserved, &(virt_to_page(async->buf_page_list[i].virt_addr)->flags));
if (s->async_dma_dir != DMA_NONE) {
dma_free_coherent(dev->hw_dev,
PAGE_SIZE,
Expand Down Expand Up @@ -497,12 +494,9 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
if (async->buf_page_list[i].virt_addr == NULL)
break;

mem_map_reserve(virt_to_page
(async->buf_page_list[i].
virt_addr));
pages[i] =
virt_to_page(async->
buf_page_list[i].virt_addr);
set_bit(PG_reserved,
&(virt_to_page(async->buf_page_list[i].virt_addr)->flags));
pages[i] = virt_to_page(async->buf_page_list[i].virt_addr);
}
}
if (i == n_pages) {
Expand All @@ -519,9 +513,7 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
NULL) {
break;
}
mem_map_unreserve(virt_to_page
(async->buf_page_list
[i].virt_addr));
clear_bit(PG_reserved, &(virt_to_page(async->buf_page_list[i].virt_addr)->flags));
if (s->async_dma_dir != DMA_NONE) {
dma_free_coherent(dev->hw_dev,
PAGE_SIZE,
Expand Down
25 changes: 0 additions & 25 deletions drivers/staging/comedi/wrapper.h

This file was deleted.

0 comments on commit be29eac

Please sign in to comment.