Narrative:

Smoke appeared to be coming from avionics while on downwind. Radio call to tower was made informing of electrical fire; as well as intentions of taking the runway and that all communications would be lost as avionics would be turned off. Separation with aircraft cleared to land was maintained as tower had informed me; just prior to the incident; the traffic I would be following was on a 3 mile final. Knowing the incoming traffics location combined with the severity of the [situation] led to my decision to take the runway. No injuries and no property damage occurred.

Google
 

Original NASA ASRS Text

Title: C172 pilot reported executing an immediate approach and landing following the appearance of smoke from the avionics equipment.

Narrative: Smoke appeared to be coming from avionics while on downwind. Radio call to Tower was made informing of electrical fire; as well as intentions of taking the runway and that all communications would be lost as avionics would be turned off. Separation with aircraft cleared to land was maintained as Tower had informed me; just prior to the incident; the traffic I would be following was on a 3 mile final. Knowing the incoming traffics location combined with the severity of the [situation] led to my decision to take the runway. No injuries and no property damage occurred.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.