From 7ea46c718508b825296ed8ef930212b36e6ed85b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Sun, 16 Aug 2015 15:25:51 +0200 Subject: [PATCH] First steps towards full modularization of KLGD-FF --- Makefile | 6 +++--- klgd_ff_plugin.c | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7c20a8d..21fae54 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,9 @@ KBUILD_EXTRA_SYMBOLS := /home/madcat/Devel/KLGD/Module.symvers KBUILD_CFLAGS += -g3 ifneq ($(KERNELRELEASE),) - klgdffm-y := klgd_ff_plugin.o - klgdffm-y += klgdff.o - obj-m += klgdffm.o + klgdffm-y := klgd_ff_plugin.o + klgdffm-y += klgdff.o + obj-m += klgd_ff_plugin.o klgdffm.o else KERNELDIR ?= /lib/modules/$(shell uname -r)/build diff --git a/klgd_ff_plugin.c b/klgd_ff_plugin.c index 8404f27..830257f 100644 --- a/klgd_ff_plugin.c +++ b/klgd_ff_plugin.c @@ -2,6 +2,11 @@ #include #include #include +#include + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Michal \"MadCatX\" Maly"); +MODULE_DESCRIPTION("KLGD-FF Module"); #define DIR_TO_DEGREES(dir) (360 - ((((dir > 0xc000) ? (u32)dir + 0x4000 - 0xffff : (u32)dir + 0x4000) * 360) / 0xffff)) #define FRAC_16 15 @@ -19,6 +24,7 @@ void ffpl_lvl_dir_to_x_y(const s32 level, const u16 direction, s32 *x, s32 *y) *x = (level * fixp_cos16(degrees)) >> FRAC_16; *y = (level * fixp_sin16(degrees)) >> FRAC_16; } +EXPORT_SYMBOL_GPL(ffpl_lvl_dir_to_x_y); inline static bool ffpl_process_memless(const struct klgd_plugin_private *priv, const struct ff_effect *eff) { @@ -1405,6 +1411,7 @@ err_out1: kfree(self); return ret; } +EXPORT_SYMBOL_GPL(ffpl_init_plugin); static bool ffpl_needs_replacing(const struct ff_effect *ac_eff, const struct ff_effect *la_eff) { -- 2.43.5