The Rays made the move Friday. The Yankees were seeking to clear roster spots ahead of the winter meeting draft.
The 26-year-old Whitley made his big league debut in May 2014. The right-hander was 1-2 with a 4.19 ERA in four starts last season when he was inserted into the rotation for injured Masahiro Tanaka.
Whitley left a start at Tampa Bay on May 14 in the second inning because of elbow pain. He had ligament replacement surgery five days later.
New York also added three players to its 40-man roster, protecting them from the winter meeting draft on Dec. 10: right-handers Johnny Barbato and Rookie Davis, and outfielder Ben Gamel.