diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-05-03 05:47:37 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-05-03 09:16:56 -0400 |
commit | 5559bca8e66f968192a5416d953c88cc3389cb22 (patch) | |
tree | 241caa63eaa9dfdb57c6ed7ee476cff020a8b1b7 | |
parent | c0b04d1b2c427629b2dbe066422a507ad855bf61 (diff) |
[ARM] ecard: Convert card type enum to a flag
'type' in the struct expansion_card is only used to indicate
whether this card is an EASI card or not. Therefore, having
it as an enum is wasteful (and introduces additional noise
when we come to remove the enum.) Convert it to a mere flag
instead.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/kernel/ecard.c | 10 | ||||
-rw-r--r-- | include/asm-arm/ecard.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 85f4db6efa7c..bdbd7da99286 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -126,7 +126,7 @@ static void ecard_task_reset(struct ecard_request *req) | |||
126 | 126 | ||
127 | res = ec->slot_no == 8 | 127 | res = ec->slot_no == 8 |
128 | ? &ec->resource[ECARD_RES_MEMC] | 128 | ? &ec->resource[ECARD_RES_MEMC] |
129 | : ec->type == ECARD_EASI | 129 | : ec->easi |
130 | ? &ec->resource[ECARD_RES_EASI] | 130 | ? &ec->resource[ECARD_RES_EASI] |
131 | : &ec->resource[ECARD_RES_IOCSYNC]; | 131 | : &ec->resource[ECARD_RES_IOCSYNC]; |
132 | 132 | ||
@@ -181,7 +181,7 @@ static void ecard_task_readbytes(struct ecard_request *req) | |||
181 | index += 1; | 181 | index += 1; |
182 | } | 182 | } |
183 | } else { | 183 | } else { |
184 | unsigned long base = (ec->type == ECARD_EASI | 184 | unsigned long base = (ec->easi |
185 | ? &ec->resource[ECARD_RES_EASI] | 185 | ? &ec->resource[ECARD_RES_EASI] |
186 | : &ec->resource[ECARD_RES_IOCSYNC])->start; | 186 | : &ec->resource[ECARD_RES_IOCSYNC])->start; |
187 | void __iomem *pbase = (void __iomem *)base; | 187 | void __iomem *pbase = (void __iomem *)base; |
@@ -728,7 +728,7 @@ static int ecard_prints(char *buffer, ecard_t *ec) | |||
728 | char *start = buffer; | 728 | char *start = buffer; |
729 | 729 | ||
730 | buffer += sprintf(buffer, " %d: %s ", ec->slot_no, | 730 | buffer += sprintf(buffer, " %d: %s ", ec->slot_no, |
731 | ec->type == ECARD_EASI ? "EASI" : " "); | 731 | ec->easi ? "EASI" : " "); |
732 | 732 | ||
733 | if (ec->cid.id == 0) { | 733 | if (ec->cid.id == 0) { |
734 | struct in_chunk_dir incd; | 734 | struct in_chunk_dir incd; |
@@ -815,7 +815,7 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot) | |||
815 | } | 815 | } |
816 | 816 | ||
817 | ec->slot_no = slot; | 817 | ec->slot_no = slot; |
818 | ec->type = type; | 818 | ec->easi = type == ECARD_EASI; |
819 | ec->irq = NO_IRQ; | 819 | ec->irq = NO_IRQ; |
820 | ec->fiq = NO_IRQ; | 820 | ec->fiq = NO_IRQ; |
821 | ec->dma = NO_DMA; | 821 | ec->dma = NO_DMA; |
@@ -909,7 +909,7 @@ static ssize_t ecard_show_device(struct device *dev, struct device_attribute *at | |||
909 | static ssize_t ecard_show_type(struct device *dev, struct device_attribute *attr, char *buf) | 909 | static ssize_t ecard_show_type(struct device *dev, struct device_attribute *attr, char *buf) |
910 | { | 910 | { |
911 | struct expansion_card *ec = ECARD_DEV(dev); | 911 | struct expansion_card *ec = ECARD_DEV(dev); |
912 | return sprintf(buf, "%s\n", ec->type == ECARD_EASI ? "EASI" : "IOC"); | 912 | return sprintf(buf, "%s\n", ec->easi ? "EASI" : "IOC"); |
913 | } | 913 | } |
914 | 914 | ||
915 | static struct device_attribute ecard_dev_attrs[] = { | 915 | static struct device_attribute ecard_dev_attrs[] = { |
diff --git a/include/asm-arm/ecard.h b/include/asm-arm/ecard.h index bd4b5769dc4e..3a6d3eb27622 100644 --- a/include/asm-arm/ecard.h +++ b/include/asm-arm/ecard.h | |||
@@ -160,6 +160,7 @@ struct expansion_card { | |||
160 | unsigned char irqmask; /* IRQ mask */ | 160 | unsigned char irqmask; /* IRQ mask */ |
161 | unsigned char fiqmask; /* FIQ mask */ | 161 | unsigned char fiqmask; /* FIQ mask */ |
162 | unsigned char claimed; /* Card claimed? */ | 162 | unsigned char claimed; /* Card claimed? */ |
163 | unsigned char easi; /* EASI card */ | ||
163 | 164 | ||
164 | void *irq_data; /* Data for use for IRQ by card */ | 165 | void *irq_data; /* Data for use for IRQ by card */ |
165 | void *fiq_data; /* Data for use for FIQ by card */ | 166 | void *fiq_data; /* Data for use for FIQ by card */ |
@@ -169,7 +170,6 @@ struct expansion_card { | |||
169 | CONST unsigned int dma; /* DMA number (for request_dma) */ | 170 | CONST unsigned int dma; /* DMA number (for request_dma) */ |
170 | CONST unsigned int irq; /* IRQ number (for request_irq) */ | 171 | CONST unsigned int irq; /* IRQ number (for request_irq) */ |
171 | CONST unsigned int fiq; /* FIQ number (for request_irq) */ | 172 | CONST unsigned int fiq; /* FIQ number (for request_irq) */ |
172 | CONST card_type_t type; /* Type of card */ | ||
173 | CONST struct in_ecid cid; /* Card Identification */ | 173 | CONST struct in_ecid cid; /* Card Identification */ |
174 | 174 | ||
175 | /* Private internal data */ | 175 | /* Private internal data */ |