#ifdef MODULE
# include "/usr/src/linux/drivers/block/blk.h"
#else
# include "blk.h"
# define MOD_INC_USE_COUNT
# define MOD_DEC_USE_COUNT
#endif
More than that, at the top of drivers/block/Makefile I read:
OBJS := ll_rw_blk.o ramdisk.o genhd.o
SRCS := ll_rw_blk.c ramdisk.c genhd.c
BLOCK_MODULE_OBJS =
and then the dep rule is:
dep:
$(CPP) -M $(SRCS) > .depend
ifdef BLOCK_MODULE_OBJS
$(CPP) -M -DMODULE $(BLOCK_MODULE_OBJS:.o=.c) >> .depend
endif
The ifdef directive will be always true, thus forcing '-DMODULE' on
make dep.
I've removed the hard reference to blk.h file, but I'd like to know
if that's correct. I don't use the aztcd driver, though ...
Cristian Gafton
Cristian Gafton, SysAdm gafton@cccis.sfos.ro
----------------------------------------------------------------------
Computers & Communications Center str. Moara de Foc nr. 35
Phone: 40-32-252936, 252938 PO-BOX 2-549
Fax: 40-32-252933 IASI 6600, ROMANIA
======================================================================
Good code is hard to write, so it must be hard to understand.