obj-y += ion/
-obj-$(CONFIG_ASHMEM) += ashmem.o
+ashmem_linux-y += ashmem.o
+obj-$(CONFIG_ASHMEM) += ashmem_linux.o
obj-$(CONFIG_ANDROID_VSOC) += vsoc.o
#include <linux/security.h>
#include <linux/mm.h>
#include <linux/mman.h>
+#include <linux/module.h>
#include <linux/uaccess.h>
#include <linux/personality.h>
#include <linux/bitops.h>
out:
return ret;
}
-device_initcall(ashmem_init);
+
+static void __exit ashmem_exit(void)
+{
+ misc_deregister(&ashmem_misc);
+ unregister_shrinker(&ashmem_shrinker);
+ kmem_cache_destroy(ashmem_range_cachep);
+ kmem_cache_destroy(ashmem_area_cachep);
+}
+
+module_init(ashmem_init);
+module_exit(ashmem_exit);
+
+MODULE_AUTHOR("Google, Inc.");
+MODULE_DESCRIPTION("Driver for Android shared memory device");
+MODULE_LICENSE("GPL v2");
return 0;
}
+EXPORT_SYMBOL_GPL(shmem_zero_setup);
/**
* shmem_read_mapping_page_gfp - read into page cache, using specified page allocation flags.