Gary Dourdan won't do time.

The "CSI" co-star pleaded guilty to two of three counts of felony drug possession Wednesday but will not face prison following his drug arrest outside of Palm Springs last month, according to his lawyer. Dourdan could have served up to three years and eight months behind bars.

"Once Gary completes 30 hours of a diversion program, his case will be entirely dismissed," lawyer Shawn Chapman Holley told The Associated Press in an e-mail. "There is no jail time involved."

The 41-year-old actor was arrested after police found him asleep in his car outside of Palm Springs on April 28. He was allegedly parked on the wrong side of the street with the car's interior light on. Dourdan was charged with felony possession of heroin, cocaine and ecstasy.

Dourdan has played crime scene investigator Warrick Brown on CBS' "CSI" since 2000. The character was recently shot and killed during the eighth season finale.