You'll need to install the Ubuntu kernel source first (see here: https://help.ubuntu.com/community/Kernel/Compile ) Then, change to the source directory and use patch -p1 < touchscreen.patch to apply. After that, rebuild the kernel once and install it (I've used the "old-fashioned Debian way" described on that page).

Note: around line 218 in hid-cando.c, you might need to change
ret = hid_hw_start(hdev,HID_CONNECT_DEFAULT);
to
ret = hid_hw_start(hdev,HID_CONNECT_DEFAULT|HID_CONNECT_ HIDINPUT_FORCE);

This somewhat depends on the base kernel version you're using - I had to add the FORCE flag for 2.6.31.9.