Since the D90, Nikon DSLR cameras have the ability to correct lens distortions (i.e., barrel and pincushion) in-camera. Nikon has now released an update of the Distortion Control file for its cameras.
So, if you have a camera that supports in-camera distortion correction (e.g., a D3100, D3200, D5000, D5100, D7000, D90, D800, D800E, or D4), you can download the new 1.006 version of the “L” firmware from Nikon: Mac OS X platform, Windows platform. Here you will also find the installation instructions (basically the same as with any firmware update) as well as the complete (long!) list of supported lenses.