aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index 8bccb0e8d27b..9e4edb8b7d82 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -426,7 +426,7 @@ static void ivtv_process_eeprom(struct ivtv *itv)
426 if (itv->options.newi2c == -1 && tv.has_ir != -1 && tv.has_ir != 2) { 426 if (itv->options.newi2c == -1 && tv.has_ir != -1 && tv.has_ir != 2) {
427 itv->options.newi2c = (tv.has_ir & 2) ? 1 : 0; 427 itv->options.newi2c = (tv.has_ir & 2) ? 1 : 0;
428 if (itv->options.newi2c) { 428 if (itv->options.newi2c) {
429 IVTV_INFO("reopen i2c bus for IR-blaster support\n"); 429 IVTV_INFO("Reopen i2c bus for IR-blaster support\n");
430 exit_ivtv_i2c(itv); 430 exit_ivtv_i2c(itv);
431 init_ivtv_i2c(itv); 431 init_ivtv_i2c(itv);
432 } 432 }
@@ -950,7 +950,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
950 950
951 /* Make sure we've got a place for this card */ 951 /* Make sure we've got a place for this card */
952 if (ivtv_cards_active == IVTV_MAX_CARDS) { 952 if (ivtv_cards_active == IVTV_MAX_CARDS) {
953 printk(KERN_ERR "ivtv: Maximum number of cards detected (%d).\n", 953 printk(KERN_ERR "ivtv: Maximum number of cards detected (%d)\n",
954 ivtv_cards_active); 954 ivtv_cards_active);
955 spin_unlock(&ivtv_cards_lock); 955 spin_unlock(&ivtv_cards_lock);
956 return -ENOMEM; 956 return -ENOMEM;
@@ -965,9 +965,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
965 itv->dev = dev; 965 itv->dev = dev;
966 itv->num = ivtv_cards_active++; 966 itv->num = ivtv_cards_active++;
967 snprintf(itv->name, sizeof(itv->name) - 1, "ivtv%d", itv->num); 967 snprintf(itv->name, sizeof(itv->name) - 1, "ivtv%d", itv->num);
968 if (itv->num) { 968 IVTV_INFO("Initializing card #%d\n", itv->num);
969 printk(KERN_INFO "ivtv: ====================== NEXT CARD ======================\n");
970 }
971 969
972 spin_unlock(&ivtv_cards_lock); 970 spin_unlock(&ivtv_cards_lock);
973 971
@@ -1214,7 +1212,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
1214 if (itv->has_cx23415) 1212 if (itv->has_cx23415)
1215 ivtv_set_osd_alpha(itv); 1213 ivtv_set_osd_alpha(itv);
1216 1214
1217 IVTV_INFO("Initialized %s, card #%d\n", itv->card_name, itv->num); 1215 IVTV_INFO("Initialized card #%d: %s\n", itv->num, itv->card_name);
1218 1216
1219 return 0; 1217 return 0;
1220 1218
@@ -1247,15 +1245,15 @@ static void ivtv_remove(struct pci_dev *pci_dev)
1247{ 1245{
1248 struct ivtv *itv = pci_get_drvdata(pci_dev); 1246 struct ivtv *itv = pci_get_drvdata(pci_dev);
1249 1247
1250 IVTV_DEBUG_INFO("Removing Card #%d.\n", itv->num); 1248 IVTV_DEBUG_INFO("Removing Card #%d\n", itv->num);
1251 1249
1252 /* Stop all captures */ 1250 /* Stop all captures */
1253 IVTV_DEBUG_INFO(" Stopping all streams.\n"); 1251 IVTV_DEBUG_INFO("Stopping all streams\n");
1254 if (atomic_read(&itv->capturing) > 0) 1252 if (atomic_read(&itv->capturing) > 0)
1255 ivtv_stop_all_captures(itv); 1253 ivtv_stop_all_captures(itv);
1256 1254
1257 /* Stop all decoding */ 1255 /* Stop all decoding */
1258 IVTV_DEBUG_INFO(" Stopping decoding.\n"); 1256 IVTV_DEBUG_INFO("Stopping decoding\n");
1259 if (atomic_read(&itv->decoding) > 0) { 1257 if (atomic_read(&itv->decoding) > 0) {
1260 int type; 1258 int type;
1261 1259
@@ -1268,30 +1266,30 @@ static void ivtv_remove(struct pci_dev *pci_dev)
1268 } 1266 }
1269 1267
1270 /* Interrupts */ 1268 /* Interrupts */
1271 IVTV_DEBUG_INFO(" Disabling interrupts.\n"); 1269 IVTV_DEBUG_INFO("Disabling interrupts\n");
1272 ivtv_set_irq_mask(itv, 0xffffffff); 1270 ivtv_set_irq_mask(itv, 0xffffffff);
1273 del_timer_sync(&itv->dma_timer); 1271 del_timer_sync(&itv->dma_timer);
1274 1272
1275 /* Stop all Work Queues */ 1273 /* Stop all Work Queues */
1276 IVTV_DEBUG_INFO(" Stop Work Queues.\n"); 1274 IVTV_DEBUG_INFO("Stop Work Queues\n");
1277 flush_workqueue(itv->irq_work_queues); 1275 flush_workqueue(itv->irq_work_queues);
1278 destroy_workqueue(itv->irq_work_queues); 1276 destroy_workqueue(itv->irq_work_queues);
1279 1277
1280 IVTV_DEBUG_INFO(" Stopping Firmware.\n"); 1278 IVTV_DEBUG_INFO("Stopping Firmware\n");
1281 ivtv_halt_firmware(itv); 1279 ivtv_halt_firmware(itv);
1282 1280
1283 IVTV_DEBUG_INFO(" Unregistering v4l devices.\n"); 1281 IVTV_DEBUG_INFO("Unregistering v4l devices\n");
1284 ivtv_streams_cleanup(itv); 1282 ivtv_streams_cleanup(itv);
1285 IVTV_DEBUG_INFO(" Freeing dma resources.\n"); 1283 IVTV_DEBUG_INFO("Freeing dma resources\n");
1286 ivtv_udma_free(itv); 1284 ivtv_udma_free(itv);
1287 1285
1288 exit_ivtv_i2c(itv); 1286 exit_ivtv_i2c(itv);
1289 1287
1290 IVTV_DEBUG_INFO(" Releasing irq.\n"); 1288 IVTV_DEBUG_INFO(" Releasing irq\n");
1291 free_irq(itv->dev->irq, (void *)itv); 1289 free_irq(itv->dev->irq, (void *)itv);
1292 ivtv_iounmap(itv); 1290 ivtv_iounmap(itv);
1293 1291
1294 IVTV_DEBUG_INFO(" Releasing mem.\n"); 1292 IVTV_DEBUG_INFO(" Releasing mem\n");
1295 release_mem_region(itv->base_addr, IVTV_ENCODER_SIZE); 1293 release_mem_region(itv->base_addr, IVTV_ENCODER_SIZE);
1296 release_mem_region(itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE); 1294 release_mem_region(itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE);
1297 if (itv->has_cx23415) 1295 if (itv->has_cx23415)
@@ -1312,28 +1310,27 @@ static struct pci_driver ivtv_pci_driver = {
1312 1310
1313static int module_start(void) 1311static int module_start(void)
1314{ 1312{
1315 printk(KERN_INFO "ivtv: ==================== START INIT IVTV ====================\n"); 1313 printk(KERN_INFO "ivtv: Start initialization, version %s\n", IVTV_VERSION);
1316 printk(KERN_INFO "ivtv: version %s loading\n", IVTV_VERSION);
1317 1314
1318 memset(ivtv_cards, 0, sizeof(ivtv_cards)); 1315 memset(ivtv_cards, 0, sizeof(ivtv_cards));
1319 1316
1320 /* Validate parameters */ 1317 /* Validate parameters */
1321 if (ivtv_first_minor < 0 || ivtv_first_minor >= IVTV_MAX_CARDS) { 1318 if (ivtv_first_minor < 0 || ivtv_first_minor >= IVTV_MAX_CARDS) {
1322 printk(KERN_ERR "ivtv: ivtv_first_minor must be between 0 and %d. Exiting...\n", 1319 printk(KERN_ERR "ivtv: Exiting, ivtv_first_minor must be between 0 and %d\n",
1323 IVTV_MAX_CARDS - 1); 1320 IVTV_MAX_CARDS - 1);
1324 return -1; 1321 return -1;
1325 } 1322 }
1326 1323
1327 if (ivtv_debug < 0 || ivtv_debug > 1023) { 1324 if (ivtv_debug < 0 || ivtv_debug > 1023) {
1328 ivtv_debug = 0; 1325 ivtv_debug = 0;
1329 printk(KERN_INFO "ivtv: debug value must be >= 0 and <= 1023!\n"); 1326 printk(KERN_INFO "ivtv: Debug value must be >= 0 and <= 1023\n");
1330 } 1327 }
1331 1328
1332 if (pci_register_driver(&ivtv_pci_driver)) { 1329 if (pci_register_driver(&ivtv_pci_driver)) {
1333 printk(KERN_ERR "ivtv: Error detecting PCI card\n"); 1330 printk(KERN_ERR "ivtv: Error detecting PCI card\n");
1334 return -ENODEV; 1331 return -ENODEV;
1335 } 1332 }
1336 printk(KERN_INFO "ivtv: ==================== END INIT IVTV ====================\n"); 1333 printk(KERN_INFO "ivtv: End initialization\n");
1337 return 0; 1334 return 0;
1338} 1335}
1339 1336