[PATCH 2/3] staging: comedi: amplc_dio200: add helper macros to check bus type

Dan Carpenter dan.carpenter at oracle.com
Wed Aug 15 13:30:28 UTC 2012


On Wed, Aug 15, 2012 at 11:16:20AM +0100, Ian Abbott wrote:
> static inline bool is_isa_board(const struct dio200_board *board)
> {
> 	return DO_ISA && board->bustype == isa_bustype;
> }
> 
> I prefer the macro as it seems "easier" for the compiler to
> recognize it as a constant in the case where DO_ISA expands to 0.

Btw, the compiler will do the right thing with an inline function.

regards,
dan carpenter




More information about the devel mailing list