TI Launchpad patch from Peter Lorenzen, edited to ease the mergequake.