Loading drivers/media/dvb/siano/smscoreapi.c +80 −81 Original line number Diff line number Diff line Loading @@ -34,16 +34,16 @@ #include "smscoreapi.h" #define PERROR(fmt, args...)\ printk(KERN_ERR "smscore error: line %d- %s(): " fmt, \ sms_err("smscore error: line %d- %s(): " fmt, \ __LINE__, __func__, ## args) #ifdef SMSCORE_DEBUG #undef PWARNING # define PWARNING(fmt, args...) printk(KERN_INFO "smscore warning: " \ # define PWARNING(fmt, args...) sms_info("smscore warning: " \ "line %d- %s(): " fmt, \ __LINE__, __func__, ## args) #undef PDEBUG /* undef it, just in case */ # define PDEBUG(fmt, args...) printk(KERN_INFO "smscore - %s(): " fmt, \ # define PDEBUG(fmt, args...) sms_info("smscore - %s(): " fmt, \ __func__, ## args) #else /*SMSCORE_DEBUG*/ #define PDEBUG(fmt, args...) Loading Loading @@ -157,7 +157,7 @@ static struct smscore_registry_entry_t *smscore_find_registry(char *devpath) strcpy(entry->devpath, devpath); list_add(&entry->entry, &g_smscore_registry); } else printk(KERN_ERR "%s failed to create smscore_registry.\n", sms_err("%s failed to create smscore_registry.\n", __func__); kmutex_unlock(&g_smscore_registrylock); return entry; Loading @@ -171,7 +171,7 @@ int smscore_registry_getmode(char *devpath) if (entry) return entry->mode; else printk(KERN_ERR "%s No registry found.\n", __func__); sms_err("%s No registry found.\n", __func__); return default_mode; } Loading @@ -184,7 +184,7 @@ enum sms_device_type_st smscore_registry_gettype(char *devpath) if (entry) return entry->type; else printk(KERN_ERR "%s No registry found.\n", __func__); sms_err("%s No registry found.\n", __func__); return -1; } Loading @@ -197,7 +197,7 @@ void smscore_registry_setmode(char *devpath, int mode) if (entry) entry->mode = mode; else printk(KERN_ERR "%s No registry found.\n", __func__); sms_err("%s No registry found.\n", __func__); } void smscore_registry_settype(char *devpath, enum sms_device_type_st type) Loading @@ -208,7 +208,7 @@ void smscore_registry_settype(char *devpath, enum sms_device_type_st type) if (entry) entry->type = type; else printk(KERN_ERR "%s No registry found.\n", __func__); sms_err("%s No registry found.\n", __func__); } Loading Loading @@ -331,7 +331,7 @@ struct smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer, struct smscore_buffer_t *cb = kmalloc(sizeof(struct smscore_buffer_t), GFP_KERNEL); if (!cb) { printk(KERN_INFO "%s kmalloc(...) failed\n", __func__); sms_info("%s kmalloc(...) failed\n", __func__); return NULL; } Loading Loading @@ -360,7 +360,7 @@ int smscore_register_device(struct smsdevice_params_t *params, dev = kzalloc(sizeof(struct smscore_device_t), GFP_KERNEL); if (!dev) { printk(KERN_INFO "%s kzalloc(...) failed\n", __func__); sms_info("%s kzalloc(...) failed\n", __func__); return -ENOMEM; } Loading Loading @@ -408,7 +408,7 @@ int smscore_register_device(struct smsdevice_params_t *params, smscore_putbuffer(dev, cb); } printk(KERN_INFO "%s allocated %d buffers\n", sms_info("%s allocated %d buffers\n", __func__, dev->num_buffers); dev->mode = DEVICE_MODE_NONE; Loading @@ -432,7 +432,7 @@ int smscore_register_device(struct smsdevice_params_t *params, *coredev = dev; printk(KERN_INFO "%s device %p created\n", __func__, dev); sms_info("%s device %p created\n", __func__, dev); return 0; } Loading @@ -450,7 +450,7 @@ int smscore_start_device(struct smscore_device_t *coredev) int rc = smscore_set_device_mode( coredev, smscore_registry_getmode(coredev->devpath)); if (rc < 0) { printk(KERN_INFO "%s set device mode faile , rc %d\n", sms_info("%s set device mode faile , rc %d\n", __func__, rc); return rc; } Loading @@ -459,7 +459,7 @@ int smscore_start_device(struct smscore_device_t *coredev) rc = smscore_notify_callbacks(coredev, coredev->device, 1); printk(KERN_INFO "%s device %p started, rc %d\n", sms_info("%s device %p started, rc %d\n", __func__, coredev, rc); kmutex_unlock(&g_smscore_deviceslock); Loading @@ -472,7 +472,7 @@ int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, void *buffer, { int rc = coredev->sendrequest_handler(coredev->context, buffer, size); if (rc < 0) { printk(KERN_INFO "%s sendrequest returned error %d\n", sms_info("%s sendrequest returned error %d\n", __func__, rc); return rc; } Loading @@ -491,7 +491,7 @@ int smscore_load_firmware_family2(struct smscore_device_t *coredev, u8 *payload = firmware->Payload; int rc = 0; printk(KERN_INFO "%s loading FW to addr 0x%x size %d\n", sms_info("%s loading FW to addr 0x%x size %d\n", __func__, mem_address, firmware->Length); if (coredev->preload_handler) { rc = coredev->preload_handler(coredev->context); Loading Loading @@ -578,7 +578,7 @@ int smscore_load_firmware_family2(struct smscore_device_t *coredev, msleep(500); } printk(KERN_DEBUG "%s rc=%d, postload=%p \n", __func__, rc, sms_debug("%s rc=%d, postload=%p \n", __func__, rc, coredev->postload_handler); kfree(msg); Loading Loading @@ -612,11 +612,11 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev, rc = request_firmware(&fw, filename, coredev->device); if (rc < 0) { printk(KERN_INFO "%s failed to open \"%s\"\n", sms_info("%s failed to open \"%s\"\n", __func__, filename); return rc; } printk(KERN_INFO "%s read FW %s, size=%d\"\n", __func__, sms_info("%s read FW %s, size=%d\"\n", __func__, filename, fw->size); fw_buffer = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT), GFP_KERNEL | GFP_DMA); Loading @@ -632,7 +632,7 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev, kfree(fw_buffer); } else { printk(KERN_INFO "%s failed to allocate firmware buffer\n", sms_info("%s failed to allocate firmware buffer\n", __func__); rc = -ENOMEM; } Loading Loading @@ -680,17 +680,17 @@ void smscore_unregister_device(struct smscore_device_t *coredev) if (num_buffers == coredev->num_buffers) break; if (++retry > 10) { printk(KERN_INFO "%s exiting although " sms_info("%s exiting although " "not all buffers released.\n", __func__); break; } printk(KERN_INFO "%s waiting for %d buffer(s)\n", __func__, sms_info("%s waiting for %d buffer(s)\n", __func__, coredev->num_buffers - num_buffers); msleep(100); } printk(KERN_INFO "%s freed %d buffers\n", __func__, num_buffers); sms_info("%s freed %d buffers\n", __func__, num_buffers); if (coredev->common_buffer) dma_free_coherent(NULL, coredev->common_buffer_size, Loading @@ -702,7 +702,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev) kmutex_unlock(&g_smscore_deviceslock); printk(KERN_INFO "%s device %p destroyed\n", __func__, coredev); sms_info("%s device %p destroyed\n", __func__, coredev); } int smscore_detect_mode(struct smscore_device_t *coredev) Loading @@ -722,7 +722,7 @@ int smscore_detect_mode(struct smscore_device_t *coredev) rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength, &coredev->version_ex_done); if (rc == -ETIME) { printk(KERN_ERR "%s: MSG_SMS_GET_VERSION_EX_REQ " sms_err("%s: MSG_SMS_GET_VERSION_EX_REQ " "failed first try\n", __func__); if (wait_for_completion_timeout(&coredev->resume_done, Loading @@ -731,7 +731,7 @@ int smscore_detect_mode(struct smscore_device_t *coredev) coredev, msg, msg->msgLength, &coredev->version_ex_done); if (rc < 0) printk(KERN_ERR "%s: " sms_err("%s: " "MSG_SMS_GET_VERSION_EX_REQ failed " "second try, rc %d\n", __func__, rc); } else Loading Loading @@ -783,7 +783,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) PDEBUG("set device mode to %d\n", mode); if (coredev->device_flags & SMS_DEVICE_FAMILY2) { if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER) { printk(KERN_INFO "%s invalid mode specified %d\n", sms_info("%s invalid mode specified %d\n", __func__, mode); return -EINVAL; } Loading @@ -793,14 +793,14 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) if (!(coredev->device_flags & SMS_DEVICE_NOT_READY)) { rc = smscore_detect_mode(coredev); if (rc < 0) { printk(KERN_INFO "%s mode detect failed %d\n", sms_info("%s mode detect failed %d\n", __func__, rc); return rc; } } if (coredev->mode == mode) { printk(KERN_INFO "%s device mode %d already set\n", sms_info("%s device mode %d already set\n", __func__, mode); return 0; } Loading @@ -810,12 +810,12 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) rc = smscore_load_firmware_from_file( coredev, smscore_fw_lkup[mode][type], NULL); if (rc < 0) { printk(KERN_INFO "%s load firmware " sms_info("%s load firmware " "failed %d\n", __func__, rc); return rc; } } else printk(KERN_INFO "%s mode %d supported by running " sms_info("%s mode %d supported by running " "firmware\n", __func__, mode); buffer = kmalloc(sizeof(struct SmsMsgData_ST) + Loading @@ -835,13 +835,13 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) kfree(buffer); } else { printk(KERN_INFO "%s Could not allocate buffer for " sms_info("%s Could not allocate buffer for " "init device message.\n", __func__); rc = -ENOMEM; } } else { if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { printk(KERN_INFO "%s invalid mode specified %d\n", sms_info("%s invalid mode specified %d\n", __func__, mode); return -EINVAL; } Loading @@ -862,7 +862,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) } if (rc != 0) printk(KERN_INFO "%s return error code %d.\n", __func__, rc); sms_info("%s return error code %d.\n", __func__, rc); return rc; } Loading Loading @@ -945,7 +945,7 @@ void smscore_onresponse(struct smscore_device_t *coredev, last_sample_time = time_now; if (time_now - last_sample_time > 10000) { printk(KERN_DEBUG "\n%s data rate %d bytes/secs\n", __func__, sms_debug("\n%s data rate %d bytes/secs\n", __func__, (int)((data_total * 1000) / (time_now - last_sample_time))); Loading @@ -965,7 +965,7 @@ void smscore_onresponse(struct smscore_device_t *coredev, { struct SmsVersionRes_ST *ver = (struct SmsVersionRes_ST *) phdr; printk(KERN_DEBUG "%s: MSG_SMS_GET_VERSION_EX_RES " sms_debug("%s: MSG_SMS_GET_VERSION_EX_RES " "id %d prots 0x%x ver %d.%d\n", __func__, ver->FirmwareId, ver->SupportedProtocols, ver->RomVersionMajor, ver->RomVersionMinor); Loading @@ -978,12 +978,12 @@ void smscore_onresponse(struct smscore_device_t *coredev, break; } case MSG_SMS_INIT_DEVICE_RES: printk(KERN_DEBUG "%s: MSG_SMS_INIT_DEVICE_RES\n", sms_debug("%s: MSG_SMS_INIT_DEVICE_RES\n", __func__); complete(&coredev->init_device_done); break; case MSG_SW_RELOAD_START_RES: printk(KERN_DEBUG "%s: MSG_SW_RELOAD_START_RES\n", sms_debug("%s: MSG_SW_RELOAD_START_RES\n", __func__); complete(&coredev->reload_start_done); break; Loading @@ -991,12 +991,11 @@ void smscore_onresponse(struct smscore_device_t *coredev, complete(&coredev->data_download_done); break; case MSG_SW_RELOAD_EXEC_RES: printk(KERN_DEBUG "%s: MSG_SW_RELOAD_EXEC_RES\n", sms_debug("%s: MSG_SW_RELOAD_EXEC_RES\n", __func__); break; case MSG_SMS_SWDOWNLOAD_TRIGGER_RES: printk(KERN_DEBUG "%s: MSG_SMS_SWDOWNLOAD_TRIGGER_RES\n", sms_debug("%s: MSG_SMS_SWDOWNLOAD_TRIGGER_RES\n", __func__); complete(&coredev->trigger_done); break; Loading Loading @@ -1150,7 +1149,7 @@ void smscore_unregister_client(struct smscore_client_t *client) kfree(identry); } printk(KERN_INFO "%s %p\n", __func__, client->context); sms_info("%s %p\n", __func__, client->context); list_del(&client->entry); kfree(client); Loading @@ -1177,7 +1176,7 @@ int smsclient_sendrequest(struct smscore_client_t *client, int rc; if (client == NULL) { printk(KERN_ERR "%s Got NULL client\n", __func__); sms_err("%s Got NULL client\n", __func__); return -EINVAL; } Loading @@ -1185,7 +1184,7 @@ int smsclient_sendrequest(struct smscore_client_t *client, /* check that no other channel with same id exists */ if (coredev == NULL) { printk(KERN_ERR "%s Got NULL coredev\n", __func__); sms_err("%s Got NULL coredev\n", __func__); return -EINVAL; } Loading Loading @@ -1226,12 +1225,12 @@ int smscore_map_common_buffer(struct smscore_device_t *coredev, if (!(vma->vm_flags & (VM_READ | VM_SHARED)) || (vma->vm_flags & VM_WRITE)) { printk(KERN_INFO "%s invalid vm flags\n", __func__); sms_info("%s invalid vm flags\n", __func__); return -EINVAL; } if ((end - start) != size) { printk(KERN_INFO "%s invalid size %d expected %d\n", sms_info("%s invalid size %d expected %d\n", __func__, (int)(end - start), (int) size); return -EINVAL; } Loading @@ -1239,7 +1238,7 @@ int smscore_map_common_buffer(struct smscore_device_t *coredev, if (remap_pfn_range(vma, start, coredev->common_buffer_phys >> PAGE_SHIFT, size, pgprot_noncached(vma->vm_page_prot))) { printk(KERN_INFO "%s remap_page_range failed\n", __func__); sms_info("%s remap_page_range failed\n", __func__); return -EAGAIN; } Loading @@ -1263,7 +1262,7 @@ int smscore_module_init(void) /* DVB Register */ rc = smsdvb_register(); printk(KERN_INFO "%s, rc %d\n", __func__, rc); sms_info("%s, rc %d\n", __func__, rc); return rc; } Loading Loading @@ -1299,7 +1298,7 @@ void smscore_module_exit(void) /* Unregister USB */ smsusb_unregister(); printk(KERN_INFO "%s\n", __func__); sms_info("%s\n", __func__); } module_init(smscore_module_init); Loading drivers/media/dvb/siano/smscoreapi.h +5 −0 Original line number Diff line number Diff line Loading @@ -414,4 +414,9 @@ void smsdvb_unregister(void); int smsusb_register(void); void smsusb_unregister(void); #define sms_err(fmt, arg...) printk(KERN_ERR fmt, ##arg) #define sms_info(fmt, arg...) printk(KERN_INFO fmt, ##arg) #define sms_debug(fmt, arg...) printk(KERN_DEBUG fmt, ##arg) #endif /* __smscoreapi_h__ */ drivers/media/dvb/siano/smsdvb.c +23 −23 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ static int smsdvb_start_feed(struct dvb_demux_feed *feed) container_of(feed->demux, struct smsdvb_client_t, demux); struct SmsMsgData_ST PidMsg; printk(KERN_DEBUG "%s add pid %d(%x)\n", __func__, sms_debug("%s add pid %d(%x)\n", __func__, feed->pid, feed->pid); PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; Loading @@ -133,7 +133,7 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed) container_of(feed->demux, struct smsdvb_client_t, demux); struct SmsMsgData_ST PidMsg; printk(KERN_DEBUG "%s remove pid %d(%x)\n", __func__, sms_debug("%s remove pid %d(%x)\n", __func__, feed->pid, feed->pid); PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; Loading Loading @@ -220,7 +220,7 @@ static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr) static int smsdvb_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *tune) { printk(KERN_DEBUG "%s\n", __func__); sms_debug("%s\n", __func__); tune->min_delay_ms = 400; tune->step_size = 250000; Loading @@ -247,7 +247,7 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe, Msg.Data[0] = fep->frequency; Msg.Data[2] = 12000000; printk(KERN_DEBUG "%s freq %d band %d\n", __func__, sms_debug("%s freq %d band %d\n", __func__, fep->frequency, fep->u.ofdm.bandwidth); switch (fep->u.ofdm.bandwidth) { Loading @@ -268,7 +268,7 @@ static int smsdvb_get_frontend(struct dvb_frontend *fe, struct smsdvb_client_t *client = container_of(fe, struct smsdvb_client_t, frontend); printk(KERN_DEBUG "%s\n", __func__); sms_debug("%s\n", __func__); /* todo: */ memcpy(fep, &client->fe_params, Loading Loading @@ -322,14 +322,14 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, return 0; if (smscore_get_device_mode(coredev) != 4) { printk(KERN_ERR "%sSMS Device mode is not set for " sms_err("%sSMS Device mode is not set for " "DVB operation.\n", __func__); return 0; } client = kzalloc(sizeof(struct smsdvb_client_t), GFP_KERNEL); if (!client) { printk(KERN_INFO "%s kmalloc() failed\n", __func__); sms_info("%s kmalloc() failed\n", __func__); return -ENOMEM; } Loading @@ -339,7 +339,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, smscore_get_board_id(coredev))->name, THIS_MODULE, device, adapter_nr); if (rc < 0) { printk(KERN_ERR "%s dvb_register_adapter() failed %d\n", sms_err("%s dvb_register_adapter() failed %d\n", __func__, rc); goto adapter_error; } Loading @@ -353,7 +353,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, rc = dvb_dmx_init(&client->demux); if (rc < 0) { printk(KERN_ERR "%s dvb_dmx_init failed %d\n\n", sms_err("%s dvb_dmx_init failed %d\n\n", __func__, rc); goto dvbdmx_error; } Loading @@ -365,7 +365,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, rc = dvb_dmxdev_init(&client->dmxdev, &client->adapter); if (rc < 0) { printk(KERN_ERR "%s dvb_dmxdev_init failed %d\n", sms_err("%s dvb_dmxdev_init failed %d\n", __func__, rc); goto dmxdev_error; } Loading @@ -376,7 +376,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, rc = dvb_register_frontend(&client->adapter, &client->frontend); if (rc < 0) { printk(KERN_ERR "%s frontend registration failed %d\n", sms_err("%s frontend registration failed %d\n", __func__, rc); goto frontend_error; } Loading @@ -389,7 +389,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, rc = smscore_register_client(coredev, ¶ms, &client->smsclient); if (rc < 0) { printk(KERN_INFO "%s smscore_register_client() failed %d\n", sms_info("%s smscore_register_client() failed %d\n", __func__, rc); goto client_error; } Loading @@ -405,7 +405,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, kmutex_unlock(&g_smsdvb_clientslock); printk(KERN_INFO "%s success\n", __func__); sms_info("%s success\n", __func__); return 0; Loading Loading @@ -435,7 +435,7 @@ int smsdvb_register(void) rc = smscore_register_hotplug(smsdvb_hotplug); printk(KERN_INFO "%s\n", __func__); sms_info("%s\n", __func__); return rc; } Loading drivers/media/dvb/siano/smsusb.c +53 −53 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ void smsusb_onresponse(struct urb *urb) struct smsusb_device_t *dev = surb->dev; if (urb->status < 0) { printk(KERN_INFO "%s error, urb status %d, %d bytes\n", sms_info("%s error, urb status %d, %d bytes\n", __func__, urb->status, urb->actual_length); return; } Loading @@ -81,8 +81,8 @@ void smsusb_onresponse(struct urb *urb) /* sanity check */ if (((int) phdr->msgLength + surb->cb->offset) > urb->actual_length) { printk(KERN_INFO "%s: invalid " "response msglen %d offset %d " sms_info("%s: invalid response " "msglen %d offset %d " "size %d\n", __func__, phdr->msgLength, surb->cb->offset, Loading @@ -100,7 +100,7 @@ void smsusb_onresponse(struct urb *urb) smscore_onresponse(dev->coredev, surb->cb); surb->cb = NULL; } else { printk(KERN_INFO "%s invalid response " sms_info("%s invalid response " "msglen %d actual %d\n", __func__, phdr->msgLength, urb->actual_length); } Loading @@ -115,7 +115,7 @@ int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb) if (!surb->cb) { surb->cb = smscore_getbuffer(dev->coredev); if (!surb->cb) { printk(KERN_INFO "%s smscore_getbuffer(...) " sms_info("%s smscore_getbuffer(...) " "returned NULL\n", __func__); return -ENOMEM; } Loading Loading @@ -157,7 +157,7 @@ int smsusb_start_streaming(struct smsusb_device_t *dev) for (i = 0; i < MAX_URBS; i++) { rc = smsusb_submit_urb(dev, &dev->surbs[i]); if (rc < 0) { printk(KERN_INFO "%s smsusb_submit_urb(...) " sms_info("%s smsusb_submit_urb(...) " "failed\n", __func__); smsusb_stop_streaming(dev); break; Loading Loading @@ -191,14 +191,14 @@ int smsusb1_load_firmware(struct usb_device *udev, int id) int rc, dummy; if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) { printk(KERN_INFO "%s invalid firmware id specified %d\n", sms_info("%s invalid firmware id specified %d\n", __func__, id); return -EINVAL; } rc = request_firmware(&fw, smsusb1_fw_lkup[id], &udev->dev); if (rc < 0) { printk(KERN_INFO "%s failed to open \"%s\" mode %d\n", sms_info("%s failed to open \"%s\" mode %d\n", __func__, smsusb1_fw_lkup[id], id); return rc; } Loading @@ -210,12 +210,12 @@ int smsusb1_load_firmware(struct usb_device *udev, int id) rc = usb_bulk_msg(udev, usb_sndbulkpipe(udev, 2), fw_buffer, fw->size, &dummy, 1000); printk(KERN_INFO "%s: sent %d(%d) bytes, rc %d\n", sms_info("%s: sent %d(%d) bytes, rc %d\n", __func__, fw->size, dummy, rc); kfree(fw_buffer); } else { printk(KERN_INFO "failed to allocate firmware buffer\n"); sms_info("failed to allocate firmware buffer\n"); rc = -ENOMEM; } Loading @@ -233,7 +233,7 @@ void smsusb1_detectmode(void *context, int *mode) if (!product_string) { product_string = "none"; printk(KERN_ERR "%s product string not found\n", __func__); sms_err("%s product string not found\n", __func__); } else if (strstr(product_string, "DVBH")) *mode = 1; else if (strstr(product_string, "BDA")) Loading @@ -243,7 +243,7 @@ void smsusb1_detectmode(void *context, int *mode) else if (strstr(product_string, "TDMB")) *mode = 2; printk(KERN_INFO "%s: %d \"%s\"\n", __func__, *mode, product_string); sms_info("%s: %d \"%s\"\n", __func__, *mode, product_string); } int smsusb1_setmode(void *context, int mode) Loading @@ -252,7 +252,7 @@ int smsusb1_setmode(void *context, int mode) sizeof(struct SmsMsgHdr_ST), 0 }; if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { printk(KERN_INFO "%s invalid firmware id specified %d\n", sms_info("%s invalid firmware id specified %d\n", __func__, mode); return -EINVAL; } Loading @@ -274,7 +274,7 @@ void smsusb_term_device(struct usb_interface *intf) kfree(dev); printk(KERN_INFO "%s device %p destroyed\n", __func__, dev); sms_info("%s device %p destroyed\n", __func__, dev); } usb_set_intfdata(intf, NULL); Loading @@ -290,7 +290,7 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) /* create device object */ dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL); if (!dev) { printk(KERN_INFO "%s kzalloc(sizeof(struct smsusb_device_t) " sms_info("%s kzalloc(sizeof(struct smsusb_device_t) " "failed\n", __func__); return -ENOMEM; } Loading @@ -309,24 +309,24 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) params.setmode_handler = smsusb1_setmode; params.detectmode_handler = smsusb1_detectmode; params.device_type = SMS_STELLAR; printk(KERN_INFO "%s stellar device found\n", __func__); sms_info("%s stellar device found\n", __func__); break; default: switch (board->type) { case SMS_NOVA_A0: params.device_type = SMS_NOVA_A0; printk(KERN_INFO "%s nova A0 found\n", __func__); sms_info("%s nova A0 found\n", __func__); break; case SMS_NOVA_B0: params.device_type = SMS_NOVA_B0; printk(KERN_INFO "%s nova B0 found\n", __func__); sms_info("%s nova B0 found\n", __func__); break; case SMS_VEGA: params.device_type = SMS_VEGA; printk(KERN_INFO "%s Vega found\n", __func__); sms_info("%s Vega found\n", __func__); break; default: printk(KERN_ERR "%s Unspecified sms device type!\n", sms_err("%s Unspecified sms device type!\n", __func__); } Loading @@ -350,7 +350,7 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) /* register in smscore */ rc = smscore_register_device(¶ms, &dev->coredev); if (rc < 0) { printk(KERN_INFO "%s smscore_register_device(...) failed, " sms_info("%s smscore_register_device(...) failed, " "rc %d\n", __func__, rc); smsusb_term_device(intf); return rc; Loading @@ -364,10 +364,10 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) usb_init_urb(&dev->surbs[i].urb); } printk(KERN_INFO "%s smsusb_start_streaming(...).\n", __func__); sms_info("%s smsusb_start_streaming(...).\n", __func__); rc = smsusb_start_streaming(dev); if (rc < 0) { printk(KERN_INFO "%s smsusb_start_streaming(...) failed\n", sms_info("%s smsusb_start_streaming(...) failed\n", __func__); smsusb_term_device(intf); return rc; Loading @@ -375,13 +375,13 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) rc = smscore_start_device(dev->coredev); if (rc < 0) { printk(KERN_INFO "%s smscore_start_device(...) failed\n", sms_info("%s smscore_start_device(...) failed\n", __func__); smsusb_term_device(intf); return rc; } printk(KERN_INFO "%s device %p created\n", __func__, dev); sms_info("%s device %p created\n", __func__, dev); return rc; } Loading @@ -399,36 +399,36 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id) rc = usb_set_interface( udev, intf->cur_altsetting->desc.bInterfaceNumber, 0); if (rc < 0) { printk(KERN_INFO "%s usb_set_interface failed, " sms_info("%s usb_set_interface failed, " "rc %d\n", __func__, rc); return rc; } } printk(KERN_INFO "smsusb_probe %d\n", sms_info("smsusb_probe %d\n", intf->cur_altsetting->desc.bInterfaceNumber); for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) printk(KERN_INFO "endpoint %d %02x %02x %d\n", i, sms_info("endpoint %d %02x %02x %d\n", i, intf->cur_altsetting->endpoint[i].desc.bEndpointAddress, intf->cur_altsetting->endpoint[i].desc.bmAttributes, intf->cur_altsetting->endpoint[i].desc.wMaxPacketSize); if ((udev->actconfig->desc.bNumInterfaces == 2) && (intf->cur_altsetting->desc.bInterfaceNumber == 0)) { printk(KERN_INFO "rom interface 0 is not used\n"); sms_info("rom interface 0 is not used\n"); return -ENODEV; } if (intf->cur_altsetting->desc.bInterfaceNumber == 1) { snprintf(devpath, sizeof(devpath), "usb\\%d-%s", udev->bus->busnum, udev->devpath); printk(KERN_INFO "stellar device was found.\n"); sms_info("stellar device was found.\n"); return smsusb1_load_firmware( udev, smscore_registry_getmode(devpath)); } rc = smsusb_init_device(intf, id->driver_info); printk(KERN_INFO "%s rc %d\n", __func__, rc); sms_info("%s rc %d\n", __func__, rc); return rc; } Loading @@ -448,16 +448,16 @@ int smsusb_register(void) { int rc = usb_register(&smsusb_driver); if (rc) printk(KERN_INFO "usb_register failed. Error number %d\n", rc); sms_info("usb_register failed. Error number %d\n", rc); printk(KERN_INFO "%s\n", __func__); sms_info("%s\n", __func__); return rc; } void smsusb_unregister(void) { printk(KERN_DEBUG "%s\n", __func__); sms_debug("%s\n", __func__); /* Regular USB Cleanup */ usb_deregister(&smsusb_driver); } Loading Loading
drivers/media/dvb/siano/smscoreapi.c +80 −81 Original line number Diff line number Diff line Loading @@ -34,16 +34,16 @@ #include "smscoreapi.h" #define PERROR(fmt, args...)\ printk(KERN_ERR "smscore error: line %d- %s(): " fmt, \ sms_err("smscore error: line %d- %s(): " fmt, \ __LINE__, __func__, ## args) #ifdef SMSCORE_DEBUG #undef PWARNING # define PWARNING(fmt, args...) printk(KERN_INFO "smscore warning: " \ # define PWARNING(fmt, args...) sms_info("smscore warning: " \ "line %d- %s(): " fmt, \ __LINE__, __func__, ## args) #undef PDEBUG /* undef it, just in case */ # define PDEBUG(fmt, args...) printk(KERN_INFO "smscore - %s(): " fmt, \ # define PDEBUG(fmt, args...) sms_info("smscore - %s(): " fmt, \ __func__, ## args) #else /*SMSCORE_DEBUG*/ #define PDEBUG(fmt, args...) Loading Loading @@ -157,7 +157,7 @@ static struct smscore_registry_entry_t *smscore_find_registry(char *devpath) strcpy(entry->devpath, devpath); list_add(&entry->entry, &g_smscore_registry); } else printk(KERN_ERR "%s failed to create smscore_registry.\n", sms_err("%s failed to create smscore_registry.\n", __func__); kmutex_unlock(&g_smscore_registrylock); return entry; Loading @@ -171,7 +171,7 @@ int smscore_registry_getmode(char *devpath) if (entry) return entry->mode; else printk(KERN_ERR "%s No registry found.\n", __func__); sms_err("%s No registry found.\n", __func__); return default_mode; } Loading @@ -184,7 +184,7 @@ enum sms_device_type_st smscore_registry_gettype(char *devpath) if (entry) return entry->type; else printk(KERN_ERR "%s No registry found.\n", __func__); sms_err("%s No registry found.\n", __func__); return -1; } Loading @@ -197,7 +197,7 @@ void smscore_registry_setmode(char *devpath, int mode) if (entry) entry->mode = mode; else printk(KERN_ERR "%s No registry found.\n", __func__); sms_err("%s No registry found.\n", __func__); } void smscore_registry_settype(char *devpath, enum sms_device_type_st type) Loading @@ -208,7 +208,7 @@ void smscore_registry_settype(char *devpath, enum sms_device_type_st type) if (entry) entry->type = type; else printk(KERN_ERR "%s No registry found.\n", __func__); sms_err("%s No registry found.\n", __func__); } Loading Loading @@ -331,7 +331,7 @@ struct smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer, struct smscore_buffer_t *cb = kmalloc(sizeof(struct smscore_buffer_t), GFP_KERNEL); if (!cb) { printk(KERN_INFO "%s kmalloc(...) failed\n", __func__); sms_info("%s kmalloc(...) failed\n", __func__); return NULL; } Loading Loading @@ -360,7 +360,7 @@ int smscore_register_device(struct smsdevice_params_t *params, dev = kzalloc(sizeof(struct smscore_device_t), GFP_KERNEL); if (!dev) { printk(KERN_INFO "%s kzalloc(...) failed\n", __func__); sms_info("%s kzalloc(...) failed\n", __func__); return -ENOMEM; } Loading Loading @@ -408,7 +408,7 @@ int smscore_register_device(struct smsdevice_params_t *params, smscore_putbuffer(dev, cb); } printk(KERN_INFO "%s allocated %d buffers\n", sms_info("%s allocated %d buffers\n", __func__, dev->num_buffers); dev->mode = DEVICE_MODE_NONE; Loading @@ -432,7 +432,7 @@ int smscore_register_device(struct smsdevice_params_t *params, *coredev = dev; printk(KERN_INFO "%s device %p created\n", __func__, dev); sms_info("%s device %p created\n", __func__, dev); return 0; } Loading @@ -450,7 +450,7 @@ int smscore_start_device(struct smscore_device_t *coredev) int rc = smscore_set_device_mode( coredev, smscore_registry_getmode(coredev->devpath)); if (rc < 0) { printk(KERN_INFO "%s set device mode faile , rc %d\n", sms_info("%s set device mode faile , rc %d\n", __func__, rc); return rc; } Loading @@ -459,7 +459,7 @@ int smscore_start_device(struct smscore_device_t *coredev) rc = smscore_notify_callbacks(coredev, coredev->device, 1); printk(KERN_INFO "%s device %p started, rc %d\n", sms_info("%s device %p started, rc %d\n", __func__, coredev, rc); kmutex_unlock(&g_smscore_deviceslock); Loading @@ -472,7 +472,7 @@ int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, void *buffer, { int rc = coredev->sendrequest_handler(coredev->context, buffer, size); if (rc < 0) { printk(KERN_INFO "%s sendrequest returned error %d\n", sms_info("%s sendrequest returned error %d\n", __func__, rc); return rc; } Loading @@ -491,7 +491,7 @@ int smscore_load_firmware_family2(struct smscore_device_t *coredev, u8 *payload = firmware->Payload; int rc = 0; printk(KERN_INFO "%s loading FW to addr 0x%x size %d\n", sms_info("%s loading FW to addr 0x%x size %d\n", __func__, mem_address, firmware->Length); if (coredev->preload_handler) { rc = coredev->preload_handler(coredev->context); Loading Loading @@ -578,7 +578,7 @@ int smscore_load_firmware_family2(struct smscore_device_t *coredev, msleep(500); } printk(KERN_DEBUG "%s rc=%d, postload=%p \n", __func__, rc, sms_debug("%s rc=%d, postload=%p \n", __func__, rc, coredev->postload_handler); kfree(msg); Loading Loading @@ -612,11 +612,11 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev, rc = request_firmware(&fw, filename, coredev->device); if (rc < 0) { printk(KERN_INFO "%s failed to open \"%s\"\n", sms_info("%s failed to open \"%s\"\n", __func__, filename); return rc; } printk(KERN_INFO "%s read FW %s, size=%d\"\n", __func__, sms_info("%s read FW %s, size=%d\"\n", __func__, filename, fw->size); fw_buffer = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT), GFP_KERNEL | GFP_DMA); Loading @@ -632,7 +632,7 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev, kfree(fw_buffer); } else { printk(KERN_INFO "%s failed to allocate firmware buffer\n", sms_info("%s failed to allocate firmware buffer\n", __func__); rc = -ENOMEM; } Loading Loading @@ -680,17 +680,17 @@ void smscore_unregister_device(struct smscore_device_t *coredev) if (num_buffers == coredev->num_buffers) break; if (++retry > 10) { printk(KERN_INFO "%s exiting although " sms_info("%s exiting although " "not all buffers released.\n", __func__); break; } printk(KERN_INFO "%s waiting for %d buffer(s)\n", __func__, sms_info("%s waiting for %d buffer(s)\n", __func__, coredev->num_buffers - num_buffers); msleep(100); } printk(KERN_INFO "%s freed %d buffers\n", __func__, num_buffers); sms_info("%s freed %d buffers\n", __func__, num_buffers); if (coredev->common_buffer) dma_free_coherent(NULL, coredev->common_buffer_size, Loading @@ -702,7 +702,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev) kmutex_unlock(&g_smscore_deviceslock); printk(KERN_INFO "%s device %p destroyed\n", __func__, coredev); sms_info("%s device %p destroyed\n", __func__, coredev); } int smscore_detect_mode(struct smscore_device_t *coredev) Loading @@ -722,7 +722,7 @@ int smscore_detect_mode(struct smscore_device_t *coredev) rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength, &coredev->version_ex_done); if (rc == -ETIME) { printk(KERN_ERR "%s: MSG_SMS_GET_VERSION_EX_REQ " sms_err("%s: MSG_SMS_GET_VERSION_EX_REQ " "failed first try\n", __func__); if (wait_for_completion_timeout(&coredev->resume_done, Loading @@ -731,7 +731,7 @@ int smscore_detect_mode(struct smscore_device_t *coredev) coredev, msg, msg->msgLength, &coredev->version_ex_done); if (rc < 0) printk(KERN_ERR "%s: " sms_err("%s: " "MSG_SMS_GET_VERSION_EX_REQ failed " "second try, rc %d\n", __func__, rc); } else Loading Loading @@ -783,7 +783,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) PDEBUG("set device mode to %d\n", mode); if (coredev->device_flags & SMS_DEVICE_FAMILY2) { if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER) { printk(KERN_INFO "%s invalid mode specified %d\n", sms_info("%s invalid mode specified %d\n", __func__, mode); return -EINVAL; } Loading @@ -793,14 +793,14 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) if (!(coredev->device_flags & SMS_DEVICE_NOT_READY)) { rc = smscore_detect_mode(coredev); if (rc < 0) { printk(KERN_INFO "%s mode detect failed %d\n", sms_info("%s mode detect failed %d\n", __func__, rc); return rc; } } if (coredev->mode == mode) { printk(KERN_INFO "%s device mode %d already set\n", sms_info("%s device mode %d already set\n", __func__, mode); return 0; } Loading @@ -810,12 +810,12 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) rc = smscore_load_firmware_from_file( coredev, smscore_fw_lkup[mode][type], NULL); if (rc < 0) { printk(KERN_INFO "%s load firmware " sms_info("%s load firmware " "failed %d\n", __func__, rc); return rc; } } else printk(KERN_INFO "%s mode %d supported by running " sms_info("%s mode %d supported by running " "firmware\n", __func__, mode); buffer = kmalloc(sizeof(struct SmsMsgData_ST) + Loading @@ -835,13 +835,13 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) kfree(buffer); } else { printk(KERN_INFO "%s Could not allocate buffer for " sms_info("%s Could not allocate buffer for " "init device message.\n", __func__); rc = -ENOMEM; } } else { if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { printk(KERN_INFO "%s invalid mode specified %d\n", sms_info("%s invalid mode specified %d\n", __func__, mode); return -EINVAL; } Loading @@ -862,7 +862,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) } if (rc != 0) printk(KERN_INFO "%s return error code %d.\n", __func__, rc); sms_info("%s return error code %d.\n", __func__, rc); return rc; } Loading Loading @@ -945,7 +945,7 @@ void smscore_onresponse(struct smscore_device_t *coredev, last_sample_time = time_now; if (time_now - last_sample_time > 10000) { printk(KERN_DEBUG "\n%s data rate %d bytes/secs\n", __func__, sms_debug("\n%s data rate %d bytes/secs\n", __func__, (int)((data_total * 1000) / (time_now - last_sample_time))); Loading @@ -965,7 +965,7 @@ void smscore_onresponse(struct smscore_device_t *coredev, { struct SmsVersionRes_ST *ver = (struct SmsVersionRes_ST *) phdr; printk(KERN_DEBUG "%s: MSG_SMS_GET_VERSION_EX_RES " sms_debug("%s: MSG_SMS_GET_VERSION_EX_RES " "id %d prots 0x%x ver %d.%d\n", __func__, ver->FirmwareId, ver->SupportedProtocols, ver->RomVersionMajor, ver->RomVersionMinor); Loading @@ -978,12 +978,12 @@ void smscore_onresponse(struct smscore_device_t *coredev, break; } case MSG_SMS_INIT_DEVICE_RES: printk(KERN_DEBUG "%s: MSG_SMS_INIT_DEVICE_RES\n", sms_debug("%s: MSG_SMS_INIT_DEVICE_RES\n", __func__); complete(&coredev->init_device_done); break; case MSG_SW_RELOAD_START_RES: printk(KERN_DEBUG "%s: MSG_SW_RELOAD_START_RES\n", sms_debug("%s: MSG_SW_RELOAD_START_RES\n", __func__); complete(&coredev->reload_start_done); break; Loading @@ -991,12 +991,11 @@ void smscore_onresponse(struct smscore_device_t *coredev, complete(&coredev->data_download_done); break; case MSG_SW_RELOAD_EXEC_RES: printk(KERN_DEBUG "%s: MSG_SW_RELOAD_EXEC_RES\n", sms_debug("%s: MSG_SW_RELOAD_EXEC_RES\n", __func__); break; case MSG_SMS_SWDOWNLOAD_TRIGGER_RES: printk(KERN_DEBUG "%s: MSG_SMS_SWDOWNLOAD_TRIGGER_RES\n", sms_debug("%s: MSG_SMS_SWDOWNLOAD_TRIGGER_RES\n", __func__); complete(&coredev->trigger_done); break; Loading Loading @@ -1150,7 +1149,7 @@ void smscore_unregister_client(struct smscore_client_t *client) kfree(identry); } printk(KERN_INFO "%s %p\n", __func__, client->context); sms_info("%s %p\n", __func__, client->context); list_del(&client->entry); kfree(client); Loading @@ -1177,7 +1176,7 @@ int smsclient_sendrequest(struct smscore_client_t *client, int rc; if (client == NULL) { printk(KERN_ERR "%s Got NULL client\n", __func__); sms_err("%s Got NULL client\n", __func__); return -EINVAL; } Loading @@ -1185,7 +1184,7 @@ int smsclient_sendrequest(struct smscore_client_t *client, /* check that no other channel with same id exists */ if (coredev == NULL) { printk(KERN_ERR "%s Got NULL coredev\n", __func__); sms_err("%s Got NULL coredev\n", __func__); return -EINVAL; } Loading Loading @@ -1226,12 +1225,12 @@ int smscore_map_common_buffer(struct smscore_device_t *coredev, if (!(vma->vm_flags & (VM_READ | VM_SHARED)) || (vma->vm_flags & VM_WRITE)) { printk(KERN_INFO "%s invalid vm flags\n", __func__); sms_info("%s invalid vm flags\n", __func__); return -EINVAL; } if ((end - start) != size) { printk(KERN_INFO "%s invalid size %d expected %d\n", sms_info("%s invalid size %d expected %d\n", __func__, (int)(end - start), (int) size); return -EINVAL; } Loading @@ -1239,7 +1238,7 @@ int smscore_map_common_buffer(struct smscore_device_t *coredev, if (remap_pfn_range(vma, start, coredev->common_buffer_phys >> PAGE_SHIFT, size, pgprot_noncached(vma->vm_page_prot))) { printk(KERN_INFO "%s remap_page_range failed\n", __func__); sms_info("%s remap_page_range failed\n", __func__); return -EAGAIN; } Loading @@ -1263,7 +1262,7 @@ int smscore_module_init(void) /* DVB Register */ rc = smsdvb_register(); printk(KERN_INFO "%s, rc %d\n", __func__, rc); sms_info("%s, rc %d\n", __func__, rc); return rc; } Loading Loading @@ -1299,7 +1298,7 @@ void smscore_module_exit(void) /* Unregister USB */ smsusb_unregister(); printk(KERN_INFO "%s\n", __func__); sms_info("%s\n", __func__); } module_init(smscore_module_init); Loading
drivers/media/dvb/siano/smscoreapi.h +5 −0 Original line number Diff line number Diff line Loading @@ -414,4 +414,9 @@ void smsdvb_unregister(void); int smsusb_register(void); void smsusb_unregister(void); #define sms_err(fmt, arg...) printk(KERN_ERR fmt, ##arg) #define sms_info(fmt, arg...) printk(KERN_INFO fmt, ##arg) #define sms_debug(fmt, arg...) printk(KERN_DEBUG fmt, ##arg) #endif /* __smscoreapi_h__ */
drivers/media/dvb/siano/smsdvb.c +23 −23 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ static int smsdvb_start_feed(struct dvb_demux_feed *feed) container_of(feed->demux, struct smsdvb_client_t, demux); struct SmsMsgData_ST PidMsg; printk(KERN_DEBUG "%s add pid %d(%x)\n", __func__, sms_debug("%s add pid %d(%x)\n", __func__, feed->pid, feed->pid); PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; Loading @@ -133,7 +133,7 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed) container_of(feed->demux, struct smsdvb_client_t, demux); struct SmsMsgData_ST PidMsg; printk(KERN_DEBUG "%s remove pid %d(%x)\n", __func__, sms_debug("%s remove pid %d(%x)\n", __func__, feed->pid, feed->pid); PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; Loading Loading @@ -220,7 +220,7 @@ static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr) static int smsdvb_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *tune) { printk(KERN_DEBUG "%s\n", __func__); sms_debug("%s\n", __func__); tune->min_delay_ms = 400; tune->step_size = 250000; Loading @@ -247,7 +247,7 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe, Msg.Data[0] = fep->frequency; Msg.Data[2] = 12000000; printk(KERN_DEBUG "%s freq %d band %d\n", __func__, sms_debug("%s freq %d band %d\n", __func__, fep->frequency, fep->u.ofdm.bandwidth); switch (fep->u.ofdm.bandwidth) { Loading @@ -268,7 +268,7 @@ static int smsdvb_get_frontend(struct dvb_frontend *fe, struct smsdvb_client_t *client = container_of(fe, struct smsdvb_client_t, frontend); printk(KERN_DEBUG "%s\n", __func__); sms_debug("%s\n", __func__); /* todo: */ memcpy(fep, &client->fe_params, Loading Loading @@ -322,14 +322,14 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, return 0; if (smscore_get_device_mode(coredev) != 4) { printk(KERN_ERR "%sSMS Device mode is not set for " sms_err("%sSMS Device mode is not set for " "DVB operation.\n", __func__); return 0; } client = kzalloc(sizeof(struct smsdvb_client_t), GFP_KERNEL); if (!client) { printk(KERN_INFO "%s kmalloc() failed\n", __func__); sms_info("%s kmalloc() failed\n", __func__); return -ENOMEM; } Loading @@ -339,7 +339,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, smscore_get_board_id(coredev))->name, THIS_MODULE, device, adapter_nr); if (rc < 0) { printk(KERN_ERR "%s dvb_register_adapter() failed %d\n", sms_err("%s dvb_register_adapter() failed %d\n", __func__, rc); goto adapter_error; } Loading @@ -353,7 +353,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, rc = dvb_dmx_init(&client->demux); if (rc < 0) { printk(KERN_ERR "%s dvb_dmx_init failed %d\n\n", sms_err("%s dvb_dmx_init failed %d\n\n", __func__, rc); goto dvbdmx_error; } Loading @@ -365,7 +365,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, rc = dvb_dmxdev_init(&client->dmxdev, &client->adapter); if (rc < 0) { printk(KERN_ERR "%s dvb_dmxdev_init failed %d\n", sms_err("%s dvb_dmxdev_init failed %d\n", __func__, rc); goto dmxdev_error; } Loading @@ -376,7 +376,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, rc = dvb_register_frontend(&client->adapter, &client->frontend); if (rc < 0) { printk(KERN_ERR "%s frontend registration failed %d\n", sms_err("%s frontend registration failed %d\n", __func__, rc); goto frontend_error; } Loading @@ -389,7 +389,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, rc = smscore_register_client(coredev, ¶ms, &client->smsclient); if (rc < 0) { printk(KERN_INFO "%s smscore_register_client() failed %d\n", sms_info("%s smscore_register_client() failed %d\n", __func__, rc); goto client_error; } Loading @@ -405,7 +405,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, kmutex_unlock(&g_smsdvb_clientslock); printk(KERN_INFO "%s success\n", __func__); sms_info("%s success\n", __func__); return 0; Loading Loading @@ -435,7 +435,7 @@ int smsdvb_register(void) rc = smscore_register_hotplug(smsdvb_hotplug); printk(KERN_INFO "%s\n", __func__); sms_info("%s\n", __func__); return rc; } Loading
drivers/media/dvb/siano/smsusb.c +53 −53 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ void smsusb_onresponse(struct urb *urb) struct smsusb_device_t *dev = surb->dev; if (urb->status < 0) { printk(KERN_INFO "%s error, urb status %d, %d bytes\n", sms_info("%s error, urb status %d, %d bytes\n", __func__, urb->status, urb->actual_length); return; } Loading @@ -81,8 +81,8 @@ void smsusb_onresponse(struct urb *urb) /* sanity check */ if (((int) phdr->msgLength + surb->cb->offset) > urb->actual_length) { printk(KERN_INFO "%s: invalid " "response msglen %d offset %d " sms_info("%s: invalid response " "msglen %d offset %d " "size %d\n", __func__, phdr->msgLength, surb->cb->offset, Loading @@ -100,7 +100,7 @@ void smsusb_onresponse(struct urb *urb) smscore_onresponse(dev->coredev, surb->cb); surb->cb = NULL; } else { printk(KERN_INFO "%s invalid response " sms_info("%s invalid response " "msglen %d actual %d\n", __func__, phdr->msgLength, urb->actual_length); } Loading @@ -115,7 +115,7 @@ int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb) if (!surb->cb) { surb->cb = smscore_getbuffer(dev->coredev); if (!surb->cb) { printk(KERN_INFO "%s smscore_getbuffer(...) " sms_info("%s smscore_getbuffer(...) " "returned NULL\n", __func__); return -ENOMEM; } Loading Loading @@ -157,7 +157,7 @@ int smsusb_start_streaming(struct smsusb_device_t *dev) for (i = 0; i < MAX_URBS; i++) { rc = smsusb_submit_urb(dev, &dev->surbs[i]); if (rc < 0) { printk(KERN_INFO "%s smsusb_submit_urb(...) " sms_info("%s smsusb_submit_urb(...) " "failed\n", __func__); smsusb_stop_streaming(dev); break; Loading Loading @@ -191,14 +191,14 @@ int smsusb1_load_firmware(struct usb_device *udev, int id) int rc, dummy; if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) { printk(KERN_INFO "%s invalid firmware id specified %d\n", sms_info("%s invalid firmware id specified %d\n", __func__, id); return -EINVAL; } rc = request_firmware(&fw, smsusb1_fw_lkup[id], &udev->dev); if (rc < 0) { printk(KERN_INFO "%s failed to open \"%s\" mode %d\n", sms_info("%s failed to open \"%s\" mode %d\n", __func__, smsusb1_fw_lkup[id], id); return rc; } Loading @@ -210,12 +210,12 @@ int smsusb1_load_firmware(struct usb_device *udev, int id) rc = usb_bulk_msg(udev, usb_sndbulkpipe(udev, 2), fw_buffer, fw->size, &dummy, 1000); printk(KERN_INFO "%s: sent %d(%d) bytes, rc %d\n", sms_info("%s: sent %d(%d) bytes, rc %d\n", __func__, fw->size, dummy, rc); kfree(fw_buffer); } else { printk(KERN_INFO "failed to allocate firmware buffer\n"); sms_info("failed to allocate firmware buffer\n"); rc = -ENOMEM; } Loading @@ -233,7 +233,7 @@ void smsusb1_detectmode(void *context, int *mode) if (!product_string) { product_string = "none"; printk(KERN_ERR "%s product string not found\n", __func__); sms_err("%s product string not found\n", __func__); } else if (strstr(product_string, "DVBH")) *mode = 1; else if (strstr(product_string, "BDA")) Loading @@ -243,7 +243,7 @@ void smsusb1_detectmode(void *context, int *mode) else if (strstr(product_string, "TDMB")) *mode = 2; printk(KERN_INFO "%s: %d \"%s\"\n", __func__, *mode, product_string); sms_info("%s: %d \"%s\"\n", __func__, *mode, product_string); } int smsusb1_setmode(void *context, int mode) Loading @@ -252,7 +252,7 @@ int smsusb1_setmode(void *context, int mode) sizeof(struct SmsMsgHdr_ST), 0 }; if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { printk(KERN_INFO "%s invalid firmware id specified %d\n", sms_info("%s invalid firmware id specified %d\n", __func__, mode); return -EINVAL; } Loading @@ -274,7 +274,7 @@ void smsusb_term_device(struct usb_interface *intf) kfree(dev); printk(KERN_INFO "%s device %p destroyed\n", __func__, dev); sms_info("%s device %p destroyed\n", __func__, dev); } usb_set_intfdata(intf, NULL); Loading @@ -290,7 +290,7 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) /* create device object */ dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL); if (!dev) { printk(KERN_INFO "%s kzalloc(sizeof(struct smsusb_device_t) " sms_info("%s kzalloc(sizeof(struct smsusb_device_t) " "failed\n", __func__); return -ENOMEM; } Loading @@ -309,24 +309,24 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) params.setmode_handler = smsusb1_setmode; params.detectmode_handler = smsusb1_detectmode; params.device_type = SMS_STELLAR; printk(KERN_INFO "%s stellar device found\n", __func__); sms_info("%s stellar device found\n", __func__); break; default: switch (board->type) { case SMS_NOVA_A0: params.device_type = SMS_NOVA_A0; printk(KERN_INFO "%s nova A0 found\n", __func__); sms_info("%s nova A0 found\n", __func__); break; case SMS_NOVA_B0: params.device_type = SMS_NOVA_B0; printk(KERN_INFO "%s nova B0 found\n", __func__); sms_info("%s nova B0 found\n", __func__); break; case SMS_VEGA: params.device_type = SMS_VEGA; printk(KERN_INFO "%s Vega found\n", __func__); sms_info("%s Vega found\n", __func__); break; default: printk(KERN_ERR "%s Unspecified sms device type!\n", sms_err("%s Unspecified sms device type!\n", __func__); } Loading @@ -350,7 +350,7 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) /* register in smscore */ rc = smscore_register_device(¶ms, &dev->coredev); if (rc < 0) { printk(KERN_INFO "%s smscore_register_device(...) failed, " sms_info("%s smscore_register_device(...) failed, " "rc %d\n", __func__, rc); smsusb_term_device(intf); return rc; Loading @@ -364,10 +364,10 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) usb_init_urb(&dev->surbs[i].urb); } printk(KERN_INFO "%s smsusb_start_streaming(...).\n", __func__); sms_info("%s smsusb_start_streaming(...).\n", __func__); rc = smsusb_start_streaming(dev); if (rc < 0) { printk(KERN_INFO "%s smsusb_start_streaming(...) failed\n", sms_info("%s smsusb_start_streaming(...) failed\n", __func__); smsusb_term_device(intf); return rc; Loading @@ -375,13 +375,13 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) rc = smscore_start_device(dev->coredev); if (rc < 0) { printk(KERN_INFO "%s smscore_start_device(...) failed\n", sms_info("%s smscore_start_device(...) failed\n", __func__); smsusb_term_device(intf); return rc; } printk(KERN_INFO "%s device %p created\n", __func__, dev); sms_info("%s device %p created\n", __func__, dev); return rc; } Loading @@ -399,36 +399,36 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id) rc = usb_set_interface( udev, intf->cur_altsetting->desc.bInterfaceNumber, 0); if (rc < 0) { printk(KERN_INFO "%s usb_set_interface failed, " sms_info("%s usb_set_interface failed, " "rc %d\n", __func__, rc); return rc; } } printk(KERN_INFO "smsusb_probe %d\n", sms_info("smsusb_probe %d\n", intf->cur_altsetting->desc.bInterfaceNumber); for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) printk(KERN_INFO "endpoint %d %02x %02x %d\n", i, sms_info("endpoint %d %02x %02x %d\n", i, intf->cur_altsetting->endpoint[i].desc.bEndpointAddress, intf->cur_altsetting->endpoint[i].desc.bmAttributes, intf->cur_altsetting->endpoint[i].desc.wMaxPacketSize); if ((udev->actconfig->desc.bNumInterfaces == 2) && (intf->cur_altsetting->desc.bInterfaceNumber == 0)) { printk(KERN_INFO "rom interface 0 is not used\n"); sms_info("rom interface 0 is not used\n"); return -ENODEV; } if (intf->cur_altsetting->desc.bInterfaceNumber == 1) { snprintf(devpath, sizeof(devpath), "usb\\%d-%s", udev->bus->busnum, udev->devpath); printk(KERN_INFO "stellar device was found.\n"); sms_info("stellar device was found.\n"); return smsusb1_load_firmware( udev, smscore_registry_getmode(devpath)); } rc = smsusb_init_device(intf, id->driver_info); printk(KERN_INFO "%s rc %d\n", __func__, rc); sms_info("%s rc %d\n", __func__, rc); return rc; } Loading @@ -448,16 +448,16 @@ int smsusb_register(void) { int rc = usb_register(&smsusb_driver); if (rc) printk(KERN_INFO "usb_register failed. Error number %d\n", rc); sms_info("usb_register failed. Error number %d\n", rc); printk(KERN_INFO "%s\n", __func__); sms_info("%s\n", __func__); return rc; } void smsusb_unregister(void) { printk(KERN_DEBUG "%s\n", __func__); sms_debug("%s\n", __func__); /* Regular USB Cleanup */ usb_deregister(&smsusb_driver); } Loading