diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-19 21:07:23 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:22:48 -0400 |
commit | eb250942fe3cf2a129ab55d65161bc66b7009853 (patch) | |
tree | dd0cf00e7cd8f69b42bbc63b3ac59a3208e112d1 /drivers/media/dvb | |
parent | f14d56a99bddb779f6f7ec028bcd9d142536589e (diff) |
V4L/DVB (8296): sms1xxx: always show error messages
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.c | 21 | ||||
-rw-r--r-- | drivers/media/dvb/siano/smsdvb.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/siano/smsusb.c | 55 |
3 files changed, 37 insertions, 43 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 402ed03be424..6685c56ee0e5 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c | |||
@@ -777,7 +777,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) | |||
777 | PDEBUG("set device mode to %d", mode); | 777 | PDEBUG("set device mode to %d", mode); |
778 | if (coredev->device_flags & SMS_DEVICE_FAMILY2) { | 778 | if (coredev->device_flags & SMS_DEVICE_FAMILY2) { |
779 | if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER) { | 779 | if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER) { |
780 | sms_info("invalid mode specified %d", mode); | 780 | sms_err("invalid mode specified %d", mode); |
781 | return -EINVAL; | 781 | return -EINVAL; |
782 | } | 782 | } |
783 | 783 | ||
@@ -786,7 +786,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) | |||
786 | if (!(coredev->device_flags & SMS_DEVICE_NOT_READY)) { | 786 | if (!(coredev->device_flags & SMS_DEVICE_NOT_READY)) { |
787 | rc = smscore_detect_mode(coredev); | 787 | rc = smscore_detect_mode(coredev); |
788 | if (rc < 0) { | 788 | if (rc < 0) { |
789 | sms_info("mode detect failed %d", rc); | 789 | sms_err("mode detect failed %d", rc); |
790 | return rc; | 790 | return rc; |
791 | } | 791 | } |
792 | } | 792 | } |
@@ -801,8 +801,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) | |||
801 | rc = smscore_load_firmware_from_file( | 801 | rc = smscore_load_firmware_from_file( |
802 | coredev, smscore_fw_lkup[mode][type], NULL); | 802 | coredev, smscore_fw_lkup[mode][type], NULL); |
803 | if (rc < 0) { | 803 | if (rc < 0) { |
804 | sms_info("load firmware " | 804 | sms_err("load firmware failed %d", rc); |
805 | "failed %d", rc); | ||
806 | return rc; | 805 | return rc; |
807 | } | 806 | } |
808 | } else | 807 | } else |
@@ -826,13 +825,13 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) | |||
826 | 825 | ||
827 | kfree(buffer); | 826 | kfree(buffer); |
828 | } else { | 827 | } else { |
829 | sms_info("Could not allocate buffer for " | 828 | sms_err("Could not allocate buffer for " |
830 | "init device message."); | 829 | "init device message."); |
831 | rc = -ENOMEM; | 830 | rc = -ENOMEM; |
832 | } | 831 | } |
833 | } else { | 832 | } else { |
834 | if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { | 833 | if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { |
835 | sms_info("invalid mode specified %d", mode); | 834 | sms_err("invalid mode specified %d", mode); |
836 | return -EINVAL; | 835 | return -EINVAL; |
837 | } | 836 | } |
838 | 837 | ||
@@ -852,7 +851,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) | |||
852 | } | 851 | } |
853 | 852 | ||
854 | if (rc != 0) | 853 | if (rc != 0) |
855 | sms_info("return error code %d.", rc); | 854 | sms_err("return error code %d.", rc); |
856 | return rc; | 855 | return rc; |
857 | } | 856 | } |
858 | 857 | ||
@@ -1211,12 +1210,12 @@ int smscore_map_common_buffer(struct smscore_device_t *coredev, | |||
1211 | 1210 | ||
1212 | if (!(vma->vm_flags & (VM_READ | VM_SHARED)) || | 1211 | if (!(vma->vm_flags & (VM_READ | VM_SHARED)) || |
1213 | (vma->vm_flags & VM_WRITE)) { | 1212 | (vma->vm_flags & VM_WRITE)) { |
1214 | sms_info("invalid vm flags"); | 1213 | sms_err("invalid vm flags"); |
1215 | return -EINVAL; | 1214 | return -EINVAL; |
1216 | } | 1215 | } |
1217 | 1216 | ||
1218 | if ((end - start) != size) { | 1217 | if ((end - start) != size) { |
1219 | sms_info("invalid size %d expected %d", | 1218 | sms_err("invalid size %d expected %d", |
1220 | (int)(end - start), (int) size); | 1219 | (int)(end - start), (int) size); |
1221 | return -EINVAL; | 1220 | return -EINVAL; |
1222 | } | 1221 | } |
@@ -1224,7 +1223,7 @@ int smscore_map_common_buffer(struct smscore_device_t *coredev, | |||
1224 | if (remap_pfn_range(vma, start, | 1223 | if (remap_pfn_range(vma, start, |
1225 | coredev->common_buffer_phys >> PAGE_SHIFT, | 1224 | coredev->common_buffer_phys >> PAGE_SHIFT, |
1226 | size, pgprot_noncached(vma->vm_page_prot))) { | 1225 | size, pgprot_noncached(vma->vm_page_prot))) { |
1227 | sms_info("remap_page_range failed"); | 1226 | sms_err("remap_page_range failed"); |
1228 | return -EAGAIN; | 1227 | return -EAGAIN; |
1229 | } | 1228 | } |
1230 | 1229 | ||
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index a54e9c77edd8..f9a6ce0441f7 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c | |||
@@ -329,7 +329,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, | |||
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 | sms_info("kmalloc() failed"); | 332 | sms_err("kmalloc() failed"); |
333 | return -ENOMEM; | 333 | return -ENOMEM; |
334 | } | 334 | } |
335 | 335 | ||
@@ -385,7 +385,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, | |||
385 | 385 | ||
386 | rc = smscore_register_client(coredev, ¶ms, &client->smsclient); | 386 | rc = smscore_register_client(coredev, ¶ms, &client->smsclient); |
387 | if (rc < 0) { | 387 | if (rc < 0) { |
388 | sms_info("smscore_register_client() failed %d", rc); | 388 | sms_err("smscore_register_client() failed %d", rc); |
389 | goto client_error; | 389 | goto client_error; |
390 | } | 390 | } |
391 | 391 | ||
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index 01f5c74c41e9..221b024e9d83 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 | sms_info("error, urb status %d, %d bytes", | 63 | sms_err("error, urb status %d, %d bytes", |
64 | urb->status, urb->actual_length); | 64 | 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 | sms_info("invalid response " | 84 | sms_err("invalid response " |
85 | "msglen %d offset %d " | 85 | "msglen %d offset %d " |
86 | "size %d", | 86 | "size %d", |
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 | sms_info("invalid response " | 103 | sms_err("invalid response " |
104 | "msglen %d actual %d", | 104 | "msglen %d actual %d", |
105 | phdr->msgLength, urb->actual_length); | 105 | phdr->msgLength, urb->actual_length); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
@@ -115,8 +115,7 @@ 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 | sms_info("smscore_getbuffer(...) " | 118 | sms_err("smscore_getbuffer(...) returned NULL"); |
119 | "returned NULL"); | ||
120 | return -ENOMEM; | 119 | return -ENOMEM; |
121 | } | 120 | } |
122 | } | 121 | } |
@@ -157,8 +156,7 @@ int smsusb_start_streaming(struct smsusb_device_t *dev) | |||
157 | for (i = 0; i < MAX_URBS; i++) { | 156 | for (i = 0; i < MAX_URBS; i++) { |
158 | rc = smsusb_submit_urb(dev, &dev->surbs[i]); | 157 | rc = smsusb_submit_urb(dev, &dev->surbs[i]); |
159 | if (rc < 0) { | 158 | if (rc < 0) { |
160 | sms_info("smsusb_submit_urb(...) " | 159 | sms_err("smsusb_submit_urb(...) failed"); |
161 | "failed"); | ||
162 | smsusb_stop_streaming(dev); | 160 | smsusb_stop_streaming(dev); |
163 | break; | 161 | break; |
164 | } | 162 | } |
@@ -191,14 +189,14 @@ int smsusb1_load_firmware(struct usb_device *udev, int id) | |||
191 | int rc, dummy; | 189 | int rc, dummy; |
192 | 190 | ||
193 | if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) { | 191 | if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) { |
194 | sms_info("invalid firmware id specified %d", id); | 192 | sms_err("invalid firmware id specified %d", id); |
195 | return -EINVAL; | 193 | return -EINVAL; |
196 | } | 194 | } |
197 | 195 | ||
198 | rc = request_firmware(&fw, smsusb1_fw_lkup[id], &udev->dev); | 196 | rc = request_firmware(&fw, smsusb1_fw_lkup[id], &udev->dev); |
199 | if (rc < 0) { | 197 | if (rc < 0) { |
200 | sms_info("failed to open \"%s\" mode %d", | 198 | sms_err("failed to open \"%s\" mode %d", |
201 | smsusb1_fw_lkup[id], id); | 199 | smsusb1_fw_lkup[id], id); |
202 | return rc; | 200 | return rc; |
203 | } | 201 | } |
204 | 202 | ||
@@ -213,7 +211,7 @@ int smsusb1_load_firmware(struct usb_device *udev, int id) | |||
213 | 211 | ||
214 | kfree(fw_buffer); | 212 | kfree(fw_buffer); |
215 | } else { | 213 | } else { |
216 | sms_info("failed to allocate firmware buffer"); | 214 | sms_err("failed to allocate firmware buffer"); |
217 | rc = -ENOMEM; | 215 | rc = -ENOMEM; |
218 | } | 216 | } |
219 | 217 | ||
@@ -250,7 +248,7 @@ int smsusb1_setmode(void *context, int mode) | |||
250 | sizeof(struct SmsMsgHdr_ST), 0 }; | 248 | sizeof(struct SmsMsgHdr_ST), 0 }; |
251 | 249 | ||
252 | if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { | 250 | if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { |
253 | sms_info("invalid firmware id specified %d", mode); | 251 | sms_err("invalid firmware id specified %d", mode); |
254 | return -EINVAL; | 252 | return -EINVAL; |
255 | } | 253 | } |
256 | 254 | ||
@@ -287,8 +285,7 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) | |||
287 | /* create device object */ | 285 | /* create device object */ |
288 | dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL); | 286 | dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL); |
289 | if (!dev) { | 287 | if (!dev) { |
290 | sms_info("kzalloc(sizeof(struct smsusb_device_t) " | 288 | sms_err("kzalloc(sizeof(struct smsusb_device_t) failed"); |
291 | "failed"); | ||
292 | return -ENOMEM; | 289 | return -ENOMEM; |
293 | } | 290 | } |
294 | 291 | ||
@@ -346,8 +343,7 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) | |||
346 | /* register in smscore */ | 343 | /* register in smscore */ |
347 | rc = smscore_register_device(¶ms, &dev->coredev); | 344 | rc = smscore_register_device(¶ms, &dev->coredev); |
348 | if (rc < 0) { | 345 | if (rc < 0) { |
349 | sms_info("smscore_register_device(...) failed, " | 346 | sms_err("smscore_register_device(...) failed, rc %d", rc); |
350 | "rc %d", rc); | ||
351 | smsusb_term_device(intf); | 347 | smsusb_term_device(intf); |
352 | return rc; | 348 | return rc; |
353 | } | 349 | } |
@@ -363,14 +359,14 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) | |||
363 | sms_info("smsusb_start_streaming(...)."); | 359 | sms_info("smsusb_start_streaming(...)."); |
364 | rc = smsusb_start_streaming(dev); | 360 | rc = smsusb_start_streaming(dev); |
365 | if (rc < 0) { | 361 | if (rc < 0) { |
366 | sms_info("smsusb_start_streaming(...) failed"); | 362 | sms_err("smsusb_start_streaming(...) failed"); |
367 | smsusb_term_device(intf); | 363 | smsusb_term_device(intf); |
368 | return rc; | 364 | return rc; |
369 | } | 365 | } |
370 | 366 | ||
371 | rc = smscore_start_device(dev->coredev); | 367 | rc = smscore_start_device(dev->coredev); |
372 | if (rc < 0) { | 368 | if (rc < 0) { |
373 | sms_info("smscore_start_device(...) failed"); | 369 | sms_err("smscore_start_device(...) failed"); |
374 | smsusb_term_device(intf); | 370 | smsusb_term_device(intf); |
375 | return rc; | 371 | return rc; |
376 | } | 372 | } |
@@ -393,8 +389,7 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
393 | rc = usb_set_interface( | 389 | rc = usb_set_interface( |
394 | udev, intf->cur_altsetting->desc.bInterfaceNumber, 0); | 390 | udev, intf->cur_altsetting->desc.bInterfaceNumber, 0); |
395 | if (rc < 0) { | 391 | if (rc < 0) { |
396 | sms_info("usb_set_interface failed, " | 392 | sms_err("usb_set_interface failed, rc %d", rc); |
397 | "rc %d", rc); | ||
398 | return rc; | 393 | return rc; |
399 | } | 394 | } |
400 | } | 395 | } |
@@ -409,7 +404,7 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
409 | 404 | ||
410 | if ((udev->actconfig->desc.bNumInterfaces == 2) && | 405 | if ((udev->actconfig->desc.bNumInterfaces == 2) && |
411 | (intf->cur_altsetting->desc.bInterfaceNumber == 0)) { | 406 | (intf->cur_altsetting->desc.bInterfaceNumber == 0)) { |
412 | sms_info("rom interface 0 is not used"); | 407 | sms_err("rom interface 0 is not used"); |
413 | return -ENODEV; | 408 | return -ENODEV; |
414 | } | 409 | } |
415 | 410 | ||
@@ -442,7 +437,7 @@ int smsusb_register(void) | |||
442 | { | 437 | { |
443 | int rc = usb_register(&smsusb_driver); | 438 | int rc = usb_register(&smsusb_driver); |
444 | if (rc) | 439 | if (rc) |
445 | sms_info("usb_register failed. Error number %d", rc); | 440 | sms_err("usb_register failed. Error number %d", rc); |
446 | 441 | ||
447 | sms_debug(""); | 442 | sms_debug(""); |
448 | 443 | ||