[PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

viresh kumar viresh.kumar at linaro.org
Fri Oct 12 06:36:56 EDT 2012


On Fri, Oct 12, 2012 at 1:53 PM, Andy Shevchenko
<andriy.shevchenko at linux.intel.com> wrote:
> On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote:

>> +     while (++i < dw->sd_count) {
>> +             if (!strcmp(dw->sd[i].bus_id, param)) {
>> +                     found = 1;
>> +                     break;
>> +             }
>> +     }
>> +
>> +     if (!found) {
>> +             last_dw = dw;
>> +             last_bus_id = param;
>> +             return false;
> Because of return here you could eliminate 'found' flag at all.

how?

Fixed the other issue as:

Author: Viresh Kumar <viresh.kumar at linaro.org>
Date:   Fri Oct 12 16:06:32 2012 +0530

    fixup! dmaengine: dw_dmac: Enhance device tree support
---
 drivers/dma/dw_dmac.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 9a7d084..a4ff04c 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1598,9 +1598,10 @@ __devinit dw_dma_parse_dt(struct platform_device *pdev)
        return pdata;
 }
 #else
-static inline int dw_dma_parse_dt(struct platform_device *pdev)
+static inline struct dw_dma_platform_data *
+dw_dma_parse_dt(struct platform_device *pdev)
 {
-       return -ENOSYS;
+       return NULL;
 }
 #endif

--
viresh



More information about the linux-arm-kernel mailing list