diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-15 11:52:43 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-15 11:52:43 -0400 |
commit | bbdc222674cd21b02e30907cce29f7a8464303a5 (patch) | |
tree | a042893e8a75ce085703b18d36bee33d365c593a /linux/drivers/media/dvb/siano/smscoreapi.c | |
parent | f2aa3c590d42fba774c9c03387573f841266da7d (diff) | |
download | mediapointer-dvb-s2-bbdc222674cd21b02e30907cce29f7a8464303a5.tar.gz mediapointer-dvb-s2-bbdc222674cd21b02e30907cce29f7a8464303a5.tar.bz2 |
sms1xxx: more codingstyle cleanups
From: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/siano/smscoreapi.c')
-rw-r--r-- | linux/drivers/media/dvb/siano/smscoreapi.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/linux/drivers/media/dvb/siano/smscoreapi.c b/linux/drivers/media/dvb/siano/smscoreapi.c index 2619a0086..573d182e7 100644 --- a/linux/drivers/media/dvb/siano/smscoreapi.c +++ b/linux/drivers/media/dvb/siano/smscoreapi.c @@ -434,7 +434,7 @@ int smscore_register_device(smsdevice_params_t *params, /* prepare dma buffers */ for (buffer = dev->common_buffer; dev->num_buffers < params->num_buffers; - dev->num_buffers ++, buffer += params->buffer_size) { + dev->num_buffers++, buffer += params->buffer_size) { smscore_buffer_t *cb = smscore_createbuffer(buffer, dev->common_buffer, dev->common_buffer_phys); if (!cb) { smscore_unregister_device(dev); @@ -547,8 +547,7 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer, mem_address = *(u32 *) &payload[20]; } - while (size && rc >= 0) - { + while (size && rc >= 0) { SmsDataDownload_ST *DataMsg = (SmsDataDownload_ST *) msg; int payload_size = min((int) size, SMS_MAX_PAYLOAD_SIZE); @@ -578,11 +577,11 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer, sizeof(SmsMsgHdr_ST) + sizeof(u32) * 5); - TriggerMsg->msgData[0] = firmware->StartAddress; // Entry point - TriggerMsg->msgData[1] = 5; // Priority - TriggerMsg->msgData[2] = 0x200; // Stack size - TriggerMsg->msgData[3] = 0; // Parameter - TriggerMsg->msgData[4] = 4; // Task ID + TriggerMsg->msgData[0] = firmware->StartAddress; /* Entry point */ + TriggerMsg->msgData[1] = 5; /* Priority */ + TriggerMsg->msgData[2] = 0x200; /* Stack size */ + TriggerMsg->msgData[3] = 0; /* Parameter */ + TriggerMsg->msgData[4] = 4; /* Task ID */ if (coredev->device_flags & SMS_ROM_NO_RESPONSE) { rc = coredev->sendrequest_handler(coredev->context, TriggerMsg, TriggerMsg->xMsgHeader.msgLength); @@ -692,7 +691,7 @@ void smscore_unregister_device(smscore_device_t *coredev) while (1) { while ((cb = smscore_getbuffer(coredev))) { kfree(cb); - num_buffers ++; + num_buffers++; } if (num_buffers == coredev->num_buffers) break; @@ -892,14 +891,14 @@ smscore_client_t *smscore_find_client(smscore_device_t *coredev, int data_type, for (next = first->next; (next != first) && !client; next = next->next) { - firstid = &((smscore_client_t*)next)->idlist; + firstid = &((smscore_client_t *)next)->idlist; for (nextid = firstid->next; nextid != firstid; nextid = nextid->next) { - if ((((smscore_idlist_t*)nextid)->id == id) && - (((smscore_idlist_t*)nextid)->data_type == data_type || - (((smscore_idlist_t*)nextid)->data_type == 0))) { - client = (smscore_client_t*) next; + if ((((smscore_idlist_t *)nextid)->id == id) && + (((smscore_idlist_t *)nextid)->data_type == data_type || + (((smscore_idlist_t *)nextid)->data_type == 0))) { + client = (smscore_client_t *) next; break; } } @@ -931,8 +930,7 @@ void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb) if (!last_sample_time) last_sample_time = time_now; - if (time_now - last_sample_time > 10000) - { + if (time_now - last_sample_time > 10000) { printk("\n%s data rate %d bytes/secs\n", __func__, (int)((data_total * 1000) / (time_now - last_sample_time))); @@ -1050,9 +1048,9 @@ int smscore_validate_client(smscore_device_t *coredev, return -EFAULT; } registered_client = smscore_find_client(coredev, data_type, id); - if (registered_client == client) { + if (registered_client == client) return 0; - } + if (registered_client) { PERROR("The msg ID already registered to another client.\n"); return -EEXIST; @@ -1130,7 +1128,7 @@ void smscore_unregister_client(smscore_client_t *client) while (!list_empty(&client->idlist)) { smscore_idlist_t *identry = - (smscore_idlist_t*) client->idlist.next; + (smscore_idlist_t *) client->idlist.next; list_del(&identry->entry); kfree(identry); } |