The recently discovered scaling law for the relaxation times, tau(T,upsilon)=J(T upsilon(gamma)), where T is temperature and upsilon the specific volume, is derived by a revision of the entropy model of the glass transition dynamics originally proposed by Avramov [J. Non-Cryst. Solids 262, 258 (2000)]. In this modification the entropy is calculated by an alternative route. The resulting expression for the variation of the relaxation time with T and upsilon is shown to accurately fit experimental data for several glass-forming liquids and polymers over an extended range encompassing the dynamic crossover. From this analysis, which is valid for any model in which the relaxation time is a function of the entropy, we find that the scaling exponent gamma can be identified with the Gruneisen constant.