Pete Davidson, the comedian, actor and former “Saturday Night Live” cast member, has reached an agreement that allows him to resolve a reckless driving charge in California by doing community service with the New York Fire Department, officials said on Monday.

Mr. Davidson, 29, is a Staten Island native. His father, Scott, was a New York City firefighter who died while responding to the World Trade Center attacks on Sept. 11, 2001 — an experience that helped inform Mr. Davidson’s 2020 film, “The King of Staten Island.”

The reckless driving charge, a misdemeanor, was filed against Mr. Davidson last month by the Los Angeles County District Attorney’s Office. It said he crashed a Mercedes-Benz into a house near Rodeo Drive in Beverly Hills in March, The Los Angeles Times reported. No one was injured, The Times reported.

On July 19, a judge placed Mr. Davidson into an 18-month diversion program, according to a statement from the district attorney’s office on Monday. He…