]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/nsi_canpci.c
The first round of I/O space pointers separation.
[lincan.git] / lincan / src / nsi_canpci.c
index 9fbed1117562232dfdc66a94a9a36fe489e95a2e..97ce2b43ba09c6cd49ad9ccd8d67099daa3ca1db 100644 (file)
@@ -23,10 +23,10 @@ extern int mo15mask;
 #include <linux/module.h>
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
-       #define ioread32        readl
-       #define iowrite32       writel
-       #define ioread8         readb
-       #define iowrite8        writeb
+       #define ioread32        can_readl
+       #define iowrite32       can_writel
+       #define ioread8         can_readb
+       #define iowrite8        can_writeb
 #else
 #endif
 
@@ -517,7 +517,7 @@ int nsi_canpci_program_irq(struct candevice_t *candev)
  * on the CAN chip. You should only have to edit this function if your hardware
  * uses some specific write process.
  */
-void nsi_canpci_write_register(unsigned data, unsigned long address)
+void nsi_canpci_write_register(unsigned data, can_ioptr_t address)
 {
        iowrite8((u8)data,(void*)address);
 }
@@ -526,7 +526,7 @@ void nsi_canpci_write_register(unsigned data, unsigned long address)
  * on the CAN chip. You should only have to edit this function if your hardware
  * uses some specific read process.
  */
-unsigned nsi_canpci_read_register(unsigned long address)
+unsigned nsi_canpci_read_register(can_ioptr_t address)
 {
        return ioread8((void*)address);
 }