summaryrefslogtreecommitdiff
path: root/packages/librfid/files/spidev.patch
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2008-12-18 08:50:07 +0100
committerJeremy Lainé <jeremy.laine@m4x.org>2008-12-18 08:50:07 +0100
commit20638390447dbb4b7ce334976adaec3ffa5f7138 (patch)
treeed5c0487f218780807708206c27e797e96297c2b /packages/librfid/files/spidev.patch
parent47f07250d4fbcb6f691fc30c80583e2f044fc43f (diff)
librfid: add patch for SPI device support
Diffstat (limited to 'packages/librfid/files/spidev.patch')
-rw-r--r--packages/librfid/files/spidev.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/librfid/files/spidev.patch b/packages/librfid/files/spidev.patch
new file mode 100644
index 0000000000..29c3a171ea
--- /dev/null
+++ b/packages/librfid/files/spidev.patch
@@ -0,0 +1,24 @@
+Index: librfid-0.2.0/utils/common.c
+===================================================================
+--- librfid-0.2.0.orig/utils/common.c
++++ librfid-0.2.0/utils/common.c
+@@ -72,15 +72,11 @@ struct rfid_protocol_handle *ph;
+
+ int reader_init(void)
+ {
+- printf("opening reader handle OpenPCD, CM5x21\n");
+- rh = rfid_reader_open(NULL, RFID_READER_OPENPCD);
++ printf("opening reader handle SPIDEV\n");
++ rh = rfid_reader_open("/dev/spidev", RFID_READER_SPIDEV);
+ if (!rh) {
+- fprintf(stderr, "No OpenPCD found\n");
+- rh = rfid_reader_open(NULL, RFID_READER_CM5121);
+- if (!rh) {
+- fprintf(stderr, "No Omnikey Cardman 5x21 found\n");
+- return -1;
+- }
++ fprintf(stderr, "No spidev RFID found\n");
++ return -1;
+ }
+ return 0;
+ }