The Sprint logo is displayed on a a screen on the floor of the New York Stock Exchange (NYSE) in New York City, U.S., April 30, 2018. REUTERS/Brendan McDermid

(Reuters) - Sprint Corp S.N has sold the mobile data and advertising company it created in 2012 to InMobi, which provides technology for marketers, in an all-stock deal, the companies said on Wednesday.

The fourth-largest U.S. wireless carrier by subscribers is selling the company called Pinsight Media as it awaits regulatory approval to sell itself to larger rival T-Mobile US Inc TMUS.O. The value of the Pinsight deal was not disclosed.

Pinsight uses data from wireless carriers to help companies better target ads on smartphones to the right audiences. That use of data was one major reason for AT&T Inc's T.N acquisition of media company Time Warner, which closed in June.

Pinsight will continue to work with Sprint after the deal, said Rob Roy, Sprint’s chief digital officer, in a statement.

Sprint’s sale of Pinsight comes as mobile advertising in the United States is expected to surpass television ad spending by more than $6 billion this year, according to eMarketer. The research firm estimates the gap will widen even more by 2022, with mobile spending at $141 billion compared to $68 billion on TV.

Former Pinsight Chief Executive Kevin McGinnis said in 2015 that the company hoped to grow to a $1 billion business.

InMobi and Pinsight did not respond to requests for comment on whether Pinsight had reached that goal. Sprint declined to comment.