Variability of M giant stars based on Kepler photometry