The luminosity function of dwarf galaxies in four spiral-rich clusters