Skip to content

Commit 1740a04

Browse files
committed
Include more products in the good device test.
1 parent 656b141 commit 1740a04

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cm108.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ static int cm108_write (char *name, int iomask, int iodata);
144144
#define CMEDIA_PID1_MIN 0x0008 // range for CM108, CM109, CM119 (no following letters)
145145
#define CMEDIA_PID1_MAX 0x000f
146146

147-
#define CMEDIA_PID2 0x013a // CM119A
148-
149147
#define CMEDIA_PID_CM108AH 0x0139 // CM108AH
150148
#define CMEDIA_PID_CM108B 0x0012 // CM108B
151149
#define CMEDIA_PID_CM119A 0x013a // CM119A
@@ -192,7 +190,12 @@ static int cm108_write (char *name, int iomask, int iodata);
192190

193191
// Test for supported devices.
194192

195-
#define GOOD_DEVICE(v,p) ( (v == CMEDIA_VID && ((p >= CMEDIA_PID1_MIN && p <= CMEDIA_PID1_MAX) || p == CMEDIA_PID2)) || \
193+
#define GOOD_DEVICE(v,p) ( (v == CMEDIA_VID && ((p >= CMEDIA_PID1_MIN && p <= CMEDIA_PID1_MAX) \
194+
|| p == CMEDIA_PID_CM108AH \
195+
|| p == CMEDIA_PID_CM108B \
196+
|| p == CMEDIA_PID_CM119A \
197+
|| p == CMEDIA_PID_CM119B )) \
198+
|| \
196199
(v == SSS_VID && (p == SSS_PID1 || p == SSS_PID2 || p == SSS_PID3)) )
197200

198201
// Look out for null source pointer, and avoid buffer overflow on destination.

0 commit comments

Comments
 (0)