Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (4550): Make saa7115 to report the complete chipset name

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

+11 -1
+11 -1
drivers/media/video/saa7115.c
··· 1308 1308 { 1309 1309 struct i2c_client *client; 1310 1310 struct saa7115_state *state; 1311 + int i; 1312 + char name[17]; 1311 1313 u8 chip_id; 1312 1314 1313 1315 /* Check if the adapter supports the needed features */ ··· 1326 1324 1327 1325 v4l_dbg(1, debug, client, "detecting saa7115 client on address 0x%x\n", address << 1); 1328 1326 1327 + for (i=0;i<0x0f;i++) { 1328 + saa7115_write(client, 0, i); 1329 + name[i] = (saa7115_read(client, 0) &0x0f) +'0'; 1330 + if (name[i]>'9') 1331 + name[i]+='a'-'9'-1; 1332 + } 1333 + name[i]='\0'; 1334 + 1329 1335 saa7115_write(client, 0, 5); 1330 1336 chip_id = saa7115_read(client, 0) & 0x0f; 1331 1337 if (chip_id < 3 && chip_id > 5) { ··· 1342 1332 return 0; 1343 1333 } 1344 1334 snprintf(client->name, sizeof(client->name) - 1, "saa711%d",chip_id); 1345 - v4l_info(client, "saa711%d found @ 0x%x (%s)\n", chip_id, address << 1, adapter->name); 1335 + v4l_info(client, "saa711%d found (%s) @ 0x%x (%s)\n", chip_id, name, address << 1, adapter->name); 1346 1336 1347 1337 state = kzalloc(sizeof(struct saa7115_state), GFP_KERNEL); 1348 1338 i2c_set_clientdata(client, state);