Stability of eigenvalues for variable exponent problems