how to apply patch

i have ubuntu in my beagleboard xm kernel . when i do i2cdetect only two i2c1 and i2c3 recognizes but i2c2 not of expansion header. for this i try to patch this following file
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 4a71cb7…2148f35 100644 — a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -385,6 +385,7 @@ static int __init omap3_beagle_i2c_init(void) beagle_twldata.vpll2->constraints.name = “VDVI”; omap3_pmic_init(“twl4030”, &beagle_twldata); + omap_register_i2c_bus(2, 400, NULL, 0); /* Bus 3 is attached to the DVI port where devices like the pico DLP * projector don’t work reliably with 400kHz */
omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom));
but i cannot patch it as terminal shows nothing on executing the command patch < /path.
plzz help

can’t insert just one string manually? :slight_smile:

What do you mean by inserting the string manually?
I am patching the whole txt file.

here is only one new string::

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 4a71cb7…2148f35 100644 — a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -385,6 +385,7 @@ static int __init omap3_beagle_i2c_init(void) beagle_twldata.vpll2->constraints.name = “VDVI”; omap3_pmic_init(“twl4030”, &beagle_twldata); + omap_register_i2c_bus(2, 400, NULL, 0); /* Bus 3 is attached to the DVI port where devices like the pico DLP * projector don’t work reliably with 400kHz */
omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom));