···3838#include <linux/mm.h>3939#include <linux/slab.h>4040#include "comedidev.h"4141-#include "wrapper.h"4241#include <linux/highmem.h> /* for SuSE brokenness */4342#include <linux/vmalloc.h>4443#include <linux/cdev.h>···441442 unsigned i;442443 for (i = 0; i < async->n_buf_pages; ++i) {443444 if (async->buf_page_list[i].virt_addr) {444444- mem_map_unreserve(virt_to_page445445- (async->buf_page_list[i].446446- virt_addr));445445+ clear_bit(PG_reserved, &(virt_to_page(async->buf_page_list[i].virt_addr)->flags));447446 if (s->async_dma_dir != DMA_NONE) {448447 dma_free_coherent(dev->hw_dev,449448 PAGE_SIZE,···494497 if (async->buf_page_list[i].virt_addr == NULL)495498 break;496499497497- mem_map_reserve(virt_to_page498498- (async->buf_page_list[i].499499- virt_addr));500500- pages[i] =501501- virt_to_page(async->502502- buf_page_list[i].virt_addr);500500+ set_bit(PG_reserved,501501+ &(virt_to_page(async->buf_page_list[i].virt_addr)->flags));502502+ pages[i] = virt_to_page(async->buf_page_list[i].virt_addr);503503 }504504 }505505 if (i == n_pages) {···513519 NULL) {514520 break;515521 }516516- mem_map_unreserve(virt_to_page517517- (async->buf_page_list518518- [i].virt_addr));522522+ clear_bit(PG_reserved, &(virt_to_page(async->buf_page_list[i].virt_addr)->flags));519523 if (s->async_dma_dir != DMA_NONE) {520524 dma_free_coherent(dev->hw_dev,521525 PAGE_SIZE,
-25
drivers/staging/comedi/wrapper.h
···11-/*22- linux/wrapper.h compatibility header33-44- This program is free software; you can redistribute it and/or modify55- it under the terms of the GNU General Public License as published by66- the Free Software Foundation; either version 2 of the License, or77- (at your option) any later version.88-99- This program is distributed in the hope that it will be useful,1010- but WITHOUT ANY WARRANTY; without even the implied warranty of1111- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1212- GNU General Public License for more details.1313-1414- You should have received a copy of the GNU General Public License1515- along with this program; if not, write to the Free Software1616- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.1717- */1818-1919-#ifndef __COMPAT_LINUX_WRAPPER_H_2020-#define __COMPAT_LINUX_WRAPPER_H_2121-2222-#define mem_map_reserve(p) set_bit(PG_reserved, &((p)->flags))2323-#define mem_map_unreserve(p) clear_bit(PG_reserved, &((p)->flags))2424-2525-#endif /* __COMPAT_LINUX_WRAPPER_H_ */