The invention provides compounds and pharmaceutical compositions thereof, which are useful as protein kinase inhibitors, as well as methods for using such compounds to treat, ameliorate or prevent a condition associated with abnormal or deregulated kinase activity. In some embodiments, the invention provides methods for using such compounds to treat, ameliorate or prevent diseases or disorders that involve abnormal activation of c-kit or c-kit and PDGFR (PDGFRalpha, PDGFRbeta) kinases.