I know this is an old thread, but it was the newest one on this issue. I just solved this code on a 2007 Suburban. I understand there are several solutions to this code, just wanted to put my fix out there.
C0161 - ABS Brake switch Circuit Problems
I replaced the brake switch which didn't solve the problem. I found that the new and old brake switch has 2 switches built into one. One is for the brake lights/trailer controller, this switch is normally open, meaning current doesn't flow through it till you press the pedal. The other switch is normally closed and is used to tell various other components that the brake is engaged or not.
What I found is that, with age, the rod that connects the pedal to the brake booster becomes worn. Because of this the closed switch can be opened with the slightest touch. Even vibrations from driving. If that switch stays open for more than 60 seconds while the vehicle is moving, it sets the above code.
I just filed down the end of the rod that contacts the switch and filed the holes in the switch to a slight oval, very slight. This took care of the touchiness of the pedal. Sorry for the long post.