diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-22 11:49:28 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-26 09:10:04 -0300 |
commit | 0dd5f20cb35b59f82b35e918658fa8ab22b9f13a (patch) | |
tree | 71a6e997ed7dc63abbcc3978df7a3cae5db3adc1 /drivers/media/common | |
parent | 6908368879c3e4965d849c893d3741858a8d1842 (diff) |
[media] siano: get rid of sms_info()
On most cases, sms_info() should actually be pr_debug(), but,
on other places, it should be pr_info().
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/siano/smscoreapi.c | 44 | ||||
-rw-r--r-- | drivers/media/common/siano/smscoreapi.h | 8 | ||||
-rw-r--r-- | drivers/media/common/siano/smsdvb-main.c | 10 |
3 files changed, 25 insertions, 37 deletions
diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c index e5bde84ec0be..36b44ce1373e 100644 --- a/drivers/media/common/siano/smscoreapi.c +++ b/drivers/media/common/siano/smscoreapi.c @@ -636,10 +636,8 @@ smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer, struct smscore_buffer_t *cb; cb = kzalloc(sizeof(struct smscore_buffer_t), GFP_KERNEL); - if (!cb) { - sms_info("kzalloc(...) failed"); + if (!cb) return NULL; - } cb->p = buffer; cb->offset_in_common = buffer - (u8 *) common_buffer; @@ -665,10 +663,8 @@ int smscore_register_device(struct smsdevice_params_t *params, u8 *buffer; dev = kzalloc(sizeof(struct smscore_device_t), GFP_KERNEL); - if (!dev) { - sms_info("kzalloc(...) failed"); + if (!dev) return -ENOMEM; - } /* init list entry so it could be safe in smscore_unregister_device */ INIT_LIST_HEAD(&dev->entry); @@ -723,7 +719,7 @@ int smscore_register_device(struct smsdevice_params_t *params, smscore_putbuffer(dev, cb); } - sms_info("allocated %d buffers", dev->num_buffers); + pr_debug("allocated %d buffers\n", dev->num_buffers); dev->mode = DEVICE_MODE_NONE; dev->board_id = SMS_BOARD_UNKNOWN; @@ -747,7 +743,7 @@ int smscore_register_device(struct smsdevice_params_t *params, *coredev = dev; - sms_info("device %p created", dev); + pr_debug("device %p created\n", dev); return 0; } @@ -764,7 +760,7 @@ static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, rc = coredev->sendrequest_handler(coredev->context, buffer, size); if (rc < 0) { - sms_info("sendrequest returned error %d", rc); + pr_info("sendrequest returned error %d\n", rc); return rc; } @@ -787,7 +783,7 @@ static int smscore_init_ir(struct smscore_device_t *coredev) coredev->ir.dev = NULL; ir_io = sms_get_board(smscore_get_board_id(coredev))->board_cfg.ir; if (ir_io) {/* only if IR port exist we use IR sub-module */ - sms_info("IR loading"); + pr_debug("IR loading\n"); rc = sms_ir_init(coredev); if (rc != 0) @@ -816,7 +812,7 @@ static int smscore_init_ir(struct smscore_device_t *coredev) pr_err("Sending IR initialization message failed\n"); } } else - sms_info("IR port has not been detected"); + pr_info("IR port has not been detected\n"); return 0; } @@ -890,12 +886,12 @@ int smscore_start_device(struct smscore_device_t *coredev) rc = smscore_set_device_mode(coredev, mode); if (rc < 0) { - sms_info("set device mode faile , rc %d", rc); + pr_info("set device mode failed , rc %d\n", rc); return rc; } rc = smscore_configure_board(coredev); if (rc < 0) { - sms_info("configure board failed , rc %d", rc); + pr_info("configure board failed , rc %d\n", rc); return rc; } @@ -904,7 +900,7 @@ int smscore_start_device(struct smscore_device_t *coredev) rc = smscore_notify_callbacks(coredev, coredev->device, 1); smscore_init_ir(coredev); - sms_info("device %p started, rc %d", coredev, rc); + pr_debug("device %p started, rc %d\n", coredev, rc); kmutex_unlock(&g_smscore_deviceslock); @@ -927,7 +923,7 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, mem_address = firmware->start_address; - sms_info("loading FW to addr 0x%x size %d", + pr_debug("loading FW to addr 0x%x size %d\n", mem_address, firmware->length); if (coredev->preload_handler) { rc = coredev->preload_handler(coredev->context); @@ -1169,7 +1165,7 @@ static int smscore_load_firmware_from_file(struct smscore_device_t *coredev, pr_err("failed to open firmware file '%s'\n", fw_filename); return rc; } - sms_info("read fw %s, buffer size=0x%zx", fw_filename, fw->size); + pr_debug("read fw %s, buffer size=0x%zx\n", fw_filename, fw->size); fw_buf = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT), GFP_KERNEL | GFP_DMA); if (!fw_buf) { @@ -1227,18 +1223,18 @@ void smscore_unregister_device(struct smscore_device_t *coredev) if (num_buffers == coredev->num_buffers) break; if (++retry > 10) { - sms_info("exiting although not all buffers released."); + pr_info("exiting although not all buffers released.\n"); break; } - sms_info("waiting for %d buffer(s)", + pr_debug("waiting for %d buffer(s)\n", coredev->num_buffers - num_buffers); kmutex_unlock(&g_smscore_deviceslock); msleep(100); kmutex_lock(&g_smscore_deviceslock); } - sms_info("freed %d buffers", num_buffers); + pr_debug("freed %d buffers\n", num_buffers); if (coredev->common_buffer) dma_free_coherent(NULL, coredev->common_buffer_size, @@ -1251,7 +1247,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev) kmutex_unlock(&g_smscore_deviceslock); - sms_info("device %p destroyed", coredev); + pr_debug("device %p destroyed\n", coredev); } EXPORT_SYMBOL_GPL(smscore_unregister_device); @@ -1358,7 +1354,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) } if (coredev->mode == mode) { - sms_info("device mode %d already set", mode); + pr_debug("device mode %d already set\n", mode); return 0; } @@ -1366,9 +1362,9 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) rc = smscore_load_firmware_from_file(coredev, mode, NULL); if (rc >= 0) - sms_info("firmware download success"); + pr_debug("firmware download success\n"); } else { - sms_info("mode %d is already supported by running firmware", + pr_debug("mode %d is already supported by running firmware\n", mode); } if (coredev->fw_version >= 0x800) { @@ -1776,7 +1772,7 @@ void smscore_unregister_client(struct smscore_client_t *client) kfree(identry); } - sms_info("%p", client->context); + pr_debug("%p\n", client->context); list_del(&client->entry); kfree(client); diff --git a/drivers/media/common/siano/smscoreapi.h b/drivers/media/common/siano/smscoreapi.h index ef735681cb8e..6ff8f64a3794 100644 --- a/drivers/media/common/siano/smscoreapi.h +++ b/drivers/media/common/siano/smscoreapi.h @@ -1176,12 +1176,4 @@ int smscore_led_state(struct smscore_device_t *core, int led); /* ------------------------------------------------------------------------ */ -#define DBG_INFO 1 -#define DBG_ADV 2 - -#define sms_info(fmt, arg...) do {\ - if (sms_dbg & DBG_INFO) \ - pr_info(fmt "\n", ##arg); \ -} while (0) - #endif /* __SMS_CORE_API_H__ */ diff --git a/drivers/media/common/siano/smsdvb-main.c b/drivers/media/common/siano/smsdvb-main.c index 9dd31083296f..e65fba160d90 100644 --- a/drivers/media/common/siano/smsdvb-main.c +++ b/drivers/media/common/siano/smsdvb-main.c @@ -591,7 +591,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) is_status_update = true; break; default: - sms_info("message not handled"); + pr_debug("message not handled\n"); } smscore_putbuffer(client->coredev, cb); @@ -884,7 +884,7 @@ static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe) msg.Data[0] = c->frequency; msg.Data[2] = 12000000; - sms_info("%s: freq %d band %d", __func__, c->frequency, + pr_debug("%s: freq %d band %d\n", __func__, c->frequency, c->bandwidth_hz); switch (c->bandwidth_hz / 1000000) { @@ -969,7 +969,7 @@ static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe) c->bandwidth_hz = 6000000; - sms_info("%s: freq %d segwidth %d segindex %d", __func__, + pr_debug("freq %d segwidth %d segindex %d\n", c->frequency, c->isdbt_sb_segment_count, c->isdbt_sb_segment_idx); @@ -1185,11 +1185,11 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev, client->event_unc_state = -1; sms_board_dvb3_event(client, DVB3_EVENT_HOTPLUG); - sms_info("success"); + pr_debug("success\n"); sms_board_setup(coredev); if (smsdvb_debugfs_create(client) < 0) - sms_info("failed to create debugfs node"); + pr_info("failed to create debugfs node\n"); dvb_create_media_graph(coredev->media_dev); |