I'm selling my house and the buyer's home inspector said some items are not "up to code". Do I have to bring it up to current code?

No.  Codes are updated approximately every three years.  There is no requirement that an existing building conform to new codes unless work is being done.  This is a contractual negotiation between you and your buyer.