From 91c985b4c8d81997c08b7ed16b17b6fb584b2362 Mon Sep 17 00:00:00 2001 From: Carsten Heinz Date: Thu, 10 Jan 2019 22:25:08 +0100 Subject: [PATCH] Make page lookup compatible with linux 3.1x --- src/fl2000_surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fl2000_surface.c b/src/fl2000_surface.c index 119522c..aaf83f8 100644 --- a/src/fl2000_surface.c +++ b/src/fl2000_surface.c @@ -160,7 +160,7 @@ int fl2000_surface_pin_down( case SURFACE_TYPE_PHYSICAL_CONTIGUOUS: surface->physical_address = surface->user_buffer; - first_page = pfn_to_page(__phys_to_pfn(surface->physical_address)); + first_page = pfn_to_page(PFN_DOWN(__pa(surface->physical_address))); surface->first_page = first_page; for (i = 0; i < nr_pages; i++) pages[i] = first_page + i;