[1/2] atmel_nand: add missing include of linux/dmaengine.h

Submitted by Hans-Christian Egtvedt on April 13, 2011, 1:55 p.m.

Details

Message ID 1302702918-6050-1-git-send-email-hans-christian.egtvedt@atmel.com
State Accepted
Commit 5c39c4c54c585e13a8d6b5a8f64af682e7c68091
Headers show

Commit Message

Hans-Christian Egtvedt April 13, 2011, 1:55 p.m.
Including linux/dmaengine.h fixes the missing definition of the enum
dma_ctrl_flags type used in atmel_nand_dma_op function.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
---
 drivers/mtd/nand/atmel_nand.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Artem Bityutskiy April 14, 2011, 1:39 p.m.
On Wed, 2011-04-13 at 15:55 +0200, Hans-Christian Egtvedt wrote:
> Including linux/dmaengine.h fixes the missing definition of the enum
> dma_ctrl_flags type used in atmel_nand_dma_op function.
> 
> Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>

I do not see how it is a problem. C does not support strict types
checking anyway. This all is just 'int'.

IMHO, the enums you invented only make code less readable for C
programmers.

I'd suggest to turn all you enums into anonymous enums and stop using
them as types. That would only make things more readable and easier to
follow.
Artem Bityutskiy April 14, 2011, 2:01 p.m.
On Thu, 2011-04-14 at 16:39 +0300, Artem Bityutskiy wrote:
> On Wed, 2011-04-13 at 15:55 +0200, Hans-Christian Egtvedt wrote:
> > Including linux/dmaengine.h fixes the missing definition of the enum
> > dma_ctrl_flags type used in atmel_nand_dma_op function.
> > 
> > Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
> 
> I do not see how it is a problem. C does not support strict types
> checking anyway. This all is just 'int'.

Sorry, I was too fast. Pushed to l2-mtd-2.6.git.

Patch hide | download patch | download mbox

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 950646a..380912f 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -30,6 +30,7 @@ 
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 
+#include <linux/dmaengine.h>
 #include <linux/gpio.h>
 #include <linux/io.h>