Porting old module to debian 3.8.13-bone67

Hello forum

I need a comment on my compiling of an old kernel module (abandoned in 2012) to my debian 3.8.13-bone67

I have fixed problems with unresolved includes and missing kernel symbols but doubt this is the correct way of doing it.
The problems are probably due to later kernel revisions and device tree introduction.

When compiling I get the following unresolved references to include files:
#include <plat/omap_device.h>
#include <plat/mcspi.h>
#include <mach/edma.h>

My fixes:
Restored: KERNEL/include/**removed_**plat to KERNEL/include/plat (References the arch/arm/mach-omap2)
Changed: <plat/mcspi.h> to <linux/platform_data/spi-omap2-mcspi.h>
Removed: <mach/edma.h>

The module then compiled without warnings, but complained on missing kernel symbols:

“omap_device_delete”, “omap_hwmod_lookup”, “omap_device_build”

I then added EXPORT_SYMBOL() for the corresponding entries in KERNEL/Arch/arm/mach-omap2/omap_device.c and omap_hwmod.c

(When recompiling the kernel, I had to revert the symbolic link “plat” to “removed_plat” to avoid recursiveness in the include files).

The module now compiles, but I have a feeling of a wrong approach.

Please advice.

Best regards

Terje Froysa