aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-06-19 00:15:46 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:22:31 -0400
commit068d6c0f5d6c67d0e93f8e214897ddd64746be4e (patch)
tree4d0b535d1f662f08b4467e757ef3487a239fb4a9 /drivers/media/dvb
parent1c11d546b6c31399ac60f42d3103227cc1164d80 (diff)
V4L/DVB (8293): sms1xxx: create printk macros
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/siano/smscoreapi.c161
-rw-r--r--drivers/media/dvb/siano/smscoreapi.h5
-rw-r--r--drivers/media/dvb/siano/smsdvb.c46
-rw-r--r--drivers/media/dvb/siano/smsusb.c106
4 files changed, 161 insertions, 157 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c
index a5a3cbf2ffd6..a35513ef74a9 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -34,16 +34,16 @@
34#include "smscoreapi.h" 34#include "smscoreapi.h"
35 35
36#define PERROR(fmt, args...)\ 36#define PERROR(fmt, args...)\
37 printk(KERN_ERR "smscore error: line %d- %s(): " fmt, \ 37 sms_err("smscore error: line %d- %s(): " fmt, \
38 __LINE__, __func__, ## args) 38 __LINE__, __func__, ## args)
39 39
40#ifdef SMSCORE_DEBUG 40#ifdef SMSCORE_DEBUG
41#undef PWARNING 41#undef PWARNING
42# define PWARNING(fmt, args...) printk(KERN_INFO "smscore warning: " \ 42# define PWARNING(fmt, args...) sms_info("smscore warning: " \
43 "line %d- %s(): " fmt, \ 43 "line %d- %s(): " fmt, \
44 __LINE__, __func__, ## args) 44 __LINE__, __func__, ## args)
45#undef PDEBUG /* undef it, just in case */ 45#undef PDEBUG /* undef it, just in case */
46# define PDEBUG(fmt, args...) printk(KERN_INFO "smscore - %s(): " fmt, \ 46# define PDEBUG(fmt, args...) sms_info("smscore - %s(): " fmt, \
47 __func__, ## args) 47 __func__, ## args)
48#else /*SMSCORE_DEBUG*/ 48#else /*SMSCORE_DEBUG*/
49#define PDEBUG(fmt, args...) 49#define PDEBUG(fmt, args...)
@@ -157,8 +157,8 @@ static struct smscore_registry_entry_t *smscore_find_registry(char *devpath)
157 strcpy(entry->devpath, devpath); 157 strcpy(entry->devpath, devpath);
158 list_add(&entry->entry, &g_smscore_registry); 158 list_add(&entry->entry, &g_smscore_registry);
159 } else 159 } else
160 printk(KERN_ERR "%s failed to create smscore_registry.\n", 160 sms_err("%s failed to create smscore_registry.\n",
161 __func__); 161 __func__);
162 kmutex_unlock(&g_smscore_registrylock); 162 kmutex_unlock(&g_smscore_registrylock);
163 return entry; 163 return entry;
164} 164}
@@ -171,7 +171,7 @@ int smscore_registry_getmode(char *devpath)
171 if (entry) 171 if (entry)
172 return entry->mode; 172 return entry->mode;
173 else 173 else
174 printk(KERN_ERR "%s No registry found.\n", __func__); 174 sms_err("%s No registry found.\n", __func__);
175 175
176 return default_mode; 176 return default_mode;
177} 177}
@@ -184,7 +184,7 @@ enum sms_device_type_st smscore_registry_gettype(char *devpath)
184 if (entry) 184 if (entry)
185 return entry->type; 185 return entry->type;
186 else 186 else
187 printk(KERN_ERR "%s No registry found.\n", __func__); 187 sms_err("%s No registry found.\n", __func__);
188 188
189 return -1; 189 return -1;
190} 190}
@@ -197,7 +197,7 @@ void smscore_registry_setmode(char *devpath, int mode)
197 if (entry) 197 if (entry)
198 entry->mode = mode; 198 entry->mode = mode;
199 else 199 else
200 printk(KERN_ERR "%s No registry found.\n", __func__); 200 sms_err("%s No registry found.\n", __func__);
201} 201}
202 202
203void smscore_registry_settype(char *devpath, enum sms_device_type_st type) 203void smscore_registry_settype(char *devpath, enum sms_device_type_st type)
@@ -208,7 +208,7 @@ void smscore_registry_settype(char *devpath, enum sms_device_type_st type)
208 if (entry) 208 if (entry)
209 entry->type = type; 209 entry->type = type;
210 else 210 else
211 printk(KERN_ERR "%s No registry found.\n", __func__); 211 sms_err("%s No registry found.\n", __func__);
212} 212}
213 213
214 214
@@ -331,7 +331,7 @@ struct smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
331 struct smscore_buffer_t *cb = 331 struct smscore_buffer_t *cb =
332 kmalloc(sizeof(struct smscore_buffer_t), GFP_KERNEL); 332 kmalloc(sizeof(struct smscore_buffer_t), GFP_KERNEL);
333 if (!cb) { 333 if (!cb) {
334 printk(KERN_INFO "%s kmalloc(...) failed\n", __func__); 334 sms_info("%s kmalloc(...) failed\n", __func__);
335 return NULL; 335 return NULL;
336 } 336 }
337 337
@@ -360,7 +360,7 @@ int smscore_register_device(struct smsdevice_params_t *params,
360 360
361 dev = kzalloc(sizeof(struct smscore_device_t), GFP_KERNEL); 361 dev = kzalloc(sizeof(struct smscore_device_t), GFP_KERNEL);
362 if (!dev) { 362 if (!dev) {
363 printk(KERN_INFO "%s kzalloc(...) failed\n", __func__); 363 sms_info("%s kzalloc(...) failed\n", __func__);
364 return -ENOMEM; 364 return -ENOMEM;
365 } 365 }
366 366
@@ -408,8 +408,8 @@ int smscore_register_device(struct smsdevice_params_t *params,
408 smscore_putbuffer(dev, cb); 408 smscore_putbuffer(dev, cb);
409 } 409 }
410 410
411 printk(KERN_INFO "%s allocated %d buffers\n", 411 sms_info("%s allocated %d buffers\n",
412 __func__, dev->num_buffers); 412 __func__, dev->num_buffers);
413 413
414 dev->mode = DEVICE_MODE_NONE; 414 dev->mode = DEVICE_MODE_NONE;
415 dev->context = params->context; 415 dev->context = params->context;
@@ -432,7 +432,7 @@ int smscore_register_device(struct smsdevice_params_t *params,
432 432
433 *coredev = dev; 433 *coredev = dev;
434 434
435 printk(KERN_INFO "%s device %p created\n", __func__, dev); 435 sms_info("%s device %p created\n", __func__, dev);
436 436
437 return 0; 437 return 0;
438} 438}
@@ -450,8 +450,8 @@ int smscore_start_device(struct smscore_device_t *coredev)
450 int rc = smscore_set_device_mode( 450 int rc = smscore_set_device_mode(
451 coredev, smscore_registry_getmode(coredev->devpath)); 451 coredev, smscore_registry_getmode(coredev->devpath));
452 if (rc < 0) { 452 if (rc < 0) {
453 printk(KERN_INFO "%s set device mode faile , rc %d\n", 453 sms_info("%s set device mode faile , rc %d\n",
454 __func__, rc); 454 __func__, rc);
455 return rc; 455 return rc;
456 } 456 }
457 457
@@ -459,8 +459,8 @@ int smscore_start_device(struct smscore_device_t *coredev)
459 459
460 rc = smscore_notify_callbacks(coredev, coredev->device, 1); 460 rc = smscore_notify_callbacks(coredev, coredev->device, 1);
461 461
462 printk(KERN_INFO "%s device %p started, rc %d\n", 462 sms_info("%s device %p started, rc %d\n",
463 __func__, coredev, rc); 463 __func__, coredev, rc);
464 464
465 kmutex_unlock(&g_smscore_deviceslock); 465 kmutex_unlock(&g_smscore_deviceslock);
466 466
@@ -472,8 +472,8 @@ int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, void *buffer,
472{ 472{
473 int rc = coredev->sendrequest_handler(coredev->context, buffer, size); 473 int rc = coredev->sendrequest_handler(coredev->context, buffer, size);
474 if (rc < 0) { 474 if (rc < 0) {
475 printk(KERN_INFO "%s sendrequest returned error %d\n", 475 sms_info("%s sendrequest returned error %d\n",
476 __func__, rc); 476 __func__, rc);
477 return rc; 477 return rc;
478 } 478 }
479 479
@@ -491,8 +491,8 @@ int smscore_load_firmware_family2(struct smscore_device_t *coredev,
491 u8 *payload = firmware->Payload; 491 u8 *payload = firmware->Payload;
492 int rc = 0; 492 int rc = 0;
493 493
494 printk(KERN_INFO "%s loading FW to addr 0x%x size %d\n", 494 sms_info("%s loading FW to addr 0x%x size %d\n",
495 __func__, mem_address, firmware->Length); 495 __func__, mem_address, firmware->Length);
496 if (coredev->preload_handler) { 496 if (coredev->preload_handler) {
497 rc = coredev->preload_handler(coredev->context); 497 rc = coredev->preload_handler(coredev->context);
498 if (rc < 0) 498 if (rc < 0)
@@ -578,8 +578,8 @@ int smscore_load_firmware_family2(struct smscore_device_t *coredev,
578 msleep(500); 578 msleep(500);
579 } 579 }
580 580
581 printk(KERN_DEBUG "%s rc=%d, postload=%p \n", __func__, rc, 581 sms_debug("%s rc=%d, postload=%p \n", __func__, rc,
582 coredev->postload_handler); 582 coredev->postload_handler);
583 583
584 kfree(msg); 584 kfree(msg);
585 585
@@ -612,12 +612,12 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
612 612
613 rc = request_firmware(&fw, filename, coredev->device); 613 rc = request_firmware(&fw, filename, coredev->device);
614 if (rc < 0) { 614 if (rc < 0) {
615 printk(KERN_INFO "%s failed to open \"%s\"\n", 615 sms_info("%s failed to open \"%s\"\n",
616 __func__, filename); 616 __func__, filename);
617 return rc; 617 return rc;
618 } 618 }
619 printk(KERN_INFO "%s read FW %s, size=%d\"\n", __func__, 619 sms_info("%s read FW %s, size=%d\"\n", __func__,
620 filename, fw->size); 620 filename, fw->size);
621 fw_buffer = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT), 621 fw_buffer = kmalloc(ALIGN(fw->size, SMS_ALLOC_ALIGNMENT),
622 GFP_KERNEL | GFP_DMA); 622 GFP_KERNEL | GFP_DMA);
623 if (fw_buffer) { 623 if (fw_buffer) {
@@ -632,8 +632,8 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
632 632
633 kfree(fw_buffer); 633 kfree(fw_buffer);
634 } else { 634 } else {
635 printk(KERN_INFO "%s failed to allocate firmware buffer\n", 635 sms_info("%s failed to allocate firmware buffer\n",
636 __func__); 636 __func__);
637 rc = -ENOMEM; 637 rc = -ENOMEM;
638 } 638 }
639 639
@@ -680,17 +680,17 @@ void smscore_unregister_device(struct smscore_device_t *coredev)
680 if (num_buffers == coredev->num_buffers) 680 if (num_buffers == coredev->num_buffers)
681 break; 681 break;
682 if (++retry > 10) { 682 if (++retry > 10) {
683 printk(KERN_INFO "%s exiting although " 683 sms_info("%s exiting although "
684 "not all buffers released.\n", __func__); 684 "not all buffers released.\n", __func__);
685 break; 685 break;
686 } 686 }
687 687
688 printk(KERN_INFO "%s waiting for %d buffer(s)\n", __func__, 688 sms_info("%s waiting for %d buffer(s)\n", __func__,
689 coredev->num_buffers - num_buffers); 689 coredev->num_buffers - num_buffers);
690 msleep(100); 690 msleep(100);
691 } 691 }
692 692
693 printk(KERN_INFO "%s freed %d buffers\n", __func__, num_buffers); 693 sms_info("%s freed %d buffers\n", __func__, num_buffers);
694 694
695 if (coredev->common_buffer) 695 if (coredev->common_buffer)
696 dma_free_coherent(NULL, coredev->common_buffer_size, 696 dma_free_coherent(NULL, coredev->common_buffer_size,
@@ -702,7 +702,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev)
702 702
703 kmutex_unlock(&g_smscore_deviceslock); 703 kmutex_unlock(&g_smscore_deviceslock);
704 704
705 printk(KERN_INFO "%s device %p destroyed\n", __func__, coredev); 705 sms_info("%s device %p destroyed\n", __func__, coredev);
706} 706}
707 707
708int smscore_detect_mode(struct smscore_device_t *coredev) 708int smscore_detect_mode(struct smscore_device_t *coredev)
@@ -722,8 +722,8 @@ int smscore_detect_mode(struct smscore_device_t *coredev)
722 rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength, 722 rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength,
723 &coredev->version_ex_done); 723 &coredev->version_ex_done);
724 if (rc == -ETIME) { 724 if (rc == -ETIME) {
725 printk(KERN_ERR "%s: MSG_SMS_GET_VERSION_EX_REQ " 725 sms_err("%s: MSG_SMS_GET_VERSION_EX_REQ "
726 "failed first try\n", __func__); 726 "failed first try\n", __func__);
727 727
728 if (wait_for_completion_timeout(&coredev->resume_done, 728 if (wait_for_completion_timeout(&coredev->resume_done,
729 msecs_to_jiffies(5000))) { 729 msecs_to_jiffies(5000))) {
@@ -731,9 +731,9 @@ int smscore_detect_mode(struct smscore_device_t *coredev)
731 coredev, msg, msg->msgLength, 731 coredev, msg, msg->msgLength,
732 &coredev->version_ex_done); 732 &coredev->version_ex_done);
733 if (rc < 0) 733 if (rc < 0)
734 printk(KERN_ERR "%s: " 734 sms_err("%s: "
735 "MSG_SMS_GET_VERSION_EX_REQ failed " 735 "MSG_SMS_GET_VERSION_EX_REQ failed "
736 "second try, rc %d\n", __func__, rc); 736 "second try, rc %d\n", __func__, rc);
737 } else 737 } else
738 rc = -ETIME; 738 rc = -ETIME;
739 } 739 }
@@ -783,8 +783,8 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
783 PDEBUG("set device mode to %d\n", mode); 783 PDEBUG("set device mode to %d\n", mode);
784 if (coredev->device_flags & SMS_DEVICE_FAMILY2) { 784 if (coredev->device_flags & SMS_DEVICE_FAMILY2) {
785 if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER) { 785 if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER) {
786 printk(KERN_INFO "%s invalid mode specified %d\n", 786 sms_info("%s invalid mode specified %d\n",
787 __func__, mode); 787 __func__, mode);
788 return -EINVAL; 788 return -EINVAL;
789 } 789 }
790 790
@@ -793,15 +793,15 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
793 if (!(coredev->device_flags & SMS_DEVICE_NOT_READY)) { 793 if (!(coredev->device_flags & SMS_DEVICE_NOT_READY)) {
794 rc = smscore_detect_mode(coredev); 794 rc = smscore_detect_mode(coredev);
795 if (rc < 0) { 795 if (rc < 0) {
796 printk(KERN_INFO "%s mode detect failed %d\n", 796 sms_info("%s mode detect failed %d\n",
797 __func__, rc); 797 __func__, rc);
798 return rc; 798 return rc;
799 } 799 }
800 } 800 }
801 801
802 if (coredev->mode == mode) { 802 if (coredev->mode == mode) {
803 printk(KERN_INFO "%s device mode %d already set\n", 803 sms_info("%s device mode %d already set\n",
804 __func__, mode); 804 __func__, mode);
805 return 0; 805 return 0;
806 } 806 }
807 807
@@ -810,13 +810,13 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
810 rc = smscore_load_firmware_from_file( 810 rc = smscore_load_firmware_from_file(
811 coredev, smscore_fw_lkup[mode][type], NULL); 811 coredev, smscore_fw_lkup[mode][type], NULL);
812 if (rc < 0) { 812 if (rc < 0) {
813 printk(KERN_INFO "%s load firmware " 813 sms_info("%s load firmware "
814 "failed %d\n", __func__, rc); 814 "failed %d\n", __func__, rc);
815 return rc; 815 return rc;
816 } 816 }
817 } else 817 } else
818 printk(KERN_INFO "%s mode %d supported by running " 818 sms_info("%s mode %d supported by running "
819 "firmware\n", __func__, mode); 819 "firmware\n", __func__, mode);
820 820
821 buffer = kmalloc(sizeof(struct SmsMsgData_ST) + 821 buffer = kmalloc(sizeof(struct SmsMsgData_ST) +
822 SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA); 822 SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA);
@@ -835,14 +835,14 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
835 835
836 kfree(buffer); 836 kfree(buffer);
837 } else { 837 } else {
838 printk(KERN_INFO "%s Could not allocate buffer for " 838 sms_info("%s Could not allocate buffer for "
839 "init device message.\n", __func__); 839 "init device message.\n", __func__);
840 rc = -ENOMEM; 840 rc = -ENOMEM;
841 } 841 }
842 } else { 842 } else {
843 if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { 843 if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) {
844 printk(KERN_INFO "%s invalid mode specified %d\n", 844 sms_info("%s invalid mode specified %d\n",
845 __func__, mode); 845 __func__, mode);
846 return -EINVAL; 846 return -EINVAL;
847 } 847 }
848 848
@@ -862,7 +862,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
862 } 862 }
863 863
864 if (rc != 0) 864 if (rc != 0)
865 printk(KERN_INFO "%s return error code %d.\n", __func__, rc); 865 sms_info("%s return error code %d.\n", __func__, rc);
866 return rc; 866 return rc;
867} 867}
868 868
@@ -945,9 +945,9 @@ void smscore_onresponse(struct smscore_device_t *coredev,
945 last_sample_time = time_now; 945 last_sample_time = time_now;
946 946
947 if (time_now - last_sample_time > 10000) { 947 if (time_now - last_sample_time > 10000) {
948 printk(KERN_DEBUG "\n%s data rate %d bytes/secs\n", __func__, 948 sms_debug("\n%s data rate %d bytes/secs\n", __func__,
949 (int)((data_total * 1000) / 949 (int)((data_total * 1000) /
950 (time_now - last_sample_time))); 950 (time_now - last_sample_time)));
951 951
952 last_sample_time = time_now; 952 last_sample_time = time_now;
953 data_total = 0; 953 data_total = 0;
@@ -965,10 +965,10 @@ void smscore_onresponse(struct smscore_device_t *coredev,
965 { 965 {
966 struct SmsVersionRes_ST *ver = 966 struct SmsVersionRes_ST *ver =
967 (struct SmsVersionRes_ST *) phdr; 967 (struct SmsVersionRes_ST *) phdr;
968 printk(KERN_DEBUG "%s: MSG_SMS_GET_VERSION_EX_RES " 968 sms_debug("%s: MSG_SMS_GET_VERSION_EX_RES "
969 "id %d prots 0x%x ver %d.%d\n", __func__, 969 "id %d prots 0x%x ver %d.%d\n", __func__,
970 ver->FirmwareId, ver->SupportedProtocols, 970 ver->FirmwareId, ver->SupportedProtocols,
971 ver->RomVersionMajor, ver->RomVersionMinor); 971 ver->RomVersionMajor, ver->RomVersionMinor);
972 972
973 coredev->mode = ver->FirmwareId == 255 ? 973 coredev->mode = ver->FirmwareId == 255 ?
974 DEVICE_MODE_NONE : ver->FirmwareId; 974 DEVICE_MODE_NONE : ver->FirmwareId;
@@ -978,26 +978,25 @@ void smscore_onresponse(struct smscore_device_t *coredev,
978 break; 978 break;
979 } 979 }
980 case MSG_SMS_INIT_DEVICE_RES: 980 case MSG_SMS_INIT_DEVICE_RES:
981 printk(KERN_DEBUG "%s: MSG_SMS_INIT_DEVICE_RES\n", 981 sms_debug("%s: MSG_SMS_INIT_DEVICE_RES\n",
982 __func__); 982 __func__);
983 complete(&coredev->init_device_done); 983 complete(&coredev->init_device_done);
984 break; 984 break;
985 case MSG_SW_RELOAD_START_RES: 985 case MSG_SW_RELOAD_START_RES:
986 printk(KERN_DEBUG "%s: MSG_SW_RELOAD_START_RES\n", 986 sms_debug("%s: MSG_SW_RELOAD_START_RES\n",
987 __func__); 987 __func__);
988 complete(&coredev->reload_start_done); 988 complete(&coredev->reload_start_done);
989 break; 989 break;
990 case MSG_SMS_DATA_DOWNLOAD_RES: 990 case MSG_SMS_DATA_DOWNLOAD_RES:
991 complete(&coredev->data_download_done); 991 complete(&coredev->data_download_done);
992 break; 992 break;
993 case MSG_SW_RELOAD_EXEC_RES: 993 case MSG_SW_RELOAD_EXEC_RES:
994 printk(KERN_DEBUG "%s: MSG_SW_RELOAD_EXEC_RES\n", 994 sms_debug("%s: MSG_SW_RELOAD_EXEC_RES\n",
995 __func__); 995 __func__);
996 break; 996 break;
997 case MSG_SMS_SWDOWNLOAD_TRIGGER_RES: 997 case MSG_SMS_SWDOWNLOAD_TRIGGER_RES:
998 printk(KERN_DEBUG 998 sms_debug("%s: MSG_SMS_SWDOWNLOAD_TRIGGER_RES\n",
999 "%s: MSG_SMS_SWDOWNLOAD_TRIGGER_RES\n", 999 __func__);
1000 __func__);
1001 complete(&coredev->trigger_done); 1000 complete(&coredev->trigger_done);
1002 break; 1001 break;
1003 case MSG_SMS_SLEEP_RESUME_COMP_IND: 1002 case MSG_SMS_SLEEP_RESUME_COMP_IND:
@@ -1150,7 +1149,7 @@ void smscore_unregister_client(struct smscore_client_t *client)
1150 kfree(identry); 1149 kfree(identry);
1151 } 1150 }
1152 1151
1153 printk(KERN_INFO "%s %p\n", __func__, client->context); 1152 sms_info("%s %p\n", __func__, client->context);
1154 1153
1155 list_del(&client->entry); 1154 list_del(&client->entry);
1156 kfree(client); 1155 kfree(client);
@@ -1177,7 +1176,7 @@ int smsclient_sendrequest(struct smscore_client_t *client,
1177 int rc; 1176 int rc;
1178 1177
1179 if (client == NULL) { 1178 if (client == NULL) {
1180 printk(KERN_ERR "%s Got NULL client\n", __func__); 1179 sms_err("%s Got NULL client\n", __func__);
1181 return -EINVAL; 1180 return -EINVAL;
1182 } 1181 }
1183 1182
@@ -1185,7 +1184,7 @@ int smsclient_sendrequest(struct smscore_client_t *client,
1185 1184
1186 /* check that no other channel with same id exists */ 1185 /* check that no other channel with same id exists */
1187 if (coredev == NULL) { 1186 if (coredev == NULL) {
1188 printk(KERN_ERR "%s Got NULL coredev\n", __func__); 1187 sms_err("%s Got NULL coredev\n", __func__);
1189 return -EINVAL; 1188 return -EINVAL;
1190 } 1189 }
1191 1190
@@ -1226,20 +1225,20 @@ int smscore_map_common_buffer(struct smscore_device_t *coredev,
1226 1225
1227 if (!(vma->vm_flags & (VM_READ | VM_SHARED)) || 1226 if (!(vma->vm_flags & (VM_READ | VM_SHARED)) ||
1228 (vma->vm_flags & VM_WRITE)) { 1227 (vma->vm_flags & VM_WRITE)) {
1229 printk(KERN_INFO "%s invalid vm flags\n", __func__); 1228 sms_info("%s invalid vm flags\n", __func__);
1230 return -EINVAL; 1229 return -EINVAL;
1231 } 1230 }
1232 1231
1233 if ((end - start) != size) { 1232 if ((end - start) != size) {
1234 printk(KERN_INFO "%s invalid size %d expected %d\n", 1233 sms_info("%s invalid size %d expected %d\n",
1235 __func__, (int)(end - start), (int) size); 1234 __func__, (int)(end - start), (int) size);
1236 return -EINVAL; 1235 return -EINVAL;
1237 } 1236 }
1238 1237
1239 if (remap_pfn_range(vma, start, 1238 if (remap_pfn_range(vma, start,
1240 coredev->common_buffer_phys >> PAGE_SHIFT, 1239 coredev->common_buffer_phys >> PAGE_SHIFT,
1241 size, pgprot_noncached(vma->vm_page_prot))) { 1240 size, pgprot_noncached(vma->vm_page_prot))) {
1242 printk(KERN_INFO "%s remap_page_range failed\n", __func__); 1241 sms_info("%s remap_page_range failed\n", __func__);
1243 return -EAGAIN; 1242 return -EAGAIN;
1244 } 1243 }
1245 1244
@@ -1263,7 +1262,7 @@ int smscore_module_init(void)
1263 /* DVB Register */ 1262 /* DVB Register */
1264 rc = smsdvb_register(); 1263 rc = smsdvb_register();
1265 1264
1266 printk(KERN_INFO "%s, rc %d\n", __func__, rc); 1265 sms_info("%s, rc %d\n", __func__, rc);
1267 1266
1268 return rc; 1267 return rc;
1269} 1268}
@@ -1299,7 +1298,7 @@ void smscore_module_exit(void)
1299 /* Unregister USB */ 1298 /* Unregister USB */
1300 smsusb_unregister(); 1299 smsusb_unregister();
1301 1300
1302 printk(KERN_INFO "%s\n", __func__); 1301 sms_info("%s\n", __func__);
1303} 1302}
1304 1303
1305module_init(smscore_module_init); 1304module_init(smscore_module_init);
diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h
index 1962f016612b..2799ea7bb41a 100644
--- a/drivers/media/dvb/siano/smscoreapi.h
+++ b/drivers/media/dvb/siano/smscoreapi.h
@@ -414,4 +414,9 @@ void smsdvb_unregister(void);
414int smsusb_register(void); 414int smsusb_register(void);
415void smsusb_unregister(void); 415void smsusb_unregister(void);
416 416
417#define sms_err(fmt, arg...) printk(KERN_ERR fmt, ##arg)
418#define sms_info(fmt, arg...) printk(KERN_INFO fmt, ##arg)
419#define sms_debug(fmt, arg...) printk(KERN_DEBUG fmt, ##arg)
420
421
417#endif /* __smscoreapi_h__ */ 422#endif /* __smscoreapi_h__ */
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c
index 88b2bd2821dc..57ab7db56a65 100644
--- a/drivers/media/dvb/siano/smsdvb.c
+++ b/drivers/media/dvb/siano/smsdvb.c
@@ -113,8 +113,8 @@ static int smsdvb_start_feed(struct dvb_demux_feed *feed)
113 container_of(feed->demux, struct smsdvb_client_t, demux); 113 container_of(feed->demux, struct smsdvb_client_t, demux);
114 struct SmsMsgData_ST PidMsg; 114 struct SmsMsgData_ST PidMsg;
115 115
116 printk(KERN_DEBUG "%s add pid %d(%x)\n", __func__, 116 sms_debug("%s add pid %d(%x)\n", __func__,
117 feed->pid, feed->pid); 117 feed->pid, feed->pid);
118 118
119 PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 119 PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
120 PidMsg.xMsgHeader.msgDstId = HIF_TASK; 120 PidMsg.xMsgHeader.msgDstId = HIF_TASK;
@@ -133,8 +133,8 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed)
133 container_of(feed->demux, struct smsdvb_client_t, demux); 133 container_of(feed->demux, struct smsdvb_client_t, demux);
134 struct SmsMsgData_ST PidMsg; 134 struct SmsMsgData_ST PidMsg;
135 135
136 printk(KERN_DEBUG "%s remove pid %d(%x)\n", __func__, 136 sms_debug("%s remove pid %d(%x)\n", __func__,
137 feed->pid, feed->pid); 137 feed->pid, feed->pid);
138 138
139 PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; 139 PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
140 PidMsg.xMsgHeader.msgDstId = HIF_TASK; 140 PidMsg.xMsgHeader.msgDstId = HIF_TASK;
@@ -220,7 +220,7 @@ static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr)
220static int smsdvb_get_tune_settings(struct dvb_frontend *fe, 220static int smsdvb_get_tune_settings(struct dvb_frontend *fe,
221 struct dvb_frontend_tune_settings *tune) 221 struct dvb_frontend_tune_settings *tune)
222{ 222{
223 printk(KERN_DEBUG "%s\n", __func__); 223 sms_debug("%s\n", __func__);
224 224
225 tune->min_delay_ms = 400; 225 tune->min_delay_ms = 400;
226 tune->step_size = 250000; 226 tune->step_size = 250000;
@@ -247,8 +247,8 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe,
247 Msg.Data[0] = fep->frequency; 247 Msg.Data[0] = fep->frequency;
248 Msg.Data[2] = 12000000; 248 Msg.Data[2] = 12000000;
249 249
250 printk(KERN_DEBUG "%s freq %d band %d\n", __func__, 250 sms_debug("%s freq %d band %d\n", __func__,
251 fep->frequency, fep->u.ofdm.bandwidth); 251 fep->frequency, fep->u.ofdm.bandwidth);
252 252
253 switch (fep->u.ofdm.bandwidth) { 253 switch (fep->u.ofdm.bandwidth) {
254 case BANDWIDTH_8_MHZ: Msg.Data[1] = BW_8_MHZ; break; 254 case BANDWIDTH_8_MHZ: Msg.Data[1] = BW_8_MHZ; break;
@@ -268,7 +268,7 @@ static int smsdvb_get_frontend(struct dvb_frontend *fe,
268 struct smsdvb_client_t *client = 268 struct smsdvb_client_t *client =
269 container_of(fe, struct smsdvb_client_t, frontend); 269 container_of(fe, struct smsdvb_client_t, frontend);
270 270
271 printk(KERN_DEBUG "%s\n", __func__); 271 sms_debug("%s\n", __func__);
272 272
273 /* todo: */ 273 /* todo: */
274 memcpy(fep, &client->fe_params, 274 memcpy(fep, &client->fe_params,
@@ -322,14 +322,14 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
322 return 0; 322 return 0;
323 323
324 if (smscore_get_device_mode(coredev) != 4) { 324 if (smscore_get_device_mode(coredev) != 4) {
325 printk(KERN_ERR "%sSMS Device mode is not set for " 325 sms_err("%sSMS Device mode is not set for "
326 "DVB operation.\n", __func__); 326 "DVB operation.\n", __func__);
327 return 0; 327 return 0;
328 } 328 }
329 329
330 client = kzalloc(sizeof(struct smsdvb_client_t), GFP_KERNEL); 330 client = kzalloc(sizeof(struct smsdvb_client_t), GFP_KERNEL);
331 if (!client) { 331 if (!client) {
332 printk(KERN_INFO "%s kmalloc() failed\n", __func__); 332 sms_info("%s kmalloc() failed\n", __func__);
333 return -ENOMEM; 333 return -ENOMEM;
334 } 334 }
335 335
@@ -339,8 +339,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
339 smscore_get_board_id(coredev))->name, 339 smscore_get_board_id(coredev))->name,
340 THIS_MODULE, device, adapter_nr); 340 THIS_MODULE, device, adapter_nr);
341 if (rc < 0) { 341 if (rc < 0) {
342 printk(KERN_ERR "%s dvb_register_adapter() failed %d\n", 342 sms_err("%s dvb_register_adapter() failed %d\n",
343 __func__, rc); 343 __func__, rc);
344 goto adapter_error; 344 goto adapter_error;
345 } 345 }
346 346
@@ -353,8 +353,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
353 353
354 rc = dvb_dmx_init(&client->demux); 354 rc = dvb_dmx_init(&client->demux);
355 if (rc < 0) { 355 if (rc < 0) {
356 printk(KERN_ERR "%s dvb_dmx_init failed %d\n\n", 356 sms_err("%s dvb_dmx_init failed %d\n\n",
357 __func__, rc); 357 __func__, rc);
358 goto dvbdmx_error; 358 goto dvbdmx_error;
359 } 359 }
360 360
@@ -365,8 +365,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
365 365
366 rc = dvb_dmxdev_init(&client->dmxdev, &client->adapter); 366 rc = dvb_dmxdev_init(&client->dmxdev, &client->adapter);
367 if (rc < 0) { 367 if (rc < 0) {
368 printk(KERN_ERR "%s dvb_dmxdev_init failed %d\n", 368 sms_err("%s dvb_dmxdev_init failed %d\n",
369 __func__, rc); 369 __func__, rc);
370 goto dmxdev_error; 370 goto dmxdev_error;
371 } 371 }
372 372
@@ -376,8 +376,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
376 376
377 rc = dvb_register_frontend(&client->adapter, &client->frontend); 377 rc = dvb_register_frontend(&client->adapter, &client->frontend);
378 if (rc < 0) { 378 if (rc < 0) {
379 printk(KERN_ERR "%s frontend registration failed %d\n", 379 sms_err("%s frontend registration failed %d\n",
380 __func__, rc); 380 __func__, rc);
381 goto frontend_error; 381 goto frontend_error;
382 } 382 }
383 383
@@ -389,8 +389,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
389 389
390 rc = smscore_register_client(coredev, &params, &client->smsclient); 390 rc = smscore_register_client(coredev, &params, &client->smsclient);
391 if (rc < 0) { 391 if (rc < 0) {
392 printk(KERN_INFO "%s smscore_register_client() failed %d\n", 392 sms_info("%s smscore_register_client() failed %d\n",
393 __func__, rc); 393 __func__, rc);
394 goto client_error; 394 goto client_error;
395 } 395 }
396 396
@@ -405,7 +405,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
405 405
406 kmutex_unlock(&g_smsdvb_clientslock); 406 kmutex_unlock(&g_smsdvb_clientslock);
407 407
408 printk(KERN_INFO "%s success\n", __func__); 408 sms_info("%s success\n", __func__);
409 409
410 return 0; 410 return 0;
411 411
@@ -435,7 +435,7 @@ int smsdvb_register(void)
435 435
436 rc = smscore_register_hotplug(smsdvb_hotplug); 436 rc = smscore_register_hotplug(smsdvb_hotplug);
437 437
438 printk(KERN_INFO "%s\n", __func__); 438 sms_info("%s\n", __func__);
439 439
440 return rc; 440 return rc;
441} 441}
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c
index bb8a364477fb..34e60482facb 100644
--- a/drivers/media/dvb/siano/smsusb.c
+++ b/drivers/media/dvb/siano/smsusb.c
@@ -60,8 +60,8 @@ void smsusb_onresponse(struct urb *urb)
60 struct smsusb_device_t *dev = surb->dev; 60 struct smsusb_device_t *dev = surb->dev;
61 61
62 if (urb->status < 0) { 62 if (urb->status < 0) {
63 printk(KERN_INFO "%s error, urb status %d, %d bytes\n", 63 sms_info("%s error, urb status %d, %d bytes\n",
64 __func__, urb->status, urb->actual_length); 64 __func__, urb->status, urb->actual_length);
65 return; 65 return;
66 } 66 }
67 67
@@ -81,12 +81,12 @@ void smsusb_onresponse(struct urb *urb)
81 /* sanity check */ 81 /* sanity check */
82 if (((int) phdr->msgLength + 82 if (((int) phdr->msgLength +
83 surb->cb->offset) > urb->actual_length) { 83 surb->cb->offset) > urb->actual_length) {
84 printk(KERN_INFO "%s: invalid " 84 sms_info("%s: invalid response "
85 "response msglen %d offset %d " 85 "msglen %d offset %d "
86 "size %d\n", __func__, 86 "size %d\n", __func__,
87 phdr->msgLength, 87 phdr->msgLength,
88 surb->cb->offset, 88 surb->cb->offset,
89 urb->actual_length); 89 urb->actual_length);
90 goto exit_and_resubmit; 90 goto exit_and_resubmit;
91 } 91 }
92 92
@@ -100,9 +100,9 @@ void smsusb_onresponse(struct urb *urb)
100 smscore_onresponse(dev->coredev, surb->cb); 100 smscore_onresponse(dev->coredev, surb->cb);
101 surb->cb = NULL; 101 surb->cb = NULL;
102 } else { 102 } else {
103 printk(KERN_INFO "%s invalid response " 103 sms_info("%s invalid response "
104 "msglen %d actual %d\n", __func__, 104 "msglen %d actual %d\n", __func__,
105 phdr->msgLength, urb->actual_length); 105 phdr->msgLength, urb->actual_length);
106 } 106 }
107 } 107 }
108 108
@@ -115,8 +115,8 @@ int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb)
115 if (!surb->cb) { 115 if (!surb->cb) {
116 surb->cb = smscore_getbuffer(dev->coredev); 116 surb->cb = smscore_getbuffer(dev->coredev);
117 if (!surb->cb) { 117 if (!surb->cb) {
118 printk(KERN_INFO "%s smscore_getbuffer(...) " 118 sms_info("%s smscore_getbuffer(...) "
119 "returned NULL\n", __func__); 119 "returned NULL\n", __func__);
120 return -ENOMEM; 120 return -ENOMEM;
121 } 121 }
122 } 122 }
@@ -157,8 +157,8 @@ int smsusb_start_streaming(struct smsusb_device_t *dev)
157 for (i = 0; i < MAX_URBS; i++) { 157 for (i = 0; i < MAX_URBS; i++) {
158 rc = smsusb_submit_urb(dev, &dev->surbs[i]); 158 rc = smsusb_submit_urb(dev, &dev->surbs[i]);
159 if (rc < 0) { 159 if (rc < 0) {
160 printk(KERN_INFO "%s smsusb_submit_urb(...) " 160 sms_info("%s smsusb_submit_urb(...) "
161 "failed\n", __func__); 161 "failed\n", __func__);
162 smsusb_stop_streaming(dev); 162 smsusb_stop_streaming(dev);
163 break; 163 break;
164 } 164 }
@@ -191,15 +191,15 @@ int smsusb1_load_firmware(struct usb_device *udev, int id)
191 int rc, dummy; 191 int rc, dummy;
192 192
193 if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) { 193 if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) {
194 printk(KERN_INFO "%s invalid firmware id specified %d\n", 194 sms_info("%s invalid firmware id specified %d\n",
195 __func__, id); 195 __func__, id);
196 return -EINVAL; 196 return -EINVAL;
197 } 197 }
198 198
199 rc = request_firmware(&fw, smsusb1_fw_lkup[id], &udev->dev); 199 rc = request_firmware(&fw, smsusb1_fw_lkup[id], &udev->dev);
200 if (rc < 0) { 200 if (rc < 0) {
201 printk(KERN_INFO "%s failed to open \"%s\" mode %d\n", 201 sms_info("%s failed to open \"%s\" mode %d\n",
202 __func__, smsusb1_fw_lkup[id], id); 202 __func__, smsusb1_fw_lkup[id], id);
203 return rc; 203 return rc;
204 } 204 }
205 205
@@ -210,12 +210,12 @@ int smsusb1_load_firmware(struct usb_device *udev, int id)
210 rc = usb_bulk_msg(udev, usb_sndbulkpipe(udev, 2), 210 rc = usb_bulk_msg(udev, usb_sndbulkpipe(udev, 2),
211 fw_buffer, fw->size, &dummy, 1000); 211 fw_buffer, fw->size, &dummy, 1000);
212 212
213 printk(KERN_INFO "%s: sent %d(%d) bytes, rc %d\n", 213 sms_info("%s: sent %d(%d) bytes, rc %d\n",
214 __func__, fw->size, dummy, rc); 214 __func__, fw->size, dummy, rc);
215 215
216 kfree(fw_buffer); 216 kfree(fw_buffer);
217 } else { 217 } else {
218 printk(KERN_INFO "failed to allocate firmware buffer\n"); 218 sms_info("failed to allocate firmware buffer\n");
219 rc = -ENOMEM; 219 rc = -ENOMEM;
220 } 220 }
221 221
@@ -233,7 +233,7 @@ void smsusb1_detectmode(void *context, int *mode)
233 233
234 if (!product_string) { 234 if (!product_string) {
235 product_string = "none"; 235 product_string = "none";
236 printk(KERN_ERR "%s product string not found\n", __func__); 236 sms_err("%s product string not found\n", __func__);
237 } else if (strstr(product_string, "DVBH")) 237 } else if (strstr(product_string, "DVBH"))
238 *mode = 1; 238 *mode = 1;
239 else if (strstr(product_string, "BDA")) 239 else if (strstr(product_string, "BDA"))
@@ -243,7 +243,7 @@ void smsusb1_detectmode(void *context, int *mode)
243 else if (strstr(product_string, "TDMB")) 243 else if (strstr(product_string, "TDMB"))
244 *mode = 2; 244 *mode = 2;
245 245
246 printk(KERN_INFO "%s: %d \"%s\"\n", __func__, *mode, product_string); 246 sms_info("%s: %d \"%s\"\n", __func__, *mode, product_string);
247} 247}
248 248
249int smsusb1_setmode(void *context, int mode) 249int smsusb1_setmode(void *context, int mode)
@@ -252,8 +252,8 @@ int smsusb1_setmode(void *context, int mode)
252 sizeof(struct SmsMsgHdr_ST), 0 }; 252 sizeof(struct SmsMsgHdr_ST), 0 };
253 253
254 if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { 254 if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) {
255 printk(KERN_INFO "%s invalid firmware id specified %d\n", 255 sms_info("%s invalid firmware id specified %d\n",
256 __func__, mode); 256 __func__, mode);
257 return -EINVAL; 257 return -EINVAL;
258 } 258 }
259 259
@@ -274,7 +274,7 @@ void smsusb_term_device(struct usb_interface *intf)
274 274
275 kfree(dev); 275 kfree(dev);
276 276
277 printk(KERN_INFO "%s device %p destroyed\n", __func__, dev); 277 sms_info("%s device %p destroyed\n", __func__, dev);
278 } 278 }
279 279
280 usb_set_intfdata(intf, NULL); 280 usb_set_intfdata(intf, NULL);
@@ -290,8 +290,8 @@ int smsusb_init_device(struct usb_interface *intf, int board_id)
290 /* create device object */ 290 /* create device object */
291 dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL); 291 dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL);
292 if (!dev) { 292 if (!dev) {
293 printk(KERN_INFO "%s kzalloc(sizeof(struct smsusb_device_t) " 293 sms_info("%s kzalloc(sizeof(struct smsusb_device_t) "
294 "failed\n", __func__); 294 "failed\n", __func__);
295 return -ENOMEM; 295 return -ENOMEM;
296 } 296 }
297 297
@@ -309,25 +309,25 @@ int smsusb_init_device(struct usb_interface *intf, int board_id)
309 params.setmode_handler = smsusb1_setmode; 309 params.setmode_handler = smsusb1_setmode;
310 params.detectmode_handler = smsusb1_detectmode; 310 params.detectmode_handler = smsusb1_detectmode;
311 params.device_type = SMS_STELLAR; 311 params.device_type = SMS_STELLAR;
312 printk(KERN_INFO "%s stellar device found\n", __func__); 312 sms_info("%s stellar device found\n", __func__);
313 break; 313 break;
314 default: 314 default:
315 switch (board->type) { 315 switch (board->type) {
316 case SMS_NOVA_A0: 316 case SMS_NOVA_A0:
317 params.device_type = SMS_NOVA_A0; 317 params.device_type = SMS_NOVA_A0;
318 printk(KERN_INFO "%s nova A0 found\n", __func__); 318 sms_info("%s nova A0 found\n", __func__);
319 break; 319 break;
320 case SMS_NOVA_B0: 320 case SMS_NOVA_B0:
321 params.device_type = SMS_NOVA_B0; 321 params.device_type = SMS_NOVA_B0;
322 printk(KERN_INFO "%s nova B0 found\n", __func__); 322 sms_info("%s nova B0 found\n", __func__);
323 break; 323 break;
324 case SMS_VEGA: 324 case SMS_VEGA:
325 params.device_type = SMS_VEGA; 325 params.device_type = SMS_VEGA;
326 printk(KERN_INFO "%s Vega found\n", __func__); 326 sms_info("%s Vega found\n", __func__);
327 break; 327 break;
328 default: 328 default:
329 printk(KERN_ERR "%s Unspecified sms device type!\n", 329 sms_err("%s Unspecified sms device type!\n",
330 __func__); 330 __func__);
331 } 331 }
332 332
333 dev->buffer_size = USB2_BUFFER_SIZE; 333 dev->buffer_size = USB2_BUFFER_SIZE;
@@ -350,8 +350,8 @@ int smsusb_init_device(struct usb_interface *intf, int board_id)
350 /* register in smscore */ 350 /* register in smscore */
351 rc = smscore_register_device(&params, &dev->coredev); 351 rc = smscore_register_device(&params, &dev->coredev);
352 if (rc < 0) { 352 if (rc < 0) {
353 printk(KERN_INFO "%s smscore_register_device(...) failed, " 353 sms_info("%s smscore_register_device(...) failed, "
354 "rc %d\n", __func__, rc); 354 "rc %d\n", __func__, rc);
355 smsusb_term_device(intf); 355 smsusb_term_device(intf);
356 return rc; 356 return rc;
357 } 357 }
@@ -364,24 +364,24 @@ int smsusb_init_device(struct usb_interface *intf, int board_id)
364 usb_init_urb(&dev->surbs[i].urb); 364 usb_init_urb(&dev->surbs[i].urb);
365 } 365 }
366 366
367 printk(KERN_INFO "%s smsusb_start_streaming(...).\n", __func__); 367 sms_info("%s smsusb_start_streaming(...).\n", __func__);
368 rc = smsusb_start_streaming(dev); 368 rc = smsusb_start_streaming(dev);
369 if (rc < 0) { 369 if (rc < 0) {
370 printk(KERN_INFO "%s smsusb_start_streaming(...) failed\n", 370 sms_info("%s smsusb_start_streaming(...) failed\n",
371 __func__); 371 __func__);
372 smsusb_term_device(intf); 372 smsusb_term_device(intf);
373 return rc; 373 return rc;
374 } 374 }
375 375
376 rc = smscore_start_device(dev->coredev); 376 rc = smscore_start_device(dev->coredev);
377 if (rc < 0) { 377 if (rc < 0) {
378 printk(KERN_INFO "%s smscore_start_device(...) failed\n", 378 sms_info("%s smscore_start_device(...) failed\n",
379 __func__); 379 __func__);
380 smsusb_term_device(intf); 380 smsusb_term_device(intf);
381 return rc; 381 return rc;
382 } 382 }
383 383
384 printk(KERN_INFO "%s device %p created\n", __func__, dev); 384 sms_info("%s device %p created\n", __func__, dev);
385 385
386 return rc; 386 return rc;
387} 387}
@@ -399,36 +399,36 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
399 rc = usb_set_interface( 399 rc = usb_set_interface(
400 udev, intf->cur_altsetting->desc.bInterfaceNumber, 0); 400 udev, intf->cur_altsetting->desc.bInterfaceNumber, 0);
401 if (rc < 0) { 401 if (rc < 0) {
402 printk(KERN_INFO "%s usb_set_interface failed, " 402 sms_info("%s usb_set_interface failed, "
403 "rc %d\n", __func__, rc); 403 "rc %d\n", __func__, rc);
404 return rc; 404 return rc;
405 } 405 }
406 } 406 }
407 407
408 printk(KERN_INFO "smsusb_probe %d\n", 408 sms_info("smsusb_probe %d\n",
409 intf->cur_altsetting->desc.bInterfaceNumber); 409 intf->cur_altsetting->desc.bInterfaceNumber);
410 for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) 410 for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++)
411 printk(KERN_INFO "endpoint %d %02x %02x %d\n", i, 411 sms_info("endpoint %d %02x %02x %d\n", i,
412 intf->cur_altsetting->endpoint[i].desc.bEndpointAddress, 412 intf->cur_altsetting->endpoint[i].desc.bEndpointAddress,
413 intf->cur_altsetting->endpoint[i].desc.bmAttributes, 413 intf->cur_altsetting->endpoint[i].desc.bmAttributes,
414 intf->cur_altsetting->endpoint[i].desc.wMaxPacketSize); 414 intf->cur_altsetting->endpoint[i].desc.wMaxPacketSize);
415 415
416 if ((udev->actconfig->desc.bNumInterfaces == 2) && 416 if ((udev->actconfig->desc.bNumInterfaces == 2) &&
417 (intf->cur_altsetting->desc.bInterfaceNumber == 0)) { 417 (intf->cur_altsetting->desc.bInterfaceNumber == 0)) {
418 printk(KERN_INFO "rom interface 0 is not used\n"); 418 sms_info("rom interface 0 is not used\n");
419 return -ENODEV; 419 return -ENODEV;
420 } 420 }
421 421
422 if (intf->cur_altsetting->desc.bInterfaceNumber == 1) { 422 if (intf->cur_altsetting->desc.bInterfaceNumber == 1) {
423 snprintf(devpath, sizeof(devpath), "usb\\%d-%s", 423 snprintf(devpath, sizeof(devpath), "usb\\%d-%s",
424 udev->bus->busnum, udev->devpath); 424 udev->bus->busnum, udev->devpath);
425 printk(KERN_INFO "stellar device was found.\n"); 425 sms_info("stellar device was found.\n");
426 return smsusb1_load_firmware( 426 return smsusb1_load_firmware(
427 udev, smscore_registry_getmode(devpath)); 427 udev, smscore_registry_getmode(devpath));
428 } 428 }
429 429
430 rc = smsusb_init_device(intf, id->driver_info); 430 rc = smsusb_init_device(intf, id->driver_info);
431 printk(KERN_INFO "%s rc %d\n", __func__, rc); 431 sms_info("%s rc %d\n", __func__, rc);
432 return rc; 432 return rc;
433} 433}
434 434
@@ -448,16 +448,16 @@ int smsusb_register(void)
448{ 448{
449 int rc = usb_register(&smsusb_driver); 449 int rc = usb_register(&smsusb_driver);
450 if (rc) 450 if (rc)
451 printk(KERN_INFO "usb_register failed. Error number %d\n", rc); 451 sms_info("usb_register failed. Error number %d\n", rc);
452 452
453 printk(KERN_INFO "%s\n", __func__); 453 sms_info("%s\n", __func__);
454 454
455 return rc; 455 return rc;
456} 456}
457 457
458void smsusb_unregister(void) 458void smsusb_unregister(void)
459{ 459{
460 printk(KERN_DEBUG "%s\n", __func__); 460 sms_debug("%s\n", __func__);
461 /* Regular USB Cleanup */ 461 /* Regular USB Cleanup */
462 usb_deregister(&smsusb_driver); 462 usb_deregister(&smsusb_driver);
463} 463}