diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-15 14:52:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:21:35 -0400 |
commit | fa830e8a014a206103d06a7600ed8c661b427db3 (patch) | |
tree | 29606f18b0a88d6e9015b47a169db932b08283cf /drivers/media/dvb/siano/smsdvb.c | |
parent | f0333e3de0e06fb9a6662a6df7d3d1cc8e5dbeca (diff) |
V4L/DVB (8282): sms1xxx: more codingstyle cleanups
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/siano/smsdvb.c')
-rw-r--r-- | drivers/media/dvb/siano/smsdvb.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index 13980fb649c..e3f09646bb8 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c | |||
@@ -34,7 +34,7 @@ int smsdvb_onresponse(void *context, smscore_buffer_t *cb) | |||
34 | smsdvb_client_t *client = (smsdvb_client_t *) context; | 34 | smsdvb_client_t *client = (smsdvb_client_t *) context; |
35 | SmsMsgHdr_ST *phdr = (SmsMsgHdr_ST *)(((u8 *) cb->p) + cb->offset); | 35 | SmsMsgHdr_ST *phdr = (SmsMsgHdr_ST *)(((u8 *) cb->p) + cb->offset); |
36 | 36 | ||
37 | switch(phdr->msgType) { | 37 | switch (phdr->msgType) { |
38 | case MSG_SMS_DVBT_BDA_DATA: | 38 | case MSG_SMS_DVBT_BDA_DATA: |
39 | dvb_dmx_swfilter(&client->demux, (u8 *)(phdr + 1), | 39 | dvb_dmx_swfilter(&client->demux, (u8 *)(phdr + 1), |
40 | cb->size - sizeof(SmsMsgHdr_ST)); | 40 | cb->size - sizeof(SmsMsgHdr_ST)); |
@@ -49,8 +49,7 @@ int smsdvb_onresponse(void *context, smscore_buffer_t *cb) | |||
49 | SmsMsgStatisticsInfo_ST *p = | 49 | SmsMsgStatisticsInfo_ST *p = |
50 | (SmsMsgStatisticsInfo_ST *)(phdr + 1); | 50 | (SmsMsgStatisticsInfo_ST *)(phdr + 1); |
51 | 51 | ||
52 | if (p->Stat.IsDemodLocked) | 52 | if (p->Stat.IsDemodLocked) { |
53 | { | ||
54 | client->fe_status = FE_HAS_SIGNAL | | 53 | client->fe_status = FE_HAS_SIGNAL | |
55 | FE_HAS_CARRIER | | 54 | FE_HAS_CARRIER | |
56 | FE_HAS_VITERBI | | 55 | FE_HAS_VITERBI | |
@@ -85,7 +84,7 @@ int smsdvb_onresponse(void *context, smscore_buffer_t *cb) | |||
85 | 84 | ||
86 | void smsdvb_unregister_client(smsdvb_client_t *client) | 85 | void smsdvb_unregister_client(smsdvb_client_t *client) |
87 | { | 86 | { |
88 | // must be called under clientslock | 87 | /* must be called under clientslock */ |
89 | 88 | ||
90 | list_del(&client->entry); | 89 | list_del(&client->entry); |
91 | 90 | ||
@@ -243,13 +242,12 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe, | |||
243 | printk("%s freq %d band %d\n", __func__, | 242 | printk("%s freq %d band %d\n", __func__, |
244 | fep->frequency, fep->u.ofdm.bandwidth); | 243 | fep->frequency, fep->u.ofdm.bandwidth); |
245 | 244 | ||
246 | switch(fep->u.ofdm.bandwidth) | 245 | switch (fep->u.ofdm.bandwidth) { |
247 | { | 246 | case BANDWIDTH_8_MHZ: Msg.Data[1] = BW_8_MHZ; break; |
248 | case BANDWIDTH_8_MHZ: Msg.Data[1] = BW_8_MHZ; break; | 247 | case BANDWIDTH_7_MHZ: Msg.Data[1] = BW_7_MHZ; break; |
249 | case BANDWIDTH_7_MHZ: Msg.Data[1] = BW_7_MHZ; break; | 248 | case BANDWIDTH_6_MHZ: Msg.Data[1] = BW_6_MHZ; break; |
250 | case BANDWIDTH_6_MHZ: Msg.Data[1] = BW_6_MHZ; break; | 249 | case BANDWIDTH_AUTO: return -EOPNOTSUPP; |
251 | case BANDWIDTH_AUTO: return -EOPNOTSUPP; | 250 | default: return -EINVAL; |
252 | default: return -EINVAL; | ||
253 | } | 251 | } |
254 | 252 | ||
255 | return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), | 253 | return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg), |
@@ -263,7 +261,7 @@ static int smsdvb_get_frontend(struct dvb_frontend *fe, | |||
263 | 261 | ||
264 | printk("%s\n", __func__); | 262 | printk("%s\n", __func__); |
265 | 263 | ||
266 | // todo: | 264 | /* todo: */ |
267 | memcpy(fep, &client->fe_params, | 265 | memcpy(fep, &client->fe_params, |
268 | sizeof(struct dvb_frontend_parameters)); | 266 | sizeof(struct dvb_frontend_parameters)); |
269 | return 0; | 267 | return 0; |
@@ -271,7 +269,7 @@ static int smsdvb_get_frontend(struct dvb_frontend *fe, | |||
271 | 269 | ||
272 | static void smsdvb_release(struct dvb_frontend *fe) | 270 | static void smsdvb_release(struct dvb_frontend *fe) |
273 | { | 271 | { |
274 | // do nothing | 272 | /* do nothing */ |
275 | } | 273 | } |
276 | 274 | ||
277 | static struct dvb_frontend_ops smsdvb_fe_ops = { | 275 | static struct dvb_frontend_ops smsdvb_fe_ops = { |
@@ -310,7 +308,7 @@ int smsdvb_hotplug(smscore_device_t *coredev, | |||
310 | smsdvb_client_t *client; | 308 | smsdvb_client_t *client; |
311 | int rc; | 309 | int rc; |
312 | 310 | ||
313 | // device removal handled by onremove callback | 311 | /* device removal handled by onremove callback */ |
314 | if (!arrival) | 312 | if (!arrival) |
315 | return 0; | 313 | return 0; |
316 | 314 | ||
@@ -325,7 +323,7 @@ int smsdvb_hotplug(smscore_device_t *coredev, | |||
325 | return -ENOMEM; | 323 | return -ENOMEM; |
326 | } | 324 | } |
327 | 325 | ||
328 | // register dvb adapter | 326 | /* register dvb adapter */ |
329 | rc = dvb_register_adapter(&client->adapter, "Siano Digital Receiver", | 327 | rc = dvb_register_adapter(&client->adapter, "Siano Digital Receiver", |
330 | THIS_MODULE, device, adapter_nr); | 328 | THIS_MODULE, device, adapter_nr); |
331 | if (rc < 0) { | 329 | if (rc < 0) { |
@@ -333,9 +331,9 @@ int smsdvb_hotplug(smscore_device_t *coredev, | |||
333 | goto adapter_error; | 331 | goto adapter_error; |
334 | } | 332 | } |
335 | 333 | ||
336 | // init dvb demux | 334 | /* init dvb demux */ |
337 | client->demux.dmx.capabilities = DMX_TS_FILTERING; | 335 | client->demux.dmx.capabilities = DMX_TS_FILTERING; |
338 | client->demux.filternum = 32; // todo: nova ??? | 336 | client->demux.filternum = 32; /* todo: nova ??? */ |
339 | client->demux.feednum = 32; | 337 | client->demux.feednum = 32; |
340 | client->demux.start_feed = smsdvb_start_feed; | 338 | client->demux.start_feed = smsdvb_start_feed; |
341 | client->demux.stop_feed = smsdvb_stop_feed; | 339 | client->demux.stop_feed = smsdvb_stop_feed; |
@@ -346,7 +344,7 @@ int smsdvb_hotplug(smscore_device_t *coredev, | |||
346 | goto dvbdmx_error; | 344 | goto dvbdmx_error; |
347 | } | 345 | } |
348 | 346 | ||
349 | // init dmxdev | 347 | /* init dmxdev */ |
350 | client->dmxdev.filternum = 32; | 348 | client->dmxdev.filternum = 32; |
351 | client->dmxdev.demux = &client->demux.dmx; | 349 | client->dmxdev.demux = &client->demux.dmx; |
352 | client->dmxdev.capabilities = 0; | 350 | client->dmxdev.capabilities = 0; |
@@ -357,7 +355,7 @@ int smsdvb_hotplug(smscore_device_t *coredev, | |||
357 | goto dmxdev_error; | 355 | goto dmxdev_error; |
358 | } | 356 | } |
359 | 357 | ||
360 | // init and register frontend | 358 | /* init and register frontend */ |
361 | memcpy(&client->frontend.ops, &smsdvb_fe_ops, | 359 | memcpy(&client->frontend.ops, &smsdvb_fe_ops, |
362 | sizeof(struct dvb_frontend_ops)); | 360 | sizeof(struct dvb_frontend_ops)); |
363 | 361 | ||