Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: io: ecard: move ioaddr() inside __ecard_address

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

+6 -6
-1
arch/arm/include/asm/ecard.h
··· 161 161 162 162 /* Private internal data */ 163 163 const char *card_desc; /* Card description */ 164 - CONST unsigned int podaddr; /* Base Linux address for card */ 165 164 CONST loader_t loader; /* loader program */ 166 165 u64 dma_mask; 167 166 };
+6 -5
arch/arm/kernel/ecard.c
··· 678 678 #define IO_EC_MEMC8_BASE 0 679 679 #endif 680 680 681 - static unsigned int __ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) 681 + static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) 682 682 { 683 683 unsigned long address = 0; 684 684 int slot = ec->slot_no; 685 685 686 686 if (ec->slot_no == 8) 687 - return IO_EC_MEMC8_BASE; 687 + return (void __iomem *)ioaddr(IO_EC_MEMC8_BASE); 688 688 689 689 ectcr &= ~(1 << slot); 690 690 ··· 719 719 #ifdef IOMD_ECTCR 720 720 iomd_writeb(ectcr, IOMD_ECTCR); 721 721 #endif 722 - return address; 722 + return (void __iomem *)(address ? ioaddr(address) : NULL); 723 723 } 724 724 725 725 static int ecard_prints(struct seq_file *m, ecard_t *ec) ··· 990 990 ecard_t **ecp; 991 991 ecard_t *ec; 992 992 struct ex_ecid cid; 993 + void __iomem *addr; 993 994 int i, rc; 994 995 995 996 ec = ecard_alloc_card(type, slot); ··· 1000 999 } 1001 1000 1002 1001 rc = -ENODEV; 1003 - if ((ec->podaddr = __ecard_address(ec, type, ECARD_SYNC)) == 0) 1002 + if ((addr = __ecard_address(ec, type, ECARD_SYNC)) == NULL) 1004 1003 goto nodev; 1005 1004 1006 1005 cid.r_zero = 1; ··· 1020 1019 ec->cid.fiqmask = cid.r_fiqmask; 1021 1020 ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); 1022 1021 ec->fiqaddr = 1023 - ec->irqaddr = (void __iomem *)ioaddr(ec->podaddr); 1022 + ec->irqaddr = addr; 1024 1023 1025 1024 if (ec->cid.is) { 1026 1025 ec->irqmask = ec->cid.irqmask;