Hello,
Your are using inp, outp?
My advice would be that you should first read Linux device drivers :
http://www.xml.com/ldd/chapter/book/ch15.html#t1
and have a look at the ftp server of oreilly, there are sample for simple pci drivers
also
drivers/pci/search.c
drivers/pci/pci.c
include/linux/pci.h
Generate the documentation for your kernel, make pdfdoc on Linux 2.6.
Eventhough you will manage by using inp/outp , you should use memory map. its faaaar easier and makes your code readable. The PCI adress space is mapped into the processor adress space and then you can access its IO space very easily, like accessing an array.
I developped several pci drivers and they were only a few lines!
Finding the pci is also explained in Linux device drivers. pci_get_device (defined in search.c) in 2.6
From Linux 2.0 to 2.6 no big changes were made, only if I remember something for registering your driverin the kernel.
Good luck have fun