Commit ae38d93b authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB (5854): ivtv: cleanup of driver messages

Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 11d28766
...@@ -426,7 +426,7 @@ static void ivtv_process_eeprom(struct ivtv *itv) ...@@ -426,7 +426,7 @@ static void ivtv_process_eeprom(struct ivtv *itv)
if (itv->options.newi2c == -1 && tv.has_ir != -1 && tv.has_ir != 2) { if (itv->options.newi2c == -1 && tv.has_ir != -1 && tv.has_ir != 2) {
itv->options.newi2c = (tv.has_ir & 2) ? 1 : 0; itv->options.newi2c = (tv.has_ir & 2) ? 1 : 0;
if (itv->options.newi2c) { if (itv->options.newi2c) {
IVTV_INFO("reopen i2c bus for IR-blaster support\n"); IVTV_INFO("Reopen i2c bus for IR-blaster support\n");
exit_ivtv_i2c(itv); exit_ivtv_i2c(itv);
init_ivtv_i2c(itv); init_ivtv_i2c(itv);
} }
...@@ -950,7 +950,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev, ...@@ -950,7 +950,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
/* Make sure we've got a place for this card */ /* Make sure we've got a place for this card */
if (ivtv_cards_active == IVTV_MAX_CARDS) { if (ivtv_cards_active == IVTV_MAX_CARDS) {
printk(KERN_ERR "ivtv: Maximum number of cards detected (%d).\n", printk(KERN_ERR "ivtv: Maximum number of cards detected (%d)\n",
ivtv_cards_active); ivtv_cards_active);
spin_unlock(&ivtv_cards_lock); spin_unlock(&ivtv_cards_lock);
return -ENOMEM; return -ENOMEM;
...@@ -965,9 +965,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev, ...@@ -965,9 +965,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
itv->dev = dev; itv->dev = dev;
itv->num = ivtv_cards_active++; itv->num = ivtv_cards_active++;
snprintf(itv->name, sizeof(itv->name) - 1, "ivtv%d", itv->num); snprintf(itv->name, sizeof(itv->name) - 1, "ivtv%d", itv->num);
if (itv->num) { IVTV_INFO("Initializing card #%d\n", itv->num);
printk(KERN_INFO "ivtv: ====================== NEXT CARD ======================\n");
}
spin_unlock(&ivtv_cards_lock); spin_unlock(&ivtv_cards_lock);
...@@ -1214,7 +1212,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev, ...@@ -1214,7 +1212,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
if (itv->has_cx23415) if (itv->has_cx23415)
ivtv_set_osd_alpha(itv); ivtv_set_osd_alpha(itv);
IVTV_INFO("Initialized %s, card #%d\n", itv->card_name, itv->num); IVTV_INFO("Initialized card #%d: %s\n", itv->num, itv->card_name);
return 0; return 0;
...@@ -1247,15 +1245,15 @@ static void ivtv_remove(struct pci_dev *pci_dev) ...@@ -1247,15 +1245,15 @@ static void ivtv_remove(struct pci_dev *pci_dev)
{ {
struct ivtv *itv = pci_get_drvdata(pci_dev); struct ivtv *itv = pci_get_drvdata(pci_dev);
IVTV_DEBUG_INFO("Removing Card #%d.\n", itv->num); IVTV_DEBUG_INFO("Removing Card #%d\n", itv->num);
/* Stop all captures */ /* Stop all captures */
IVTV_DEBUG_INFO(" Stopping all streams.\n"); IVTV_DEBUG_INFO("Stopping all streams\n");
if (atomic_read(&itv->capturing) > 0) if (atomic_read(&itv->capturing) > 0)
ivtv_stop_all_captures(itv); ivtv_stop_all_captures(itv);
/* Stop all decoding */ /* Stop all decoding */
IVTV_DEBUG_INFO(" Stopping decoding.\n"); IVTV_DEBUG_INFO("Stopping decoding\n");
if (atomic_read(&itv->decoding) > 0) { if (atomic_read(&itv->decoding) > 0) {
int type; int type;
...@@ -1268,30 +1266,30 @@ static void ivtv_remove(struct pci_dev *pci_dev) ...@@ -1268,30 +1266,30 @@ static void ivtv_remove(struct pci_dev *pci_dev)
} }
/* Interrupts */ /* Interrupts */
IVTV_DEBUG_INFO(" Disabling interrupts.\n"); IVTV_DEBUG_INFO("Disabling interrupts\n");
ivtv_set_irq_mask(itv, 0xffffffff); ivtv_set_irq_mask(itv, 0xffffffff);
del_timer_sync(&itv->dma_timer); del_timer_sync(&itv->dma_timer);
/* Stop all Work Queues */ /* Stop all Work Queues */
IVTV_DEBUG_INFO(" Stop Work Queues.\n"); IVTV_DEBUG_INFO("Stop Work Queues\n");
flush_workqueue(itv->irq_work_queues); flush_workqueue(itv->irq_work_queues);
destroy_workqueue(itv->irq_work_queues); destroy_workqueue(itv->irq_work_queues);
IVTV_DEBUG_INFO(" Stopping Firmware.\n"); IVTV_DEBUG_INFO("Stopping Firmware\n");
ivtv_halt_firmware(itv); ivtv_halt_firmware(itv);
IVTV_DEBUG_INFO(" Unregistering v4l devices.\n"); IVTV_DEBUG_INFO("Unregistering v4l devices\n");
ivtv_streams_cleanup(itv); ivtv_streams_cleanup(itv);
IVTV_DEBUG_INFO(" Freeing dma resources.\n"); IVTV_DEBUG_INFO("Freeing dma resources\n");
ivtv_udma_free(itv); ivtv_udma_free(itv);
exit_ivtv_i2c(itv); exit_ivtv_i2c(itv);
IVTV_DEBUG_INFO(" Releasing irq.\n"); IVTV_DEBUG_INFO(" Releasing irq\n");
free_irq(itv->dev->irq, (void *)itv); free_irq(itv->dev->irq, (void *)itv);
ivtv_iounmap(itv); ivtv_iounmap(itv);
IVTV_DEBUG_INFO(" Releasing mem.\n"); IVTV_DEBUG_INFO(" Releasing mem\n");
release_mem_region(itv->base_addr, IVTV_ENCODER_SIZE); release_mem_region(itv->base_addr, IVTV_ENCODER_SIZE);
release_mem_region(itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE); release_mem_region(itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE);
if (itv->has_cx23415) if (itv->has_cx23415)
...@@ -1312,28 +1310,27 @@ static struct pci_driver ivtv_pci_driver = { ...@@ -1312,28 +1310,27 @@ static struct pci_driver ivtv_pci_driver = {
static int module_start(void) static int module_start(void)
{ {
printk(KERN_INFO "ivtv: ==================== START INIT IVTV ====================\n"); printk(KERN_INFO "ivtv: Start initialization, version %s\n", IVTV_VERSION);
printk(KERN_INFO "ivtv: version %s loading\n", IVTV_VERSION);
memset(ivtv_cards, 0, sizeof(ivtv_cards)); memset(ivtv_cards, 0, sizeof(ivtv_cards));
/* Validate parameters */ /* Validate parameters */
if (ivtv_first_minor < 0 || ivtv_first_minor >= IVTV_MAX_CARDS) { if (ivtv_first_minor < 0 || ivtv_first_minor >= IVTV_MAX_CARDS) {
printk(KERN_ERR "ivtv: ivtv_first_minor must be between 0 and %d. Exiting...\n", printk(KERN_ERR "ivtv: Exiting, ivtv_first_minor must be between 0 and %d\n",
IVTV_MAX_CARDS - 1); IVTV_MAX_CARDS - 1);
return -1; return -1;
} }
if (ivtv_debug < 0 || ivtv_debug > 1023) { if (ivtv_debug < 0 || ivtv_debug > 1023) {
ivtv_debug = 0; ivtv_debug = 0;
printk(KERN_INFO "ivtv: debug value must be >= 0 and <= 1023!\n"); printk(KERN_INFO "ivtv: Debug value must be >= 0 and <= 1023\n");
} }
if (pci_register_driver(&ivtv_pci_driver)) { if (pci_register_driver(&ivtv_pci_driver)) {
printk(KERN_ERR "ivtv: Error detecting PCI card\n"); printk(KERN_ERR "ivtv: Error detecting PCI card\n");
return -ENODEV; return -ENODEV;
} }
printk(KERN_INFO "ivtv: ==================== END INIT IVTV ====================\n"); printk(KERN_INFO "ivtv: End initialization\n");
return 0; return 0;
} }
......
...@@ -832,7 +832,7 @@ int ivtv_v4l2_open(struct inode *inode, struct file *filp) ...@@ -832,7 +832,7 @@ int ivtv_v4l2_open(struct inode *inode, struct file *filp)
if (itv == NULL) { if (itv == NULL) {
/* Couldn't find a device registered /* Couldn't find a device registered
on that minor, shouldn't happen! */ on that minor, shouldn't happen! */
printk(KERN_WARNING "ivtv: no ivtv device found on minor %d\n", minor); printk(KERN_WARNING "ivtv: No ivtv device found on minor %d\n", minor);
return -ENXIO; return -ENXIO;
} }
......
...@@ -61,7 +61,7 @@ retry: ...@@ -61,7 +61,7 @@ retry:
the wrong file was sometimes loaded. So we check filesizes to the wrong file was sometimes loaded. So we check filesizes to
see if at least the right-sized file was loaded. If not, then we see if at least the right-sized file was loaded. If not, then we
retry. */ retry. */
IVTV_INFO("retry: file loaded was not %s (expected size %ld, got %zd)\n", fn, size, fw->size); IVTV_INFO("Retry: file loaded was not %s (expected size %ld, got %zd)\n", fn, size, fw->size);
release_firmware(fw); release_firmware(fw);
retries--; retries--;
goto retry; goto retry;
...@@ -73,11 +73,11 @@ retry: ...@@ -73,11 +73,11 @@ retry:
src++; src++;
} }
release_firmware(fw); release_firmware(fw);
IVTV_INFO("loaded %s firmware (%zd bytes)\n", fn, fw->size); IVTV_INFO("Loaded %s firmware (%zd bytes)\n", fn, fw->size);
return size; return size;
} }
IVTV_ERR("unable to open firmware %s (must be %ld bytes)\n", fn, size); IVTV_ERR("Unable to open firmware %s (must be %ld bytes)\n", fn, size);
IVTV_ERR("did you put the firmware in the hotplug firmware directory?\n"); IVTV_ERR("Did you put the firmware in the hotplug firmware directory?\n");
return -ENOMEM; return -ENOMEM;
} }
......
...@@ -130,7 +130,7 @@ int ivtv_reset_tuner_gpio(enum v4l2_tuner_type mode, void *priv, int ptr) ...@@ -130,7 +130,7 @@ int ivtv_reset_tuner_gpio(enum v4l2_tuner_type mode, void *priv, int ptr)
if (itv->card->type != IVTV_CARD_PG600V2 || itv->options.tuner != TUNER_XCEIVE_XC3028) if (itv->card->type != IVTV_CARD_PG600V2 || itv->options.tuner != TUNER_XCEIVE_XC3028)
return -EINVAL; return -EINVAL;
IVTV_INFO("Resetting tuner.\n"); IVTV_INFO("Resetting tuner\n");
curout = read_reg(IVTV_REG_GPIO_OUT); curout = read_reg(IVTV_REG_GPIO_OUT);
curdir = read_reg(IVTV_REG_GPIO_DIR); curdir = read_reg(IVTV_REG_GPIO_DIR);
curdir |= (1 << 12); /* GPIO bit 12 */ curdir |= (1 << 12); /* GPIO bit 12 */
......
...@@ -144,7 +144,7 @@ static int attach_inform(struct i2c_client *client) ...@@ -144,7 +144,7 @@ static int attach_inform(struct i2c_client *client)
} }
} }
if (i == I2C_CLIENTS_MAX) { if (i == I2C_CLIENTS_MAX) {
IVTV_ERR("insufficient room for new I2C client!\n"); IVTV_ERR("Insufficient room for new I2C client\n");
} }
return 0; return 0;
} }
...@@ -569,7 +569,7 @@ int ivtv_call_i2c_client(struct ivtv *itv, int addr, unsigned int cmd, void *arg ...@@ -569,7 +569,7 @@ int ivtv_call_i2c_client(struct ivtv *itv, int addr, unsigned int cmd, void *arg
} }
} }
if (cmd != VIDIOC_G_CHIP_IDENT) if (cmd != VIDIOC_G_CHIP_IDENT)
IVTV_ERR("i2c addr 0x%02x not found for command 0x%x!\n", addr, cmd); IVTV_ERR("i2c addr 0x%02x not found for command 0x%x\n", addr, cmd);
return -ENODEV; return -ENODEV;
} }
...@@ -640,7 +640,7 @@ int ivtv_i2c_hw(struct ivtv *itv, u32 hw, unsigned int cmd, void *arg) ...@@ -640,7 +640,7 @@ int ivtv_i2c_hw(struct ivtv *itv, u32 hw, unsigned int cmd, void *arg)
addr = ivtv_i2c_hw_addr(itv, hw); addr = ivtv_i2c_hw_addr(itv, hw);
if (addr < 0) { if (addr < 0) {
IVTV_ERR("i2c hardware 0x%08x (%s) not found for command 0x%x!\n", IVTV_ERR("i2c hardware 0x%08x (%s) not found for command 0x%x\n",
hw, ivtv_i2c_hw_name(hw), cmd); hw, ivtv_i2c_hw_name(hw), cmd);
return addr; return addr;
} }
...@@ -655,7 +655,7 @@ int ivtv_i2c_id(struct ivtv *itv, u32 id, unsigned int cmd, void *arg) ...@@ -655,7 +655,7 @@ int ivtv_i2c_id(struct ivtv *itv, u32 id, unsigned int cmd, void *arg)
addr = ivtv_i2c_id_addr(itv, id); addr = ivtv_i2c_id_addr(itv, id);
if (addr < 0) { if (addr < 0) {
if (cmd != VIDIOC_G_CHIP_IDENT) if (cmd != VIDIOC_G_CHIP_IDENT)
IVTV_ERR("i2c ID 0x%08x (%s) not found for command 0x%x!\n", IVTV_ERR("i2c ID 0x%08x (%s) not found for command 0x%x\n",
id, ivtv_i2c_id_name(id), cmd); id, ivtv_i2c_id_name(id), cmd);
return addr; return addr;
} }
...@@ -696,7 +696,7 @@ int ivtv_upd64083(struct ivtv *itv, unsigned int cmd, void *arg) ...@@ -696,7 +696,7 @@ int ivtv_upd64083(struct ivtv *itv, unsigned int cmd, void *arg)
void ivtv_call_i2c_clients(struct ivtv *itv, unsigned int cmd, void *arg) void ivtv_call_i2c_clients(struct ivtv *itv, unsigned int cmd, void *arg)
{ {
if (itv->i2c_adap.algo == NULL) { if (itv->i2c_adap.algo == NULL) {
IVTV_ERR("adapter is not set"); IVTV_ERR("Adapter is not set");
return; return;
} }
i2c_clients_command(&itv->i2c_adap, cmd, arg); i2c_clients_command(&itv->i2c_adap, cmd, arg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment