2008-05-22 21:05:26 +00:00
|
|
|
/*
|
2008-06-28 20:09:28 +00:00
|
|
|
* Driver for the Siano SMS1xxx USB dongle
|
2008-05-22 21:05:26 +00:00
|
|
|
*
|
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>
2008-08-31 03:44:04 +00:00
|
|
|
* Author: Uri Shkolni
|
2008-05-22 21:29:20 +00:00
|
|
|
*
|
|
|
|
* Copyright (c), 2005-2008 Siano Mobile Silicon, Inc.
|
2008-05-22 21:05:26 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
2008-09-03 19:48:17 +00:00
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
2008-05-22 21:29:20 +00:00
|
|
|
* published by the Free Software Foundation;
|
2008-05-22 21:05:26 +00:00
|
|
|
*
|
2008-05-22 21:29:20 +00:00
|
|
|
* Software distributed under the License is distributed on an "AS IS"
|
|
|
|
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
|
2008-05-22 21:05:26 +00:00
|
|
|
*
|
2008-05-22 21:29:20 +00:00
|
|
|
* See the GNU General Public License for more details.
|
2008-05-22 21:05:26 +00:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
2008-05-19 21:56:13 +00:00
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
|
|
|
|
#include "smscoreapi.h"
|
2008-06-19 01:09:55 +00:00
|
|
|
#include "sms-cards.h"
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-05-19 21:57:12 +00:00
|
|
|
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
|
|
|
|
2008-08-31 20:15:47 +00:00
|
|
|
struct smsdvb_client_t {
|
|
|
|
struct list_head entry;
|
|
|
|
|
|
|
|
struct smscore_device_t *coredev;
|
|
|
|
struct smscore_client_t *smsclient;
|
|
|
|
|
|
|
|
struct dvb_adapter adapter;
|
|
|
|
struct dvb_demux demux;
|
|
|
|
struct dmxdev dmxdev;
|
|
|
|
struct dvb_frontend frontend;
|
|
|
|
|
|
|
|
fe_status_t fe_status;
|
|
|
|
int fe_ber, fe_snr, fe_unc, fe_signal_strength;
|
|
|
|
|
|
|
|
struct completion tune_done, stat_done;
|
|
|
|
|
|
|
|
/* todo: save freq/band instead whole struct */
|
|
|
|
struct dvb_frontend_parameters fe_params;
|
|
|
|
};
|
|
|
|
|
2008-07-22 02:17:36 +00:00
|
|
|
static struct list_head g_smsdvb_clients;
|
|
|
|
static struct mutex g_smsdvb_clientslock;
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2009-02-27 05:42:16 +00:00
|
|
|
static int sms_dbg;
|
|
|
|
module_param_named(debug, sms_dbg, int, 0644);
|
|
|
|
MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
|
|
|
|
|
2008-06-21 05:44:02 +00:00
|
|
|
static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
|
2008-05-19 21:56:13 +00:00
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct smsdvb_client_t *client = (struct smsdvb_client_t *) context;
|
|
|
|
struct SmsMsgHdr_ST *phdr =
|
|
|
|
(struct SmsMsgHdr_ST *)(((u8 *) cb->p) + cb->offset);
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-06-15 18:52:43 +00:00
|
|
|
switch (phdr->msgType) {
|
2008-06-15 18:14:13 +00:00
|
|
|
case MSG_SMS_DVBT_BDA_DATA:
|
|
|
|
dvb_dmx_swfilter(&client->demux, (u8 *)(phdr + 1),
|
2008-06-15 20:52:24 +00:00
|
|
|
cb->size - sizeof(struct SmsMsgHdr_ST));
|
2008-06-15 18:14:13 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case MSG_SMS_RF_TUNE_RES:
|
|
|
|
complete(&client->tune_done);
|
|
|
|
break;
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-06-15 18:14:13 +00:00
|
|
|
case MSG_SMS_GET_STATISTICS_RES:
|
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct SmsMsgStatisticsInfo_ST *p =
|
|
|
|
(struct SmsMsgStatisticsInfo_ST *)(phdr + 1);
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-06-15 18:52:43 +00:00
|
|
|
if (p->Stat.IsDemodLocked) {
|
2008-06-15 18:14:13 +00:00
|
|
|
client->fe_status = FE_HAS_SIGNAL |
|
|
|
|
FE_HAS_CARRIER |
|
|
|
|
FE_HAS_VITERBI |
|
|
|
|
FE_HAS_SYNC |
|
|
|
|
FE_HAS_LOCK;
|
|
|
|
|
|
|
|
client->fe_snr = p->Stat.SNR;
|
|
|
|
client->fe_ber = p->Stat.BER;
|
2008-11-22 17:56:37 +00:00
|
|
|
client->fe_unc = p->Stat.BERErrorCount;
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-06-15 18:14:13 +00:00
|
|
|
if (p->Stat.InBandPwr < -95)
|
|
|
|
client->fe_signal_strength = 0;
|
|
|
|
else if (p->Stat.InBandPwr > -29)
|
|
|
|
client->fe_signal_strength = 100;
|
|
|
|
else
|
|
|
|
client->fe_signal_strength =
|
|
|
|
(p->Stat.InBandPwr + 95) * 3 / 2;
|
|
|
|
} else {
|
|
|
|
client->fe_status = 0;
|
|
|
|
client->fe_snr =
|
|
|
|
client->fe_ber =
|
2008-11-22 17:56:37 +00:00
|
|
|
client->fe_unc =
|
2008-06-15 18:14:13 +00:00
|
|
|
client->fe_signal_strength = 0;
|
2008-05-19 21:56:13 +00:00
|
|
|
}
|
2008-06-15 18:14:13 +00:00
|
|
|
|
|
|
|
complete(&client->stat_done);
|
|
|
|
break;
|
|
|
|
} }
|
2008-05-19 21:56:13 +00:00
|
|
|
|
|
|
|
smscore_putbuffer(client->coredev, cb);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-06-21 05:44:02 +00:00
|
|
|
static void smsdvb_unregister_client(struct smsdvb_client_t *client)
|
2008-05-19 21:56:13 +00:00
|
|
|
{
|
2008-06-15 18:52:43 +00:00
|
|
|
/* must be called under clientslock */
|
2008-05-19 21:56:13 +00:00
|
|
|
|
|
|
|
list_del(&client->entry);
|
|
|
|
|
|
|
|
smscore_unregister_client(client->smsclient);
|
|
|
|
dvb_unregister_frontend(&client->frontend);
|
|
|
|
dvb_dmxdev_release(&client->dmxdev);
|
|
|
|
dvb_dmx_release(&client->demux);
|
|
|
|
dvb_unregister_adapter(&client->adapter);
|
|
|
|
kfree(client);
|
|
|
|
}
|
|
|
|
|
2008-06-21 05:44:02 +00:00
|
|
|
static void smsdvb_onremove(void *context)
|
2008-05-19 21:56:13 +00:00
|
|
|
{
|
|
|
|
kmutex_lock(&g_smsdvb_clientslock);
|
|
|
|
|
2008-06-15 20:52:24 +00:00
|
|
|
smsdvb_unregister_client((struct smsdvb_client_t *) context);
|
2008-05-19 21:56:13 +00:00
|
|
|
|
|
|
|
kmutex_unlock(&g_smsdvb_clientslock);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int smsdvb_start_feed(struct dvb_demux_feed *feed)
|
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(feed->demux, struct smsdvb_client_t, demux);
|
|
|
|
struct SmsMsgData_ST PidMsg;
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_debug("add pid %d(%x)",
|
2008-06-19 04:15:46 +00:00
|
|
|
feed->pid, feed->pid);
|
2008-05-19 21:56:13 +00:00
|
|
|
|
|
|
|
PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
|
|
|
PidMsg.xMsgHeader.msgDstId = HIF_TASK;
|
|
|
|
PidMsg.xMsgHeader.msgFlags = 0;
|
|
|
|
PidMsg.xMsgHeader.msgType = MSG_SMS_ADD_PID_FILTER_REQ;
|
|
|
|
PidMsg.xMsgHeader.msgLength = sizeof(PidMsg);
|
|
|
|
PidMsg.msgData[0] = feed->pid;
|
|
|
|
|
2008-06-15 18:14:13 +00:00
|
|
|
return smsclient_sendrequest(client->smsclient,
|
|
|
|
&PidMsg, sizeof(PidMsg));
|
2008-05-19 21:56:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static int smsdvb_stop_feed(struct dvb_demux_feed *feed)
|
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(feed->demux, struct smsdvb_client_t, demux);
|
|
|
|
struct SmsMsgData_ST PidMsg;
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_debug("remove pid %d(%x)",
|
2008-06-19 04:15:46 +00:00
|
|
|
feed->pid, feed->pid);
|
2008-05-19 21:56:13 +00:00
|
|
|
|
|
|
|
PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
|
|
|
PidMsg.xMsgHeader.msgDstId = HIF_TASK;
|
|
|
|
PidMsg.xMsgHeader.msgFlags = 0;
|
|
|
|
PidMsg.xMsgHeader.msgType = MSG_SMS_REMOVE_PID_FILTER_REQ;
|
|
|
|
PidMsg.xMsgHeader.msgLength = sizeof(PidMsg);
|
|
|
|
PidMsg.msgData[0] = feed->pid;
|
|
|
|
|
2008-06-15 18:14:13 +00:00
|
|
|
return smsclient_sendrequest(client->smsclient,
|
|
|
|
&PidMsg, sizeof(PidMsg));
|
2008-05-19 21:56:13 +00:00
|
|
|
}
|
|
|
|
|
2008-06-15 20:52:24 +00:00
|
|
|
static int smsdvb_sendrequest_and_wait(struct smsdvb_client_t *client,
|
2008-05-06 06:11:51 +00:00
|
|
|
void *buffer, size_t size,
|
|
|
|
struct completion *completion)
|
2008-05-19 21:56:13 +00:00
|
|
|
{
|
|
|
|
int rc = smsclient_sendrequest(client->smsclient, buffer, size);
|
|
|
|
if (rc < 0)
|
|
|
|
return rc;
|
|
|
|
|
2008-06-15 18:14:13 +00:00
|
|
|
return wait_for_completion_timeout(completion,
|
|
|
|
msecs_to_jiffies(2000)) ?
|
|
|
|
0 : -ETIME;
|
2008-05-19 21:56:13 +00:00
|
|
|
}
|
|
|
|
|
2008-06-15 20:52:24 +00:00
|
|
|
static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
|
2008-05-19 21:56:13 +00:00
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct SmsMsgHdr_ST Msg = { MSG_SMS_GET_STATISTICS_REQ,
|
2008-06-15 18:14:13 +00:00
|
|
|
DVBT_BDA_CONTROL_MSG_ID,
|
2008-06-15 20:52:24 +00:00
|
|
|
HIF_TASK, sizeof(struct SmsMsgHdr_ST), 0 };
|
2008-11-22 18:32:19 +00:00
|
|
|
int ret = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
|
|
|
|
&client->stat_done);
|
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
if (client->fe_status & FE_HAS_LOCK)
|
|
|
|
sms_board_led_feedback(client->coredev,
|
|
|
|
(client->fe_unc == 0) ?
|
|
|
|
SMS_LED_HI : SMS_LED_LO);
|
|
|
|
else
|
|
|
|
sms_board_led_feedback(client->coredev, SMS_LED_OFF);
|
|
|
|
return ret;
|
2008-05-19 21:56:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static int smsdvb_read_status(struct dvb_frontend *fe, fe_status_t *stat)
|
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(fe, struct smsdvb_client_t, frontend);
|
2008-05-19 21:56:13 +00:00
|
|
|
int rc = smsdvb_send_statistics_request(client);
|
|
|
|
|
|
|
|
if (!rc)
|
|
|
|
*stat = client->fe_status;
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int smsdvb_read_ber(struct dvb_frontend *fe, u32 *ber)
|
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(fe, struct smsdvb_client_t, frontend);
|
2008-05-19 21:56:13 +00:00
|
|
|
int rc = smsdvb_send_statistics_request(client);
|
|
|
|
|
|
|
|
if (!rc)
|
|
|
|
*ber = client->fe_ber;
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int smsdvb_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
|
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(fe, struct smsdvb_client_t, frontend);
|
2008-05-19 21:56:13 +00:00
|
|
|
int rc = smsdvb_send_statistics_request(client);
|
|
|
|
|
|
|
|
if (!rc)
|
|
|
|
*strength = client->fe_signal_strength;
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr)
|
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(fe, struct smsdvb_client_t, frontend);
|
2008-05-19 21:56:13 +00:00
|
|
|
int rc = smsdvb_send_statistics_request(client);
|
|
|
|
|
|
|
|
if (!rc)
|
|
|
|
*snr = client->fe_snr;
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2008-11-22 17:56:37 +00:00
|
|
|
static int smsdvb_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
|
|
|
|
{
|
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(fe, struct smsdvb_client_t, frontend);
|
|
|
|
int rc = smsdvb_send_statistics_request(client);
|
|
|
|
|
|
|
|
if (!rc)
|
|
|
|
*ucblocks = client->fe_unc;
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2008-06-15 18:14:13 +00:00
|
|
|
static int smsdvb_get_tune_settings(struct dvb_frontend *fe,
|
|
|
|
struct dvb_frontend_tune_settings *tune)
|
2008-05-19 21:56:13 +00:00
|
|
|
{
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_debug("");
|
2008-05-19 21:56:13 +00:00
|
|
|
|
|
|
|
tune->min_delay_ms = 400;
|
|
|
|
tune->step_size = 250000;
|
|
|
|
tune->max_drift = 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-06-15 18:14:13 +00:00
|
|
|
static int smsdvb_set_frontend(struct dvb_frontend *fe,
|
|
|
|
struct dvb_frontend_parameters *fep)
|
2008-05-19 21:56:13 +00:00
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(fe, struct smsdvb_client_t, frontend);
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-06-15 20:52:24 +00:00
|
|
|
struct {
|
|
|
|
struct SmsMsgHdr_ST Msg;
|
2008-06-15 18:14:13 +00:00
|
|
|
u32 Data[3];
|
2008-05-19 21:56:13 +00:00
|
|
|
} Msg;
|
2008-12-16 05:56:08 +00:00
|
|
|
int ret;
|
2008-05-19 21:56:13 +00:00
|
|
|
|
|
|
|
Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
|
|
|
Msg.Msg.msgDstId = HIF_TASK;
|
|
|
|
Msg.Msg.msgFlags = 0;
|
|
|
|
Msg.Msg.msgType = MSG_SMS_RF_TUNE_REQ;
|
|
|
|
Msg.Msg.msgLength = sizeof(Msg);
|
|
|
|
Msg.Data[0] = fep->frequency;
|
|
|
|
Msg.Data[2] = 12000000;
|
|
|
|
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_debug("freq %d band %d",
|
2008-06-19 04:15:46 +00:00
|
|
|
fep->frequency, fep->u.ofdm.bandwidth);
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-06-15 18:52:43 +00:00
|
|
|
switch (fep->u.ofdm.bandwidth) {
|
|
|
|
case BANDWIDTH_8_MHZ: Msg.Data[1] = BW_8_MHZ; break;
|
|
|
|
case BANDWIDTH_7_MHZ: Msg.Data[1] = BW_7_MHZ; break;
|
|
|
|
case BANDWIDTH_6_MHZ: Msg.Data[1] = BW_6_MHZ; break;
|
|
|
|
case BANDWIDTH_AUTO: return -EOPNOTSUPP;
|
|
|
|
default: return -EINVAL;
|
2008-05-19 21:56:13 +00:00
|
|
|
}
|
|
|
|
|
2008-12-16 05:56:08 +00:00
|
|
|
/* Disable LNA, if any. An error is returned if no LNA is present */
|
|
|
|
ret = sms_board_lna_control(client->coredev, 0);
|
|
|
|
if (ret == 0) {
|
|
|
|
fe_status_t status;
|
|
|
|
|
|
|
|
/* tune with LNA off at first */
|
|
|
|
ret = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
|
|
|
|
&client->tune_done);
|
|
|
|
|
|
|
|
smsdvb_read_status(fe, &status);
|
|
|
|
|
|
|
|
if (status & FE_HAS_LOCK)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
/* previous tune didnt lock - enable LNA and tune again */
|
|
|
|
sms_board_lna_control(client->coredev, 1);
|
|
|
|
}
|
|
|
|
|
2008-06-15 18:14:13 +00:00
|
|
|
return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
|
|
|
|
&client->tune_done);
|
2008-05-19 21:56:13 +00:00
|
|
|
}
|
|
|
|
|
2008-06-15 18:14:13 +00:00
|
|
|
static int smsdvb_get_frontend(struct dvb_frontend *fe,
|
|
|
|
struct dvb_frontend_parameters *fep)
|
2008-05-19 21:56:13 +00:00
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(fe, struct smsdvb_client_t, frontend);
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_debug("");
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-06-15 18:52:43 +00:00
|
|
|
/* todo: */
|
2008-06-15 18:14:13 +00:00
|
|
|
memcpy(fep, &client->fe_params,
|
|
|
|
sizeof(struct dvb_frontend_parameters));
|
2008-11-22 17:26:37 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int smsdvb_init(struct dvb_frontend *fe)
|
|
|
|
{
|
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(fe, struct smsdvb_client_t, frontend);
|
|
|
|
|
|
|
|
sms_board_power(client->coredev, 1);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int smsdvb_sleep(struct dvb_frontend *fe)
|
|
|
|
{
|
|
|
|
struct smsdvb_client_t *client =
|
|
|
|
container_of(fe, struct smsdvb_client_t, frontend);
|
|
|
|
|
2008-11-22 18:32:19 +00:00
|
|
|
sms_board_led_feedback(client->coredev, SMS_LED_OFF);
|
2008-11-22 17:26:37 +00:00
|
|
|
sms_board_power(client->coredev, 0);
|
|
|
|
|
2008-05-19 21:56:13 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void smsdvb_release(struct dvb_frontend *fe)
|
|
|
|
{
|
2008-06-15 18:52:43 +00:00
|
|
|
/* do nothing */
|
2008-05-19 21:56:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static struct dvb_frontend_ops smsdvb_fe_ops = {
|
|
|
|
.info = {
|
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>
2008-08-31 03:44:04 +00:00
|
|
|
.name = "Siano Mobile Digital MDTV Receiver",
|
2008-06-15 18:14:13 +00:00
|
|
|
.type = FE_OFDM,
|
2008-05-19 21:56:13 +00:00
|
|
|
.frequency_min = 44250000,
|
|
|
|
.frequency_max = 867250000,
|
|
|
|
.frequency_stepsize = 250000,
|
|
|
|
.caps = FE_CAN_INVERSION_AUTO |
|
2008-06-15 18:14:13 +00:00
|
|
|
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
|
|
|
|
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
|
|
|
|
FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 |
|
|
|
|
FE_CAN_QAM_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO |
|
|
|
|
FE_CAN_GUARD_INTERVAL_AUTO |
|
|
|
|
FE_CAN_RECOVER |
|
|
|
|
FE_CAN_HIERARCHY_AUTO,
|
2008-05-19 21:56:13 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
.release = smsdvb_release,
|
|
|
|
|
|
|
|
.set_frontend = smsdvb_set_frontend,
|
|
|
|
.get_frontend = smsdvb_get_frontend,
|
|
|
|
.get_tune_settings = smsdvb_get_tune_settings,
|
|
|
|
|
|
|
|
.read_status = smsdvb_read_status,
|
|
|
|
.read_ber = smsdvb_read_ber,
|
|
|
|
.read_signal_strength = smsdvb_read_signal_strength,
|
|
|
|
.read_snr = smsdvb_read_snr,
|
2008-11-22 17:56:37 +00:00
|
|
|
.read_ucblocks = smsdvb_read_ucblocks,
|
2008-11-22 17:26:37 +00:00
|
|
|
|
|
|
|
.init = smsdvb_init,
|
|
|
|
.sleep = smsdvb_sleep,
|
2008-05-19 21:56:13 +00:00
|
|
|
};
|
|
|
|
|
2008-06-21 05:44:02 +00:00
|
|
|
static int smsdvb_hotplug(struct smscore_device_t *coredev,
|
|
|
|
struct device *device, int arrival)
|
2008-05-19 21:56:13 +00:00
|
|
|
{
|
2008-06-15 20:52:24 +00:00
|
|
|
struct smsclient_params_t params;
|
|
|
|
struct smsdvb_client_t *client;
|
2008-05-19 21:56:13 +00:00
|
|
|
int rc;
|
|
|
|
|
2008-06-15 18:52:43 +00:00
|
|
|
/* device removal handled by onremove callback */
|
2008-05-19 21:56:13 +00:00
|
|
|
if (!arrival)
|
|
|
|
return 0;
|
|
|
|
|
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>
2008-08-31 03:44:04 +00:00
|
|
|
if (smscore_get_device_mode(coredev) != DEVICE_MODE_DVBT_BDA) {
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_err("SMS Device mode is not set for "
|
|
|
|
"DVB operation.");
|
2008-06-14 03:43:26 +00:00
|
|
|
return 0;
|
2008-05-19 21:56:13 +00:00
|
|
|
}
|
|
|
|
|
2008-06-15 20:52:24 +00:00
|
|
|
client = kzalloc(sizeof(struct smsdvb_client_t), GFP_KERNEL);
|
2008-06-15 18:14:13 +00:00
|
|
|
if (!client) {
|
2008-06-20 01:07:23 +00:00
|
|
|
sms_err("kmalloc() failed");
|
2008-05-19 21:56:13 +00:00
|
|
|
return -ENOMEM;
|
|
|
|
}
|
|
|
|
|
2008-06-15 18:52:43 +00:00
|
|
|
/* register dvb adapter */
|
2008-06-19 01:09:55 +00:00
|
|
|
rc = dvb_register_adapter(&client->adapter,
|
|
|
|
sms_get_board(
|
|
|
|
smscore_get_board_id(coredev))->name,
|
2008-06-15 18:14:13 +00:00
|
|
|
THIS_MODULE, device, adapter_nr);
|
|
|
|
if (rc < 0) {
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_err("dvb_register_adapter() failed %d", rc);
|
2008-05-19 21:56:13 +00:00
|
|
|
goto adapter_error;
|
|
|
|
}
|
|
|
|
|
2008-06-15 18:52:43 +00:00
|
|
|
/* init dvb demux */
|
2008-05-19 21:56:13 +00:00
|
|
|
client->demux.dmx.capabilities = DMX_TS_FILTERING;
|
2008-06-15 18:52:43 +00:00
|
|
|
client->demux.filternum = 32; /* todo: nova ??? */
|
2008-05-19 21:56:13 +00:00
|
|
|
client->demux.feednum = 32;
|
|
|
|
client->demux.start_feed = smsdvb_start_feed;
|
|
|
|
client->demux.stop_feed = smsdvb_stop_feed;
|
|
|
|
|
|
|
|
rc = dvb_dmx_init(&client->demux);
|
2008-06-15 18:14:13 +00:00
|
|
|
if (rc < 0) {
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_err("dvb_dmx_init failed %d", rc);
|
2008-05-19 21:56:13 +00:00
|
|
|
goto dvbdmx_error;
|
|
|
|
}
|
|
|
|
|
2008-06-15 18:52:43 +00:00
|
|
|
/* init dmxdev */
|
2008-05-19 21:56:13 +00:00
|
|
|
client->dmxdev.filternum = 32;
|
|
|
|
client->dmxdev.demux = &client->demux.dmx;
|
|
|
|
client->dmxdev.capabilities = 0;
|
|
|
|
|
|
|
|
rc = dvb_dmxdev_init(&client->dmxdev, &client->adapter);
|
2008-06-15 18:14:13 +00:00
|
|
|
if (rc < 0) {
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_err("dvb_dmxdev_init failed %d", rc);
|
2008-05-19 21:56:13 +00:00
|
|
|
goto dmxdev_error;
|
|
|
|
}
|
|
|
|
|
2008-06-15 18:52:43 +00:00
|
|
|
/* init and register frontend */
|
2008-06-15 18:14:13 +00:00
|
|
|
memcpy(&client->frontend.ops, &smsdvb_fe_ops,
|
|
|
|
sizeof(struct dvb_frontend_ops));
|
2008-05-19 21:56:13 +00:00
|
|
|
|
|
|
|
rc = dvb_register_frontend(&client->adapter, &client->frontend);
|
2008-06-15 18:14:13 +00:00
|
|
|
if (rc < 0) {
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_err("frontend registration failed %d", rc);
|
2008-05-19 21:56:13 +00:00
|
|
|
goto frontend_error;
|
|
|
|
}
|
|
|
|
|
2008-06-14 03:43:26 +00:00
|
|
|
params.initial_id = 1;
|
2008-05-19 21:56:13 +00:00
|
|
|
params.data_type = MSG_SMS_DVBT_BDA_DATA;
|
|
|
|
params.onresponse_handler = smsdvb_onresponse;
|
|
|
|
params.onremove_handler = smsdvb_onremove;
|
|
|
|
params.context = client;
|
|
|
|
|
|
|
|
rc = smscore_register_client(coredev, ¶ms, &client->smsclient);
|
2008-06-15 18:14:13 +00:00
|
|
|
if (rc < 0) {
|
2008-06-20 01:07:23 +00:00
|
|
|
sms_err("smscore_register_client() failed %d", rc);
|
2008-05-19 21:56:13 +00:00
|
|
|
goto client_error;
|
|
|
|
}
|
|
|
|
|
|
|
|
client->coredev = coredev;
|
|
|
|
|
|
|
|
init_completion(&client->tune_done);
|
|
|
|
init_completion(&client->stat_done);
|
|
|
|
|
|
|
|
kmutex_lock(&g_smsdvb_clientslock);
|
|
|
|
|
|
|
|
list_add(&client->entry, &g_smsdvb_clients);
|
|
|
|
|
|
|
|
kmutex_unlock(&g_smsdvb_clientslock);
|
|
|
|
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_info("success");
|
2008-05-19 21:56:13 +00:00
|
|
|
|
2008-11-17 01:45:42 +00:00
|
|
|
sms_board_setup(coredev);
|
|
|
|
|
2008-05-19 21:56:13 +00:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
client_error:
|
|
|
|
dvb_unregister_frontend(&client->frontend);
|
|
|
|
|
|
|
|
frontend_error:
|
|
|
|
dvb_dmxdev_release(&client->dmxdev);
|
|
|
|
|
|
|
|
dmxdev_error:
|
|
|
|
dvb_dmx_release(&client->demux);
|
|
|
|
|
|
|
|
dvbdmx_error:
|
|
|
|
dvb_unregister_adapter(&client->adapter);
|
|
|
|
|
|
|
|
adapter_error:
|
|
|
|
kfree(client);
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
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>
2008-08-31 03:44:04 +00:00
|
|
|
int smsdvb_module_init(void)
|
2008-05-22 21:04:36 +00:00
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
INIT_LIST_HEAD(&g_smsdvb_clients);
|
|
|
|
kmutex_init(&g_smsdvb_clientslock);
|
|
|
|
|
|
|
|
rc = smscore_register_hotplug(smsdvb_hotplug);
|
|
|
|
|
2008-06-19 23:35:21 +00:00
|
|
|
sms_debug("");
|
2008-05-22 21:04:36 +00:00
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
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>
2008-08-31 03:44:04 +00:00
|
|
|
void smsdvb_module_exit(void)
|
2008-05-22 21:04:36 +00:00
|
|
|
{
|
|
|
|
smscore_unregister_hotplug(smsdvb_hotplug);
|
|
|
|
|
|
|
|
kmutex_lock(&g_smsdvb_clientslock);
|
|
|
|
|
|
|
|
while (!list_empty(&g_smsdvb_clients))
|
2008-06-15 18:14:13 +00:00
|
|
|
smsdvb_unregister_client(
|
2008-06-15 20:52:24 +00:00
|
|
|
(struct smsdvb_client_t *) g_smsdvb_clients.next);
|
2008-05-22 21:04:36 +00:00
|
|
|
|
|
|
|
kmutex_unlock(&g_smsdvb_clientslock);
|
|
|
|
}
|
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>
2008-08-31 03:44:04 +00:00
|
|
|
|
|
|
|
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");
|