2015-05-22 16:32:16

by Ian Abbott

[permalink] [raw]
Subject: [PATCH] staging: comedi: addi_watchdog.h: don't include "../comedidev.h"

The Comedi "addi_watchdog.h" header doesn't use anything form
"comedidev.h" apart from `struct comedi_subdevice`, which it only uses
to construct a corresponding pointer type within the parameter list of a
function prototype. Just declare the structure type incompletely and
don't bother including the header file.

Signed-off-by: Ian Abbott <[email protected]>
---
drivers/staging/comedi/drivers/addi_watchdog.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/addi_watchdog.h b/drivers/staging/comedi/drivers/addi_watchdog.h
index 83b47be..3f8e738 100644
--- a/drivers/staging/comedi/drivers/addi_watchdog.h
+++ b/drivers/staging/comedi/drivers/addi_watchdog.h
@@ -1,7 +1,7 @@
#ifndef _ADDI_WATCHDOG_H
#define _ADDI_WATCHDOG_H

-#include "../comedidev.h"
+struct comedi_subdevice;

void addi_watchdog_reset(unsigned long iobase);
int addi_watchdog_init(struct comedi_subdevice *, unsigned long iobase);
--
2.1.4


2015-05-27 00:14:59

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH] staging: comedi: addi_watchdog.h: don't include "../comedidev.h"

On Friday, May 22, 2015 9:32 AM, Ian Abbott wrote:
> The Comedi "addi_watchdog.h" header doesn't use anything form
> "comedidev.h" apart from `struct comedi_subdevice`, which it only uses
> to construct a corresponding pointer type within the parameter list of a
> function prototype. Just declare the structure type incompletely and
> don't bother including the header file.
>
> Signed-off-by: Ian Abbott <[email protected]>

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