]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (10750): import changes from Siano
authorUri Shkolnik <uris@siano-ms.com>
Sun, 31 Aug 2008 03:44:04 +0000 (00:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:43:00 +0000 (12:43 -0300)
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>
drivers/media/dvb/siano/Makefile
drivers/media/dvb/siano/smscoreapi.c
drivers/media/dvb/siano/smscoreapi.h
drivers/media/dvb/siano/smsdvb.c
drivers/media/dvb/siano/smsusb.c

index ee0737af98c0ff3004b9c15b53afbb39a6c8dee9..bcf93f4828b28cbc7dace4c0b27d1bcc27db62e3 100644 (file)
@@ -1,6 +1,8 @@
-sms1xxx-objs := smscoreapi.o smsusb.o smsdvb.o sms-cards.o
+sms1xxx-objs := smscoreapi.o sms-cards.o
 
 obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o
+obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o
+obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsdvb.o
 
 EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
 
index cf613f22fb8d84e68203f7de9f7bed5c3b997978..6b33acd861da7529f2ad4f04d03684af1f15e786 100644 (file)
@@ -3,7 +3,7 @@
  *
  *  This file contains implementation for the interface to sms core component
  *
- *  author: Anatoly Greenblat
+ *  author: Uri Shkolnik
  *
  *  Copyright (c), 2005-2008 Siano Mobile Silicon, Inc.
  *
@@ -732,7 +732,7 @@ static char *smscore_fw_lkup[][SMS_NUM_OF_DEVICE_TYPES] = {
        /*DVBH*/
        {"none", "dvb_nova_12mhz.inp", "dvb_nova_12mhz_b0.inp", "none"},
        /*TDMB*/
-       {"none", "tdmb_nova_12mhz.inp", "none", "none"},
+       {"none", "tdmb_nova_12mhz.inp", "tdmb_nova_12mhz_b0.inp", "none"},
        /*DABIP*/
        {"none", "none", "none", "none"},
        /*BDA*/
@@ -1276,12 +1276,12 @@ static int __init smscore_module_init(void)
        INIT_LIST_HEAD(&g_smscore_registry);
        kmutex_init(&g_smscore_registrylock);
 
-       /* USB Register */
-       rc = smsusb_register();
 
-       /* DVB Register */
-       rc = smsdvb_register();
 
+
+
+
+       return rc;
        sms_debug("rc %d", rc);
 
        return rc;
@@ -1290,6 +1290,10 @@ static int __init smscore_module_init(void)
 static void __exit smscore_module_exit(void)
 {
 
+
+
+
+
        kmutex_lock(&g_smscore_deviceslock);
        while (!list_empty(&g_smscore_notifyees)) {
                struct smscore_device_notifyee_t *notifyee =
@@ -1312,18 +1316,34 @@ static void __exit smscore_module_exit(void)
        }
        kmutex_unlock(&g_smscore_registrylock);
 
-       /* DVB UnRegister */
-       smsdvb_unregister();
-
-       /* Unregister USB */
-       smsusb_unregister();
+//#ifdef DVB_CORE
+//     smsdvb_unregister();
+//#endif
 
        sms_debug("");
 }
 
+EXPORT_SYMBOL(smscore_onresponse);
+EXPORT_SYMBOL(sms_get_board);
+EXPORT_SYMBOL(sms_debug);
+EXPORT_SYMBOL(smscore_putbuffer);
+EXPORT_SYMBOL(smscore_registry_getmode);
+EXPORT_SYMBOL(smscore_register_device);
+EXPORT_SYMBOL(smscore_set_board_id);
+EXPORT_SYMBOL(smscore_start_device);
+EXPORT_SYMBOL(smscore_unregister_device);
+EXPORT_SYMBOL(smscore_getbuffer);
+EXPORT_SYMBOL(smscore_get_device_mode);
+EXPORT_SYMBOL(smscore_register_client);
+EXPORT_SYMBOL(smscore_unregister_hotplug);
+EXPORT_SYMBOL(smsclient_sendrequest);
+EXPORT_SYMBOL(smscore_unregister_client);
+EXPORT_SYMBOL(smscore_get_board_id);
+EXPORT_SYMBOL(smscore_register_hotplug);
+
 module_init(smscore_module_init);
 module_exit(smscore_module_exit);
 
-MODULE_DESCRIPTION("Driver for the Siano SMS1XXX USB dongle");
-MODULE_AUTHOR("Siano Mobile Silicon,,, (doronc@siano-ms.com)");
+MODULE_DESCRIPTION("Siano MDTV Core module");
+MODULE_AUTHOR("Siano Mobile Silicon, Inc. (uris@siano-ms.com)");
 MODULE_LICENSE("GPL");
index bd3cc2e26abd80d8404fb8cd80a41ca1934af3b6..cb2f48485886fdd73534ecd463a0e60e40361287 100644 (file)
 #include <linux/scatterlist.h>
 #include <linux/types.h>
 #include <asm/page.h>
+#include <linux/mutex.h>
 
 #include "dmxdev.h"
 #include "dvbdev.h"
 #include "dvb_demux.h"
 #include "dvb_frontend.h"
 
-#include <linux/mutex.h>
 
 #define kmutex_init(_p_) mutex_init(_p_)
 #define kmutex_lock(_p_) mutex_lock(_p_)
@@ -397,6 +397,11 @@ extern int smsclient_sendrequest(struct smscore_client_t *client,
 extern void smscore_onresponse(struct smscore_device_t *coredev,
                               struct smscore_buffer_t *cb);
 
+extern int smscore_get_common_buffer_size(struct smscore_device_t *coredev);
+extern int smscore_map_common_buffer(struct smscore_device_t *coredev,
+                                     struct vm_area_struct *vma);
+extern int smscore_get_fw_filename(struct smscore_device_t *coredev, int mode, char* filename);
+extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size);
 
 extern
 struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev);
@@ -412,13 +417,6 @@ int smscore_get_board_id(struct smscore_device_t *core);
 
 int smscore_led_state(struct smscore_device_t *core, int led);
 
-/* smsdvb.c */
-int smsdvb_register(void);
-void smsdvb_unregister(void);
-
-/* smsusb.c */
-int smsusb_register(void);
-void smsusb_unregister(void);
 
 /* ------------------------------------------------------------------------ */
 
index 28e9048900162a8071e2fa66b870658be880f66a..36dc9f2d11723e87db61b48de256d55bc7aa7946 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  Driver for the Siano SMS1xxx USB dongle
  *
- *  author: Anatoly Greenblat
+ *  Author: Uri Shkolni
  *
  *  Copyright (c), 2005-2008 Siano Mobile Silicon, Inc.
  *
@@ -368,7 +368,7 @@ static void smsdvb_release(struct dvb_frontend *fe)
 
 static struct dvb_frontend_ops smsdvb_fe_ops = {
        .info = {
-               .name                   = "Siano Mobile Digital SMS1xxx",
+               .name                   = "Siano Mobile Digital MDTV Receiver",
                .type                   = FE_OFDM,
                .frequency_min          = 44250000,
                .frequency_max          = 867250000,
@@ -410,7 +410,7 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,
        if (!arrival)
                return 0;
 
-       if (smscore_get_device_mode(coredev) != 4) {
+       if (smscore_get_device_mode(coredev) != DEVICE_MODE_DVBT_BDA) {
                sms_err("SMS Device mode is not set for "
                        "DVB operation.");
                return 0;
@@ -512,7 +512,7 @@ adapter_error:
        return rc;
 }
 
-int smsdvb_register(void)
+int smsdvb_module_init(void)
 {
        int rc;
 
@@ -526,7 +526,7 @@ int smsdvb_register(void)
        return rc;
 }
 
-void smsdvb_unregister(void)
+void smsdvb_module_exit(void)
 {
        smscore_unregister_hotplug(smsdvb_hotplug);
 
@@ -538,3 +538,10 @@ void smsdvb_unregister(void)
 
        kmutex_unlock(&g_smsdvb_clientslock);
 }
+
+module_init(smsdvb_module_init);
+module_exit(smsdvb_module_exit);
+
+MODULE_DESCRIPTION("SMS DVB subsystem adaptation module");
+MODULE_AUTHOR("Siano Mobile Silicon, INC. (uris@siano-ms.com)");
+MODULE_LICENSE("GPL");
index f8cfeaae5cc1aa18fde494c595d4b41e83e3e69e..66e413a78a986c2b9b9e05dad8205111fa1a17c6 100644 (file)
@@ -531,7 +531,7 @@ static struct usb_driver smsusb_driver = {
        .resume                 = smsusb_resume,
 };
 
-int smsusb_register(void)
+int smsusb_module_init(void)
 {
        int rc = usb_register(&smsusb_driver);
        if (rc)
@@ -542,10 +542,16 @@ int smsusb_register(void)
        return rc;
 }
 
-void smsusb_unregister(void)
+void smsusb_module_exit(void)
 {
        sms_debug("");
        /* Regular USB Cleanup */
        usb_deregister(&smsusb_driver);
 }
 
+module_init(smsusb_module_init);
+module_exit(smsusb_module_exit);
+
+MODULE_DESCRIPTION("Driver for the Siano SMS1XXX USB dongle");
+MODULE_AUTHOR("Siano Mobile Silicon, INC. (uris@siano-ms.com)");
+MODULE_LICENSE("GPL");