smscore_buffer_t *cb = kmalloc(sizeof(smscore_buffer_t), GFP_KERNEL);
if (!cb)
{
- printk(KERN_INFO "%s kmalloc(...) failed\n", __FUNCTION__);
+ printk(KERN_INFO "%s kmalloc(...) failed\n", __func__);
return NULL;
}
dev = kzalloc(sizeof(smscore_device_t), GFP_KERNEL);
if (!dev)
{
- printk(KERN_INFO "%s kzalloc(...) failed\n", __FUNCTION__);
+ printk(KERN_INFO "%s kzalloc(...) failed\n", __func__);
return -ENOMEM;
}
smscore_putbuffer(dev, cb);
}
- printk(KERN_INFO "%s allocated %d buffers\n", __FUNCTION__, dev->num_buffers);
+ printk(KERN_INFO "%s allocated %d buffers\n", __func__, dev->num_buffers);
dev->mode = DEVICE_MODE_NONE;
dev->context = params->context;
*coredev = dev;
- printk(KERN_INFO "%s device %p created\n", __FUNCTION__, dev);
+ printk(KERN_INFO "%s device %p created\n", __func__, dev);
return 0;
}
rc = smscore_notify_callbacks(coredev, coredev->device, 1);
- printk(KERN_INFO "%s device %p started, rc %d\n", __FUNCTION__, coredev, rc);
+ printk(KERN_INFO "%s device %p started, rc %d\n", __func__, coredev, rc);
kmutex_unlock(&g_smscore_deviceslock);
rc = request_firmware(&fw, filename, coredev->device);
if (rc < 0)
{
- printk(KERN_INFO "%s failed to open \"%s\"\n", __FUNCTION__, filename);
+ printk(KERN_INFO "%s failed to open \"%s\"\n", __func__, filename);
return rc;
}
}
else
{
- printk(KERN_INFO "%s failed to allocate firmware buffer\n", __FUNCTION__);
+ printk(KERN_INFO "%s failed to allocate firmware buffer\n", __func__);
rc = -ENOMEM;
}
if (num_buffers == coredev->num_buffers)
break;
- printk(KERN_INFO "%s waiting for %d buffer(s)\n", __FUNCTION__, coredev->num_buffers - num_buffers);
+ printk(KERN_INFO "%s waiting for %d buffer(s)\n", __func__, coredev->num_buffers - num_buffers);
msleep(100);
}
- printk(KERN_INFO "%s freed %d buffers\n", __FUNCTION__, num_buffers);
+ printk(KERN_INFO "%s freed %d buffers\n", __func__, num_buffers);
if (coredev->common_buffer)
dma_free_coherent(NULL, coredev->common_buffer_size, coredev->common_buffer, coredev->common_buffer_phys);
kmutex_unlock(&g_smscore_deviceslock);
- printk(KERN_INFO "%s device %p destroyed\n", __FUNCTION__, coredev);
+ printk(KERN_INFO "%s device %p destroyed\n", __func__, coredev);
}
int smscore_detect_mode(smscore_device_t *coredev)
rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength, &coredev->version_ex_done);
if (rc == -ETIME)
{
- printk("%s: MSG_SMS_GET_VERSION_EX_REQ failed first try\n", __FUNCTION__);
+ printk("%s: MSG_SMS_GET_VERSION_EX_REQ failed first try\n", __func__);
if (wait_for_completion_timeout(&coredev->resume_done, msecs_to_jiffies(5000)))
{
rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength, &coredev->version_ex_done);
if (rc < 0)
{
- printk("%s: MSG_SMS_GET_VERSION_EX_REQ failed second try, rc %d\n", __FUNCTION__, rc);
+ printk("%s: MSG_SMS_GET_VERSION_EX_REQ failed second try, rc %d\n", __func__, rc);
}
}
else
{
if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER)
{
- printk(KERN_INFO "%s invalid mode specified %d\n", __FUNCTION__, mode);
+ printk(KERN_INFO "%s invalid mode specified %d\n", __func__, mode);
return -EINVAL;
}
if (coredev->mode == mode)
{
- printk(KERN_INFO "%s device mode %d already set\n", __FUNCTION__, mode);
+ printk(KERN_INFO "%s device mode %d already set\n", __func__, mode);
return 0;
}
}
else
{
- printk(KERN_INFO "%s mode %d supported by running firmware\n", __FUNCTION__, mode);
+ printk(KERN_INFO "%s mode %d supported by running firmware\n", __func__, mode);
}
buffer = kmalloc(sizeof(SmsMsgData_ST) + SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA);
case MSG_SMS_GET_VERSION_EX_RES:
{
SmsVersionRes_ST *ver = (SmsVersionRes_ST*) phdr;
- printk("%s: MSG_SMS_GET_VERSION_EX_RES id %d prots 0x%x ver %d.%d\n", __FUNCTION__, ver->FirmwareId, ver->SupportedProtocols, ver->RomVersionMajor, ver->RomVersionMinor);
+ printk("%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);
coredev->mode = ver->FirmwareId == 255 ? DEVICE_MODE_NONE : ver->FirmwareId;
coredev->modes_supported = ver->SupportedProtocols;
}
case MSG_SMS_INIT_DEVICE_RES:
- printk("%s: MSG_SMS_INIT_DEVICE_RES\n", __FUNCTION__);
+ printk("%s: MSG_SMS_INIT_DEVICE_RES\n", __func__);
complete(&coredev->init_device_done);
break;
case MSG_SW_RELOAD_START_RES:
- printk("%s: MSG_SW_RELOAD_START_RES\n", __FUNCTION__);
+ printk("%s: MSG_SW_RELOAD_START_RES\n", __func__);
complete(&coredev->reload_start_done);
break;
break;
case MSG_SW_RELOAD_EXEC_RES:
- printk("%s: MSG_SW_RELOAD_EXEC_RES\n", __FUNCTION__);
+ printk("%s: MSG_SW_RELOAD_EXEC_RES\n", __func__);
break;
case MSG_SMS_SWDOWNLOAD_TRIGGER_RES:
- printk("%s: MSG_SMS_SWDOWNLOAD_TRIGGER_RES\n", __FUNCTION__);
+ printk("%s: MSG_SMS_SWDOWNLOAD_TRIGGER_RES\n", __func__);
complete(&coredev->trigger_done);
break;
break;
default:
- printk(KERN_INFO "%s no client (%p) or error (%d), type:%d dstid:%d\n", __FUNCTION__, client, rc, phdr->msgType, phdr->msgDstId);
+ printk(KERN_INFO "%s no client (%p) or error (%d), type:%d dstid:%d\n", __func__, client, rc, phdr->msgType, phdr->msgDstId);
}
smscore_putbuffer(coredev, cb);
*client = newclient;
- printk(KERN_INFO "%s %p %d %d\n", __FUNCTION__, params->context, params->data_type, params->initial_id);
+ printk(KERN_INFO "%s %p %d %d\n", __func__, params->context, params->data_type, params->initial_id);
return 0;
}
}
}
- printk(KERN_INFO "%s %p %d\n", __FUNCTION__, client->context, client->data_type);
+ printk(KERN_INFO "%s %p %d\n", __func__, client->context, client->data_type);
list_del(&client->entry);
kfree(client);
if (!(vma->vm_flags & (VM_READ | VM_SHARED)) || (vma->vm_flags & VM_WRITE))
{
- printk(KERN_INFO "%s invalid vm flags\n", __FUNCTION__);
+ printk(KERN_INFO "%s invalid vm flags\n", __func__);
return -EINVAL;
}
if ((end - start) != size)
{
- printk(KERN_INFO "%s invalid size %d expected %d\n", __FUNCTION__, (int)(end - start), (int) size);
+ printk(KERN_INFO "%s invalid size %d expected %d\n", __func__, (int)(end - start), (int) size);
return -EINVAL;
}
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", __FUNCTION__);
+ printk(KERN_INFO "%s remap_page_range failed\n", __func__);
return -EAGAIN;
}
/* DVB Register */
rc = smsdvb_register();
- printk(KERN_INFO "%s, rc %d\n", __FUNCTION__, rc);
+ printk(KERN_INFO "%s, rc %d\n", __func__, rc);
return rc;
}
/* Unregister USB */
smsusb_unregister();
- printk(KERN_INFO "%s\n", __FUNCTION__);
+ printk(KERN_INFO "%s\n", __func__);
}
module_init(smscore_module_init);
smsdvb_client_t *client = container_of(feed->demux, smsdvb_client_t, demux);
SmsMsgData_ST PidMsg;
- printk("%s add pid %d(%x)\n", __FUNCTION__, feed->pid, feed->pid);
+ printk("%s add pid %d(%x)\n", __func__, feed->pid, feed->pid);
PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
PidMsg.xMsgHeader.msgDstId = HIF_TASK;
smsdvb_client_t *client = container_of(feed->demux, smsdvb_client_t, demux);
SmsMsgData_ST PidMsg;
- printk("%s remove pid %d(%x)\n", __FUNCTION__, feed->pid, feed->pid);
+ printk("%s remove pid %d(%x)\n", __func__, feed->pid, feed->pid);
PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
PidMsg.xMsgHeader.msgDstId = HIF_TASK;
static int smsdvb_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *tune)
{
- printk("%s\n", __FUNCTION__);
+ printk("%s\n", __func__);
tune->min_delay_ms = 400;
tune->step_size = 250000;
Msg.Data[0] = fep->frequency;
Msg.Data[2] = 12000000;
- printk("%s freq %d band %d\n", __FUNCTION__, fep->frequency, fep->u.ofdm.bandwidth);
+ printk("%s freq %d band %d\n", __func__, fep->frequency, fep->u.ofdm.bandwidth);
switch(fep->u.ofdm.bandwidth)
{
{
smsdvb_client_t *client = container_of(fe, smsdvb_client_t, frontend);
- printk("%s\n", __FUNCTION__);
+ printk("%s\n", __func__);
// todo:
memcpy(fep, &client->fe_params, sizeof(struct dvb_frontend_parameters));
client = kzalloc(sizeof(smsdvb_client_t), GFP_KERNEL);
if (!client)
{
- printk(KERN_INFO "%s kmalloc() failed\n", __FUNCTION__);
+ printk(KERN_INFO "%s kmalloc() failed\n", __func__);
return -ENOMEM;
}
rc = dvb_dmx_init(&client->demux);
if (rc < 0)
{
- printk("%s dvb_dmx_init failed %d\n\n", __FUNCTION__, rc);
+ printk("%s dvb_dmx_init failed %d\n\n", __func__, rc);
goto dvbdmx_error;
}
rc = dvb_dmxdev_init(&client->dmxdev, &client->adapter);
if (rc < 0)
{
- printk("%s dvb_dmxdev_init failed %d\n", __FUNCTION__, rc);
+ printk("%s dvb_dmxdev_init failed %d\n", __func__, rc);
goto dmxdev_error;
}
rc = dvb_register_frontend(&client->adapter, &client->frontend);
if (rc < 0)
{
- printk("%s frontend registration failed %d\n", __FUNCTION__, rc);
+ printk("%s frontend registration failed %d\n", __func__, rc);
goto frontend_error;
}
rc = smscore_register_client(coredev, ¶ms, &client->smsclient);
if (rc < 0)
{
- printk(KERN_INFO "%s smscore_register_client() failed %d\n", __FUNCTION__, rc);
+ printk(KERN_INFO "%s smscore_register_client() failed %d\n", __func__, rc);
goto client_error;
}
kmutex_unlock(&g_smsdvb_clientslock);
- printk(KERN_INFO "%s success\n", __FUNCTION__);
+ printk(KERN_INFO "%s success\n", __func__);
return 0;
rc = smscore_register_hotplug(smsdvb_hotplug);
- printk(KERN_INFO "%s\n", __FUNCTION__);
+ printk(KERN_INFO "%s\n", __func__);
return rc;
}
if (urb->status < 0)
{
- printk(KERN_INFO "%s error, urb status %d, %d bytes\n", __FUNCTION__, urb->status, urb->actual_length);
+ printk(KERN_INFO "%s error, urb status %d, %d bytes\n", __func__, urb->status, urb->actual_length);
return;
}
// sanity check
if (((int) phdr->msgLength + surb->cb->offset) > urb->actual_length)
{
- printk("%s: invalid response msglen %d offset %d size %d\n", __FUNCTION__, phdr->msgLength, surb->cb->offset, urb->actual_length);
+ printk("%s: invalid response msglen %d offset %d size %d\n", __func__, phdr->msgLength, surb->cb->offset, urb->actual_length);
goto exit_and_resubmit;
}
}
else
{
- printk("%s invalid response msglen %d actual %d\n", __FUNCTION__, phdr->msgLength, urb->actual_length);
+ printk("%s invalid response msglen %d actual %d\n", __func__, phdr->msgLength, urb->actual_length);
}
}
surb->cb = smscore_getbuffer(dev->coredev);
if (!surb->cb)
{
- printk(KERN_INFO "%s smscore_getbuffer(...) returned NULL\n", __FUNCTION__);
+ printk(KERN_INFO "%s smscore_getbuffer(...) returned NULL\n", __func__);
return -ENOMEM;
}
}
rc = smsusb_submit_urb(dev, &dev->surbs[i]);
if (rc < 0)
{
- printk(KERN_INFO "%s smsusb_submit_urb(...) failed\n", __FUNCTION__);
+ printk(KERN_INFO "%s smsusb_submit_urb(...) failed\n", __func__);
smsusb_stop_streaming(dev);
break;
}
if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA)
{
- printk(KERN_INFO "%s invalid firmware id specified %d\n", __FUNCTION__, id);
+ printk(KERN_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", __FUNCTION__, smsusb1_fw_lkup[id], id);
+ printk(KERN_INFO "%s failed to open \"%s\" mode %d\n", __func__, smsusb1_fw_lkup[id], id);
return rc;
}
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", __FUNCTION__, fw->size, dummy, rc);
+ printk(KERN_INFO "%s: sent %d(%d) bytes, rc %d\n", __func__, fw->size, dummy, rc);
kfree(fw_buffer);
}
if (!product_string)
{
product_string = "none";
- printk("%s product string not found\n", __FUNCTION__);
+ printk("%s product string not found\n", __func__);
}
else
{
*mode = 2;
}
- printk("%s: %d \"%s\"\n", __FUNCTION__, *mode, product_string);
+ printk("%s: %d \"%s\"\n", __func__, *mode, product_string);
}
int smsusb1_setmode(void *context, int mode)
if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA)
{
- printk(KERN_INFO "%s invalid firmware id specified %d\n", __FUNCTION__, mode);
+ printk(KERN_INFO "%s invalid firmware id specified %d\n", __func__, mode);
return -EINVAL;
}
kfree(dev);
- printk(KERN_INFO "%s device %p destroyed\n", __FUNCTION__, dev);
+ printk(KERN_INFO "%s device %p destroyed\n", __func__, dev);
}
usb_set_intfdata(intf, NULL);
dev = kzalloc(sizeof(smsusb_device_t), GFP_KERNEL);
if (!dev)
{
- printk(KERN_INFO "%s kzalloc(sizeof(smsusb_device_t) failed\n", __FUNCTION__);
+ printk(KERN_INFO "%s kzalloc(sizeof(smsusb_device_t) failed\n", __func__);
return -ENOMEM;
}
rc = smscore_register_device(¶ms, &dev->coredev);
if (rc < 0)
{
- printk(KERN_INFO "%s smscore_register_device(...) failed, rc %d\n", __FUNCTION__, rc);
+ printk(KERN_INFO "%s smscore_register_device(...) failed, rc %d\n", __func__, rc);
smsusb_term_device(intf);
return rc;
}
rc = smsusb_start_streaming(dev);
if (rc < 0)
{
- printk(KERN_INFO "%s smsusb_start_streaming(...) failed\n", __FUNCTION__);
+ printk(KERN_INFO "%s smsusb_start_streaming(...) failed\n", __func__);
smsusb_term_device(intf);
return rc;
}
rc = smscore_start_device(dev->coredev);
if (rc < 0)
{
- printk(KERN_INFO "%s smscore_start_device(...) failed\n", __FUNCTION__);
+ printk(KERN_INFO "%s smscore_start_device(...) failed\n", __func__);
smsusb_term_device(intf);
return rc;
}
- printk(KERN_INFO "%s device %p created\n", __FUNCTION__, dev);
+ printk(KERN_INFO "%s device %p created\n", __func__, dev);
return rc;
}
rc = usb_set_interface(udev, intf->cur_altsetting->desc.bInterfaceNumber, 0);
if (rc < 0)
{
- printk(KERN_INFO "%s usb_set_interface failed, rc %d\n", __FUNCTION__, rc);
+ printk(KERN_INFO "%s usb_set_interface failed, rc %d\n", __func__, rc);
return rc;
}
}
if (rc)
printk(KERN_INFO "usb_register failed. Error number %d\n", rc);
- printk(KERN_INFO "%s\n", __FUNCTION__);
+ printk(KERN_INFO "%s\n", __func__);
return rc;
}
{
/* Regular USB Cleanup */
usb_deregister(&smsusb_driver);
- printk(KERN_INFO "%s\n", __FUNCTION__);
+ printk(KERN_INFO "%s\n", __func__);
}