2015-05-22 17:45:37

by Ian Abbott

[permalink] [raw]
Subject: [PATCH] staging: comedi: comedi_isadma.h: make self-reliant

The Comedi "comedi_isadma.h" header is included by the source for the
"comedi_isadma" helper module and other modules that use it. It does
not compile cleanly when it is the first header file included. It uses
the `dma_addr_t` type, so include <linux/types.h> to declare it. (Also,
that indirectly takes care of the use of `NULL`.) It uses `struct
comedi_device *` in various function prototypes, so add an incomplete
declaration of `struct comedi_device`.

Signed-off-by: Ian Abbott <[email protected]>
---
drivers/staging/comedi/drivers/comedi_isadma.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/staging/comedi/drivers/comedi_isadma.h b/drivers/staging/comedi/drivers/comedi_isadma.h
index c7c524f..2fb6573 100644
--- a/drivers/staging/comedi/drivers/comedi_isadma.h
+++ b/drivers/staging/comedi/drivers/comedi_isadma.h
@@ -16,6 +16,10 @@
#ifndef _COMEDI_ISADMA_H
#define _COMEDI_ISADMA_H

+#include <linux/types.h>
+
+struct comedi_device;
+
/*
* These are used to avoid issues when <asm/dma.h> and the DMA_MODE_
* defines are not available.
--
2.1.4


2015-05-26 18:26:38

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH] staging: comedi: comedi_isadma.h: make self-reliant

O n Friday, May 22, 2015 10:45 AM, Ian Abbott wrote:
> The Comedi "comedi_isadma.h" header is included by the source for the
> "comedi_isadma" helper module and other modules that use it. It does
> not compile cleanly when it is the first header file included. It uses
> the `dma_addr_t` type, so include <linux/types.h> to declare it. (Also,
> that indirectly takes care of the use of `NULL`.) It uses `struct
> comedi_device *` in various function prototypes, so add an incomplete
> declaration of `struct comedi_device`.
>
> Signed-off-by: Ian Abbott <[email protected]>

Reviewed-by: H Hartley Sweeten <[email protected]>