I am trying to revert two patches on linux kernel files /drivers/hid/hiddev.c and /drivers/hid/hid-input.c to try to restore the trackpoint and trackpoint buttons on my Lenovo Thinkpad X1 Tablet. This fix is reported here
https://bugs.mageia.org/show_bug.cgi?id=26135
and here:
and the issue has been opened on the linux kernel bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=206667
The two patches that need to be reverted are
https://lkml.org/lkml/2020/1/14/273
https://lkml.org/lkml/2020/1/14/251
which are two in a series of emails, each containing part of a larger patch. I have saved the text in those two emails that looked to me like patch text, in particular beginning at the lines
drivers/hid/usbhid/hiddev.c | 97+++++++++++++++++++-------------------------
and
drivers/hid/hid-input.c | 16 ++++++++++++----
and going to the end of each email respectively.
When I try to revert them with
patch --dry-run -Rr -p0 <../Thinkpad_X1_Tablet/patch_2020_1_14_273
I get the following warning/error
can't find file to patch at input line 7Perhaps you should have used the -p or --strip option?The text leading up to this was:--------------------------|---| drivers/hid/usbhid/hiddev.c | 97 +++++++++++++++++++-------------------------| 1 file changed, 42 insertions(+), 55 deletions(-)||--- a/drivers/hid/usbhid/hiddev.c|+++ b/drivers/hid/usbhid/hiddev.c--------------------------
I know the patches as I have saved them do not begin with a line
diff ...
And I suspect that is the problem but I don't know exactly how to reformat them.