Rapper Soulja Boy will serve 240 days in jail for violating his probation, according to Los Angeles County court documents.
Soulja, whose real name is DeAndre Cortez Way, appeared in court Tuesday. The judge gave him 40 days credit on the sentence for having been locked up the last 20 days.
It wasn't immediately known what he did to violate his probation.
Way was convicted in 2014 for carrying a loaded weapon in a car in which he was a passenger and is barred from possessing guns or ammunition.
"My client is very thankful to the judge that he was sentenced to only 240 days because the judge was initially contemplating a sentence of two years," said Fred G. Minassian, Soulja's attorney.
The judge also reinstated Soulja's 265 days of community service.
"Once he's released, he's committed to follow all the orders and directives of the court and of the probation department," Minassian said.
The "Crank That" star was also arrested in 2011 for pot and gun charges.