Actually before you replied I went to kernel.org and downloaded the latest kernel source there. Then I did make and make modules. Then I built my little driver and created the .ko image. But when I do insmod it says -l bad file format.

I am not sure if this is because I am running a different kernel form the sources I downloaded. Does any of you know how to make the sources one the active kernel. Or otherwise do you know what might the problem be?