summaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/agp.h
diff options
context:
space:
mode:
authorWang, Yalin <Yalin.Wang@sonymobile.com>2015-01-28 13:57:34 +0800
committerDave Airlie <airlied@redhat.com>2015-01-29 12:37:41 +1000
commite410055331c2f474872b364dce3d4042418e892b (patch)
treeb1ee0e24726b8da7b5451533fdd20986c01db883 /drivers/char/agp/agp.h
parentb3869b17fd63bacb53ac4db4ff4ba093701e17be (diff)
downloadlinux-e410055331c2f474872b364dce3d4042418e892b.tar.gz
linux-e410055331c2f474872b364dce3d4042418e892b.tar.bz2
linux-e410055331c2f474872b364dce3d4042418e892b.zip
agp: change agp_free_page_array to use kvfree
Change agp_free_page_array to use kvfree function, remove the duplicated code. Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char/agp/agp.h')
-rw-r--r--drivers/char/agp/agp.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index b709749c8639..4eb1c772ded7 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -219,7 +219,10 @@ struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev);
/* generic functions for user-populated AGP memory types */
struct agp_memory *agp_generic_alloc_user(size_t page_count, int type);
void agp_alloc_page_array(size_t size, struct agp_memory *mem);
-void agp_free_page_array(struct agp_memory *mem);
+static inline void agp_free_page_array(struct agp_memory *mem)
+{
+ kvfree(mem->pages);
+}
/* generic routines for agp>=3 */