diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/dma/shdma.c | 13 | ||||
| -rw-r--r-- | drivers/sh/clk/core.c | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 2a638f9f09a2..028330044201 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
| @@ -1221,6 +1221,11 @@ static int __init sh_dmae_probe(struct platform_device *pdev) | |||
| 1221 | } else { | 1221 | } else { |
| 1222 | do { | 1222 | do { |
| 1223 | for (i = chanirq_res->start; i <= chanirq_res->end; i++) { | 1223 | for (i = chanirq_res->start; i <= chanirq_res->end; i++) { |
| 1224 | if (irq_cnt >= SH_DMAC_MAX_CHANNELS) { | ||
| 1225 | irq_cap = 1; | ||
| 1226 | break; | ||
| 1227 | } | ||
| 1228 | |||
| 1224 | if ((errirq_res->flags & IORESOURCE_BITS) == | 1229 | if ((errirq_res->flags & IORESOURCE_BITS) == |
| 1225 | IORESOURCE_IRQ_SHAREABLE) | 1230 | IORESOURCE_IRQ_SHAREABLE) |
| 1226 | chan_flag[irq_cnt] = IRQF_SHARED; | 1231 | chan_flag[irq_cnt] = IRQF_SHARED; |
| @@ -1230,15 +1235,11 @@ static int __init sh_dmae_probe(struct platform_device *pdev) | |||
| 1230 | "Found IRQ %d for channel %d\n", | 1235 | "Found IRQ %d for channel %d\n", |
| 1231 | i, irq_cnt); | 1236 | i, irq_cnt); |
| 1232 | chan_irq[irq_cnt++] = i; | 1237 | chan_irq[irq_cnt++] = i; |
| 1233 | |||
| 1234 | if (irq_cnt >= SH_DMAC_MAX_CHANNELS) | ||
| 1235 | break; | ||
| 1236 | } | 1238 | } |
| 1237 | 1239 | ||
| 1238 | if (irq_cnt >= SH_DMAC_MAX_CHANNELS) { | 1240 | if (irq_cnt >= SH_DMAC_MAX_CHANNELS) |
| 1239 | irq_cap = 1; | ||
| 1240 | break; | 1241 | break; |
| 1241 | } | 1242 | |
| 1242 | chanirq_res = platform_get_resource(pdev, | 1243 | chanirq_res = platform_get_resource(pdev, |
| 1243 | IORESOURCE_IRQ, ++irqres); | 1244 | IORESOURCE_IRQ, ++irqres); |
| 1244 | } while (irq_cnt < pdata->channel_num && chanirq_res); | 1245 | } while (irq_cnt < pdata->channel_num && chanirq_res); |
diff --git a/drivers/sh/clk/core.c b/drivers/sh/clk/core.c index 4f64183b27fa..7e9c39951ecb 100644 --- a/drivers/sh/clk/core.c +++ b/drivers/sh/clk/core.c | |||
| @@ -635,7 +635,7 @@ static void clks_core_resume(void) | |||
| 635 | struct clk *clkp; | 635 | struct clk *clkp; |
| 636 | 636 | ||
| 637 | list_for_each_entry(clkp, &clock_list, node) { | 637 | list_for_each_entry(clkp, &clock_list, node) { |
| 638 | if (likely(clkp->ops)) { | 638 | if (likely(clkp->usecount && clkp->ops)) { |
| 639 | unsigned long rate = clkp->rate; | 639 | unsigned long rate = clkp->rate; |
| 640 | 640 | ||
| 641 | if (likely(clkp->ops->set_parent)) | 641 | if (likely(clkp->ops->set_parent)) |
