The luminosity function of ringed galaxies