X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fatm%2Fambassador.c;fp=drivers%2Fatm%2Fambassador.c;h=c46d9520c5a75f4ce5bbbc4be8eb9055832df76e;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=3870e3787b7b4fee3a0d323ae6f99fc53f79b001;hpb=e3f6fb6212a7102bdb56ba38fa1e98fe72950475;p=linux-2.6.git diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 3870e3787..c46d9520c 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c @@ -296,16 +296,16 @@ static inline void __init show_version (void) { #endif #define UCODE2(x) #x -static u32 __initdata ucode_start = +static u32 __devinitdata ucode_start = #include UCODE(start) ; -static region __initdata ucode_regions[] = { +static region __devinitdata ucode_regions[] = { #include UCODE(regions) { 0, 0 } }; -static u32 __initdata ucode_data[] = { +static u32 __devinitdata ucode_data[] = { #include UCODE(data) 0xdeadbeef }; @@ -345,7 +345,7 @@ static inline u32 rd_plain (const amb_dev * dev, size_t addr) { } static inline void wr_mem (const amb_dev * dev, size_t addr, u32 data) { - u32 be = cpu_to_be32 (data); + __be32 be = cpu_to_be32 (data); PRINTD (DBG_FLOW|DBG_REGS, "wr: %08zx <- %08x b[%08x]", addr, data, be); #ifdef AMB_MMIO dev->membase[addr / sizeof(u32)] = be; @@ -356,9 +356,9 @@ static inline void wr_mem (const amb_dev * dev, size_t addr, u32 data) { static inline u32 rd_mem (const amb_dev * dev, size_t addr) { #ifdef AMB_MMIO - u32 be = dev->membase[addr / sizeof(u32)]; + __be32 be = dev->membase[addr / sizeof(u32)]; #else - u32 be = inl (dev->iobase + addr); + __be32 be = inl (dev->iobase + addr); #endif u32 data = be32_to_cpu (be); PRINTD (DBG_FLOW|DBG_REGS, "rd: %08zx -> %08x b[%08x]", addr, data, be); @@ -1539,7 +1539,7 @@ static void do_housekeeping (unsigned long arg) { /********** creation of communication queues **********/ -static int __init create_queues (amb_dev * dev, unsigned int cmds, +static int __devinit create_queues (amb_dev * dev, unsigned int cmds, unsigned int txs, unsigned int * rxs, unsigned int * rx_buffer_sizes) { unsigned char pool; @@ -1769,7 +1769,7 @@ static int decode_loader_result (loader_command cmd, u32 result) return res; } -static int __init do_loader_command (volatile loader_block * lb, +static int __devinit do_loader_command (volatile loader_block * lb, const amb_dev * dev, loader_command cmd) { unsigned long timeout; @@ -1825,7 +1825,7 @@ static int __init do_loader_command (volatile loader_block * lb, /* loader: determine loader version */ -static int __init get_loader_version (loader_block * lb, +static int __devinit get_loader_version (loader_block * lb, const amb_dev * dev, u32 * version) { int res; @@ -1841,7 +1841,7 @@ static int __init get_loader_version (loader_block * lb, /* loader: write memory data blocks */ -static int __init loader_write (loader_block * lb, +static int __devinit loader_write (loader_block * lb, const amb_dev * dev, const u32 * data, u32 address, unsigned int count) { unsigned int i; @@ -1860,7 +1860,7 @@ static int __init loader_write (loader_block * lb, /* loader: verify memory data blocks */ -static int __init loader_verify (loader_block * lb, +static int __devinit loader_verify (loader_block * lb, const amb_dev * dev, const u32 * data, u32 address, unsigned int count) { unsigned int i; @@ -1885,7 +1885,7 @@ static int __init loader_verify (loader_block * lb, /* loader: start microcode */ -static int __init loader_start (loader_block * lb, +static int __devinit loader_start (loader_block * lb, const amb_dev * dev, u32 address) { PRINTD (DBG_FLOW|DBG_LOAD, "loader_start"); @@ -1961,7 +1961,7 @@ static int amb_reset (amb_dev * dev, int diags) { /********** transfer and start the microcode **********/ -static int __init ucode_init (loader_block * lb, amb_dev * dev) { +static int __devinit ucode_init (loader_block * lb, amb_dev * dev) { unsigned int i = 0; unsigned int total = 0; const u32 * pointer = ucode_data; @@ -2007,11 +2007,11 @@ static int __init ucode_init (loader_block * lb, amb_dev * dev) { /********** give adapter parameters **********/ -static inline u32 bus_addr(void * addr) { +static inline __be32 bus_addr(void * addr) { return cpu_to_be32 (virt_to_bus (addr)); } -static int __init amb_talk (amb_dev * dev) { +static int __devinit amb_talk (amb_dev * dev) { adap_talk_block a; unsigned char pool; unsigned long timeout; @@ -2058,7 +2058,7 @@ static int __init amb_talk (amb_dev * dev) { } // get microcode version -static void __init amb_ucode_version (amb_dev * dev) { +static void __devinit amb_ucode_version (amb_dev * dev) { u32 major; u32 minor; command cmd; @@ -2085,7 +2085,7 @@ static u8 bit_swap (u8 byte) } // get end station address -static void __init amb_esi (amb_dev * dev, u8 * esi) { +static void __devinit amb_esi (amb_dev * dev, u8 * esi) { u32 lower4; u16 upper2; command cmd; @@ -2131,7 +2131,7 @@ static void fixup_plx_window (amb_dev *dev, loader_block *lb) return; } -static int __init amb_init (amb_dev * dev) +static int __devinit amb_init (amb_dev * dev) { loader_block lb; @@ -2447,7 +2447,7 @@ static int __init amb_module_init (void) amb_check_args(); // get the juice - return pci_module_init(&amb_driver); + return pci_register_driver(&amb_driver); } /********** module exit **********/