diff options
Diffstat (limited to 'arch/arm/kernel/ecard.c')
-rw-r--r-- | arch/arm/kernel/ecard.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index a53c0aba5c14..f5cfdabcb87d 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -680,7 +680,7 @@ static int __init ecard_probeirqhw(void) | |||
680 | #define IO_EC_MEMC8_BASE 0 | 680 | #define IO_EC_MEMC8_BASE 0 |
681 | #endif | 681 | #endif |
682 | 682 | ||
683 | unsigned int __ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) | 683 | static unsigned int __ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) |
684 | { | 684 | { |
685 | unsigned long address = 0; | 685 | unsigned long address = 0; |
686 | int slot = ec->slot_no; | 686 | int slot = ec->slot_no; |
@@ -783,7 +783,7 @@ static void ecard_proc_init(void) | |||
783 | 783 | ||
784 | #define ec_set_resource(ec,nr,st,sz) \ | 784 | #define ec_set_resource(ec,nr,st,sz) \ |
785 | do { \ | 785 | do { \ |
786 | (ec)->resource[nr].name = ec->dev.bus_id; \ | 786 | (ec)->resource[nr].name = dev_name(&ec->dev); \ |
787 | (ec)->resource[nr].start = st; \ | 787 | (ec)->resource[nr].start = st; \ |
788 | (ec)->resource[nr].end = (st) + (sz) - 1; \ | 788 | (ec)->resource[nr].end = (st) + (sz) - 1; \ |
789 | (ec)->resource[nr].flags = IORESOURCE_MEM; \ | 789 | (ec)->resource[nr].flags = IORESOURCE_MEM; \ |
@@ -853,8 +853,7 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot) | |||
853 | for (i = 0; i < ECARD_NUM_RESOURCES; i++) { | 853 | for (i = 0; i < ECARD_NUM_RESOURCES; i++) { |
854 | if (ec->resource[i].flags && | 854 | if (ec->resource[i].flags && |
855 | request_resource(&iomem_resource, &ec->resource[i])) { | 855 | request_resource(&iomem_resource, &ec->resource[i])) { |
856 | printk(KERN_ERR "%s: resource(s) not available\n", | 856 | dev_err(&ec->dev, "resource(s) not available\n"); |
857 | ec->dev.bus_id); | ||
858 | ec->resource[i].end -= ec->resource[i].start; | 857 | ec->resource[i].end -= ec->resource[i].start; |
859 | ec->resource[i].start = 0; | 858 | ec->resource[i].start = 0; |
860 | ec->resource[i].flags = 0; | 859 | ec->resource[i].flags = 0; |
@@ -1002,7 +1001,7 @@ ecard_probe(int slot, card_type_t type) | |||
1002 | } | 1001 | } |
1003 | 1002 | ||
1004 | rc = -ENODEV; | 1003 | rc = -ENODEV; |
1005 | if ((ec->podaddr = ecard_address(ec, type, ECARD_SYNC)) == 0) | 1004 | if ((ec->podaddr = __ecard_address(ec, type, ECARD_SYNC)) == 0) |
1006 | goto nodev; | 1005 | goto nodev; |
1007 | 1006 | ||
1008 | cid.r_zero = 1; | 1007 | cid.r_zero = 1; |
@@ -1141,10 +1140,10 @@ static int ecard_drv_probe(struct device *dev) | |||
1141 | 1140 | ||
1142 | id = ecard_match_device(drv->id_table, ec); | 1141 | id = ecard_match_device(drv->id_table, ec); |
1143 | 1142 | ||
1144 | ecard_claim(ec); | 1143 | ec->claimed = 1; |
1145 | ret = drv->probe(ec, id); | 1144 | ret = drv->probe(ec, id); |
1146 | if (ret) | 1145 | if (ret) |
1147 | ecard_release(ec); | 1146 | ec->claimed = 0; |
1148 | return ret; | 1147 | return ret; |
1149 | } | 1148 | } |
1150 | 1149 | ||
@@ -1154,7 +1153,7 @@ static int ecard_drv_remove(struct device *dev) | |||
1154 | struct ecard_driver *drv = ECARD_DRV(dev->driver); | 1153 | struct ecard_driver *drv = ECARD_DRV(dev->driver); |
1155 | 1154 | ||
1156 | drv->remove(ec); | 1155 | drv->remove(ec); |
1157 | ecard_release(ec); | 1156 | ec->claimed = 0; |
1158 | 1157 | ||
1159 | /* | 1158 | /* |
1160 | * Restore the default operations. We ensure that the | 1159 | * Restore the default operations. We ensure that the |
@@ -1182,7 +1181,7 @@ static void ecard_drv_shutdown(struct device *dev) | |||
1182 | if (dev->driver) { | 1181 | if (dev->driver) { |
1183 | if (drv->shutdown) | 1182 | if (drv->shutdown) |
1184 | drv->shutdown(ec); | 1183 | drv->shutdown(ec); |
1185 | ecard_release(ec); | 1184 | ec->claimed = 0; |
1186 | } | 1185 | } |
1187 | 1186 | ||
1188 | /* | 1187 | /* |
@@ -1239,7 +1238,6 @@ static int ecard_bus_init(void) | |||
1239 | postcore_initcall(ecard_bus_init); | 1238 | postcore_initcall(ecard_bus_init); |
1240 | 1239 | ||
1241 | EXPORT_SYMBOL(ecard_readchunk); | 1240 | EXPORT_SYMBOL(ecard_readchunk); |
1242 | EXPORT_SYMBOL(__ecard_address); | ||
1243 | EXPORT_SYMBOL(ecard_register_driver); | 1241 | EXPORT_SYMBOL(ecard_register_driver); |
1244 | EXPORT_SYMBOL(ecard_remove_driver); | 1242 | EXPORT_SYMBOL(ecard_remove_driver); |
1245 | EXPORT_SYMBOL(ecard_bus_type); | 1243 | EXPORT_SYMBOL(ecard_bus_type); |