diff options
| -rw-r--r-- | arch/arm/plat-omap/include/plat/mcbsp.h | 3 | ||||
| -rw-r--r-- | arch/arm/plat-omap/mcbsp.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index 0fad63c7df18..648344a89a94 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h | |||
| @@ -359,6 +359,7 @@ struct omap_mcbsp { | |||
| 359 | u16 max_tx_thres; | 359 | u16 max_tx_thres; |
| 360 | u16 max_rx_thres; | 360 | u16 max_rx_thres; |
| 361 | void *reg_cache; | 361 | void *reg_cache; |
| 362 | int reg_cache_size; | ||
| 362 | }; | 363 | }; |
| 363 | 364 | ||
| 364 | /** | 365 | /** |
| @@ -370,7 +371,7 @@ struct omap_mcbsp_dev_attr { | |||
| 370 | }; | 371 | }; |
| 371 | 372 | ||
| 372 | extern struct omap_mcbsp **mcbsp_ptr; | 373 | extern struct omap_mcbsp **mcbsp_ptr; |
| 373 | extern int omap_mcbsp_count, omap_mcbsp_cache_size; | 374 | extern int omap_mcbsp_count; |
| 374 | 375 | ||
| 375 | #define omap_mcbsp_check_valid_id(id) (id < omap_mcbsp_count) | 376 | #define omap_mcbsp_check_valid_id(id) (id < omap_mcbsp_count) |
| 376 | #define id_to_mcbsp_ptr(id) mcbsp_ptr[id]; | 377 | #define id_to_mcbsp_ptr(id) mcbsp_ptr[id]; |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 234ab16e8399..3ad536ea6c37 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #include "../mach-omap2/cm-regbits-34xx.h" | 31 | #include "../mach-omap2/cm-regbits-34xx.h" |
| 32 | 32 | ||
| 33 | struct omap_mcbsp **mcbsp_ptr; | 33 | struct omap_mcbsp **mcbsp_ptr; |
| 34 | int omap_mcbsp_count, omap_mcbsp_cache_size; | 34 | int omap_mcbsp_count; |
| 35 | 35 | ||
| 36 | static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) | 36 | static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) |
| 37 | { | 37 | { |
| @@ -678,7 +678,7 @@ int omap_mcbsp_request(unsigned int id) | |||
| 678 | } | 678 | } |
| 679 | mcbsp = id_to_mcbsp_ptr(id); | 679 | mcbsp = id_to_mcbsp_ptr(id); |
| 680 | 680 | ||
| 681 | reg_cache = kzalloc(omap_mcbsp_cache_size, GFP_KERNEL); | 681 | reg_cache = kzalloc(mcbsp->reg_cache_size, GFP_KERNEL); |
| 682 | if (!reg_cache) { | 682 | if (!reg_cache) { |
| 683 | return -ENOMEM; | 683 | return -ENOMEM; |
| 684 | } | 684 | } |
| @@ -1225,7 +1225,7 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev) | |||
| 1225 | } | 1225 | } |
| 1226 | } | 1226 | } |
| 1227 | mcbsp->phys_base = res->start; | 1227 | mcbsp->phys_base = res->start; |
| 1228 | omap_mcbsp_cache_size = resource_size(res); | 1228 | mcbsp->reg_cache_size = resource_size(res); |
| 1229 | mcbsp->io_base = ioremap(res->start, resource_size(res)); | 1229 | mcbsp->io_base = ioremap(res->start, resource_size(res)); |
| 1230 | if (!mcbsp->io_base) { | 1230 | if (!mcbsp->io_base) { |
| 1231 | ret = -ENOMEM; | 1231 | ret = -ENOMEM; |
