aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorUri Shkolnik <uris@siano-ms.com>2008-08-30 23:44:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:00 -0400
commite0f14c2574ded46b9ec8a1518922d07bc4001c18 (patch)
tree343c600948612f869dab3c0fb1ccf58bd6c3a3d7 /drivers/media/dvb
parent841a3f0de9a55682d33aa8bf770ff4f7cbb7e5da (diff)
V4L/DVB (10750): import changes from Siano
Import the following changes from Uri Shkolnik * Two-ways merge with Siano internal repository * Continuing with DVB sub-system separation * kconfig and makefile updates * Code cleanup This is a work-in-progress sync with Siano's internal repository. Some changes had to be altered or dropped in order not to break the build. This breaks normal operation for the current driver, but it is being committed now for tracking purposes. These changes introduce the following checkpatch.pl violations: ERROR: do not use C99 // comments 156: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1373: +//#ifdef DVB_CORE ERROR: do not use C99 // comments 157: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1374: +// smsdvb_unregister(); ERROR: do not use C99 // comments 158: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1375: +//#endif WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 163: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1380: +EXPORT_SYMBOL(smscore_onresponse); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 164: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1381: +EXPORT_SYMBOL(sms_get_board); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 165: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1382: +EXPORT_SYMBOL(sms_debug); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 166: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1383: +EXPORT_SYMBOL(smscore_putbuffer); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 167: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1384: +EXPORT_SYMBOL(smscore_registry_getmode); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 168: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1385: +EXPORT_SYMBOL(smscore_register_device); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 169: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1386: +EXPORT_SYMBOL(smscore_set_board_id); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 170: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1387: +EXPORT_SYMBOL(smscore_start_device); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 171: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1388: +EXPORT_SYMBOL(smsusb_id_table); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 172: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1389: +EXPORT_SYMBOL(smscore_unregister_device); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 173: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1390: +EXPORT_SYMBOL(smscore_getbuffer); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 174: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1391: +EXPORT_SYMBOL(smscore_get_device_mode); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 175: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1392: +EXPORT_SYMBOL(smscore_register_client); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 176: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1393: +EXPORT_SYMBOL(smscore_unregister_hotplug); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 177: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1394: +EXPORT_SYMBOL(smsclient_sendrequest); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 178: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1395: +EXPORT_SYMBOL(smscore_unregister_client); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 179: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1396: +EXPORT_SYMBOL(smscore_get_board_id); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable 180: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:1397: +EXPORT_SYMBOL(smscore_register_hotplug); WARNING: line over 80 characters 391: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:398: +extern int smscore_get_fw_filename(struct smscore_device_t *coredev, int mode, char* filename); ERROR: "foo* bar" should be "foo *bar" 391: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:398: +extern int smscore_get_fw_filename(struct smscore_device_t *coredev, int mode, char* filename); WARNING: line over 80 characters 392: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:399: +extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size); ERROR: "foo* bar" should be "foo *bar" 392: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:399: +extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size); ERROR: space required after that ',' (ctx:VxV) 392: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:399: +extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size); ^ WARNING: __func__ should be used instead of gcc specific __FUNCTION__ 489: FILE: linux/drivers/media/dvb/siano/smsusb.c:443: + printk(KERN_INFO"%s Entering status %d.\n", __FUNCTION__, msg.event); WARNING: __func__ should be used instead of gcc specific __FUNCTION__ 501: FILE: linux/drivers/media/dvb/siano/smsusb.c:455: + printk(KERN_INFO "%s Entering.\n", __FUNCTION__); ERROR: space prohibited before that '++' (ctx:WxB) 505: FILE: linux/drivers/media/dvb/siano/smsusb.c:459: + for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i ++) ^ WARNING: __func__ should be used instead of gcc specific __FUNCTION__ 517: FILE: linux/drivers/media/dvb/siano/smsusb.c:471: + __FUNCTION__, rc); total: 7 errors, 23 warnings, 524 lines checked Signed-off-by: Uri Shkolnik <uris@siano-ms.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/siano/Makefile4
-rw-r--r--drivers/media/dvb/siano/smscoreapi.c46
-rw-r--r--drivers/media/dvb/siano/smscoreapi.h14
-rw-r--r--drivers/media/dvb/siano/smsdvb.c17
-rw-r--r--drivers/media/dvb/siano/smsusb.c10
5 files changed, 62 insertions, 29 deletions
diff --git a/drivers/media/dvb/siano/Makefile b/drivers/media/dvb/siano/Makefile
index ee0737af98c0..bcf93f4828b2 100644
--- a/drivers/media/dvb/siano/Makefile
+++ b/drivers/media/dvb/siano/Makefile
@@ -1,6 +1,8 @@
1sms1xxx-objs := smscoreapi.o smsusb.o smsdvb.o sms-cards.o 1sms1xxx-objs := smscoreapi.o sms-cards.o
2 2
3obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o 3obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o
4obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o
5obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsdvb.o
4 6
5EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core 7EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
6 8
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c
index cf613f22fb8d..6b33acd861da 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * This file contains implementation for the interface to sms core component 4 * This file contains implementation for the interface to sms core component
5 * 5 *
6 * author: Anatoly Greenblat 6 * author: Uri Shkolnik
7 * 7 *
8 * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. 8 * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc.
9 * 9 *
@@ -732,7 +732,7 @@ static char *smscore_fw_lkup[][SMS_NUM_OF_DEVICE_TYPES] = {
732 /*DVBH*/ 732 /*DVBH*/
733 {"none", "dvb_nova_12mhz.inp", "dvb_nova_12mhz_b0.inp", "none"}, 733 {"none", "dvb_nova_12mhz.inp", "dvb_nova_12mhz_b0.inp", "none"},
734 /*TDMB*/ 734 /*TDMB*/
735 {"none", "tdmb_nova_12mhz.inp", "none", "none"}, 735 {"none", "tdmb_nova_12mhz.inp", "tdmb_nova_12mhz_b0.inp", "none"},
736 /*DABIP*/ 736 /*DABIP*/
737 {"none", "none", "none", "none"}, 737 {"none", "none", "none", "none"},
738 /*BDA*/ 738 /*BDA*/
@@ -1276,12 +1276,12 @@ static int __init smscore_module_init(void)
1276 INIT_LIST_HEAD(&g_smscore_registry); 1276 INIT_LIST_HEAD(&g_smscore_registry);
1277 kmutex_init(&g_smscore_registrylock); 1277 kmutex_init(&g_smscore_registrylock);
1278 1278
1279 /* USB Register */
1280 rc = smsusb_register();
1281 1279
1282 /* DVB Register */
1283 rc = smsdvb_register();
1284 1280
1281
1282
1283
1284 return rc;
1285 sms_debug("rc %d", rc); 1285 sms_debug("rc %d", rc);
1286 1286
1287 return rc; 1287 return rc;
@@ -1290,6 +1290,10 @@ static int __init smscore_module_init(void)
1290static void __exit smscore_module_exit(void) 1290static void __exit smscore_module_exit(void)
1291{ 1291{
1292 1292
1293
1294
1295
1296
1293 kmutex_lock(&g_smscore_deviceslock); 1297 kmutex_lock(&g_smscore_deviceslock);
1294 while (!list_empty(&g_smscore_notifyees)) { 1298 while (!list_empty(&g_smscore_notifyees)) {
1295 struct smscore_device_notifyee_t *notifyee = 1299 struct smscore_device_notifyee_t *notifyee =
@@ -1312,18 +1316,34 @@ static void __exit smscore_module_exit(void)
1312 } 1316 }
1313 kmutex_unlock(&g_smscore_registrylock); 1317 kmutex_unlock(&g_smscore_registrylock);
1314 1318
1315 /* DVB UnRegister */ 1319//#ifdef DVB_CORE
1316 smsdvb_unregister(); 1320// smsdvb_unregister();
1317 1321//#endif
1318 /* Unregister USB */
1319 smsusb_unregister();
1320 1322
1321 sms_debug(""); 1323 sms_debug("");
1322} 1324}
1323 1325
1326EXPORT_SYMBOL(smscore_onresponse);
1327EXPORT_SYMBOL(sms_get_board);
1328EXPORT_SYMBOL(sms_debug);
1329EXPORT_SYMBOL(smscore_putbuffer);
1330EXPORT_SYMBOL(smscore_registry_getmode);
1331EXPORT_SYMBOL(smscore_register_device);
1332EXPORT_SYMBOL(smscore_set_board_id);
1333EXPORT_SYMBOL(smscore_start_device);
1334EXPORT_SYMBOL(smscore_unregister_device);
1335EXPORT_SYMBOL(smscore_getbuffer);
1336EXPORT_SYMBOL(smscore_get_device_mode);
1337EXPORT_SYMBOL(smscore_register_client);
1338EXPORT_SYMBOL(smscore_unregister_hotplug);
1339EXPORT_SYMBOL(smsclient_sendrequest);
1340EXPORT_SYMBOL(smscore_unregister_client);
1341EXPORT_SYMBOL(smscore_get_board_id);
1342EXPORT_SYMBOL(smscore_register_hotplug);
1343
1324module_init(smscore_module_init); 1344module_init(smscore_module_init);
1325module_exit(smscore_module_exit); 1345module_exit(smscore_module_exit);
1326 1346
1327MODULE_DESCRIPTION("Driver for the Siano SMS1XXX USB dongle"); 1347MODULE_DESCRIPTION("Siano MDTV Core module");
1328MODULE_AUTHOR("Siano Mobile Silicon,,, (doronc@siano-ms.com)"); 1348MODULE_AUTHOR("Siano Mobile Silicon, Inc. (uris@siano-ms.com)");
1329MODULE_LICENSE("GPL"); 1349MODULE_LICENSE("GPL");
diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h
index bd3cc2e26abd..cb2f48485886 100644
--- a/drivers/media/dvb/siano/smscoreapi.h
+++ b/drivers/media/dvb/siano/smscoreapi.h
@@ -29,13 +29,13 @@
29#include <linux/scatterlist.h> 29#include <linux/scatterlist.h>
30#include <linux/types.h> 30#include <linux/types.h>
31#include <asm/page.h> 31#include <asm/page.h>
32#include <linux/mutex.h>
32 33
33#include "dmxdev.h" 34#include "dmxdev.h"
34#include "dvbdev.h" 35#include "dvbdev.h"
35#include "dvb_demux.h" 36#include "dvb_demux.h"
36#include "dvb_frontend.h" 37#include "dvb_frontend.h"
37 38
38#include <linux/mutex.h>
39 39
40#define kmutex_init(_p_) mutex_init(_p_) 40#define kmutex_init(_p_) mutex_init(_p_)
41#define kmutex_lock(_p_) mutex_lock(_p_) 41#define kmutex_lock(_p_) mutex_lock(_p_)
@@ -397,6 +397,11 @@ extern int smsclient_sendrequest(struct smscore_client_t *client,
397extern void smscore_onresponse(struct smscore_device_t *coredev, 397extern void smscore_onresponse(struct smscore_device_t *coredev,
398 struct smscore_buffer_t *cb); 398 struct smscore_buffer_t *cb);
399 399
400extern int smscore_get_common_buffer_size(struct smscore_device_t *coredev);
401extern int smscore_map_common_buffer(struct smscore_device_t *coredev,
402 struct vm_area_struct *vma);
403extern int smscore_get_fw_filename(struct smscore_device_t *coredev, int mode, char* filename);
404extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size);
400 405
401extern 406extern
402struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev); 407struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev);
@@ -412,13 +417,6 @@ int smscore_get_board_id(struct smscore_device_t *core);
412 417
413int smscore_led_state(struct smscore_device_t *core, int led); 418int smscore_led_state(struct smscore_device_t *core, int led);
414 419
415/* smsdvb.c */
416int smsdvb_register(void);
417void smsdvb_unregister(void);
418
419/* smsusb.c */
420int smsusb_register(void);
421void smsusb_unregister(void);
422 420
423/* ------------------------------------------------------------------------ */ 421/* ------------------------------------------------------------------------ */
424 422
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c
index 28e904890016..36dc9f2d1172 100644
--- a/drivers/media/dvb/siano/smsdvb.c
+++ b/drivers/media/dvb/siano/smsdvb.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Driver for the Siano SMS1xxx USB dongle 2 * Driver for the Siano SMS1xxx USB dongle
3 * 3 *
4 * author: Anatoly Greenblat 4 * Author: Uri Shkolni
5 * 5 *
6 * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc. 6 * Copyright (c), 2005-2008 Siano Mobile Silicon, Inc.
7 * 7 *
@@ -368,7 +368,7 @@ static void smsdvb_release(struct dvb_frontend *fe)
368 368
369static struct dvb_frontend_ops smsdvb_fe_ops = { 369static struct dvb_frontend_ops smsdvb_fe_ops = {
370 .info = { 370 .info = {
371 .name = "Siano Mobile Digital SMS1xxx", 371 .name = "Siano Mobile Digital MDTV Receiver",
372 .type = FE_OFDM, 372 .type = FE_OFDM,
373 .frequency_min = 44250000, 373 .frequency_min = 44250000,
374 .frequency_max = 867250000, 374 .frequency_max = 867250000,
@@ -410,7 +410,7 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,
410 if (!arrival) 410 if (!arrival)
411 return 0; 411 return 0;
412 412
413 if (smscore_get_device_mode(coredev) != 4) { 413 if (smscore_get_device_mode(coredev) != DEVICE_MODE_DVBT_BDA) {
414 sms_err("SMS Device mode is not set for " 414 sms_err("SMS Device mode is not set for "
415 "DVB operation."); 415 "DVB operation.");
416 return 0; 416 return 0;
@@ -512,7 +512,7 @@ adapter_error:
512 return rc; 512 return rc;
513} 513}
514 514
515int smsdvb_register(void) 515int smsdvb_module_init(void)
516{ 516{
517 int rc; 517 int rc;
518 518
@@ -526,7 +526,7 @@ int smsdvb_register(void)
526 return rc; 526 return rc;
527} 527}
528 528
529void smsdvb_unregister(void) 529void smsdvb_module_exit(void)
530{ 530{
531 smscore_unregister_hotplug(smsdvb_hotplug); 531 smscore_unregister_hotplug(smsdvb_hotplug);
532 532
@@ -538,3 +538,10 @@ void smsdvb_unregister(void)
538 538
539 kmutex_unlock(&g_smsdvb_clientslock); 539 kmutex_unlock(&g_smsdvb_clientslock);
540} 540}
541
542module_init(smsdvb_module_init);
543module_exit(smsdvb_module_exit);
544
545MODULE_DESCRIPTION("SMS DVB subsystem adaptation module");
546MODULE_AUTHOR("Siano Mobile Silicon, INC. (uris@siano-ms.com)");
547MODULE_LICENSE("GPL");
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c
index f8cfeaae5cc1..66e413a78a98 100644
--- a/drivers/media/dvb/siano/smsusb.c
+++ b/drivers/media/dvb/siano/smsusb.c
@@ -531,7 +531,7 @@ static struct usb_driver smsusb_driver = {
531 .resume = smsusb_resume, 531 .resume = smsusb_resume,
532}; 532};
533 533
534int smsusb_register(void) 534int smsusb_module_init(void)
535{ 535{
536 int rc = usb_register(&smsusb_driver); 536 int rc = usb_register(&smsusb_driver);
537 if (rc) 537 if (rc)
@@ -542,10 +542,16 @@ int smsusb_register(void)
542 return rc; 542 return rc;
543} 543}
544 544
545void smsusb_unregister(void) 545void smsusb_module_exit(void)
546{ 546{
547 sms_debug(""); 547 sms_debug("");
548 /* Regular USB Cleanup */ 548 /* Regular USB Cleanup */
549 usb_deregister(&smsusb_driver); 549 usb_deregister(&smsusb_driver);
550} 550}
551 551
552module_init(smsusb_module_init);
553module_exit(smsusb_module_exit);
554
555MODULE_DESCRIPTION("Driver for the Siano SMS1XXX USB dongle");
556MODULE_AUTHOR("Siano Mobile Silicon, INC. (uris@siano-ms.com)");
557MODULE_LICENSE("GPL");