How to patch the source code or revert it back?

We often have the situation of testing or applying someones patch or to remove the changes made by a patch. It may happen that a patch is not correctly applied and result into to dirty source code. This simple bit of information will help you to carefully apply the patch to your source code and also revert the changes back to original state if required. I’m using linux kernel version 3.0.42+ as example and Elan Touch Screen patch file(patch-linux-3.0.42+_elan_ts.patch).

Continue Reading…