aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-05-06 02:11:51 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:21:01 -0400
commita83ccdd6a952eb25d3f51dfdc175c1e9bf8f7cae (patch)
tree0e02f95689fb357a986f5cd17e9c9135fd588fc7
parent3617691fb98b81850640a9b61fb932b798ad4504 (diff)
V4L/DVB (8275): sms1xxx: codingstyle cleanup: "foo* bar"/"foo * bar" should be "foo *bar"
ERROR: "foo* bar" should be "foo *bar" ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/dvb/siano/smscoreapi.c39
-rw-r--r--drivers/media/dvb/siano/smscoreapi.h10
-rw-r--r--drivers/media/dvb/siano/smsdvb.c11
-rw-r--r--drivers/media/dvb/siano/smsusb.c16
4 files changed, 45 insertions, 31 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c
index e55138e6627a..86a4b5de5e1c 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -112,7 +112,7 @@ static int default_mode = 1;
112module_param(default_mode, int, 0644); 112module_param(default_mode, int, 0644);
113MODULE_PARM_DESC(default_mode, "default firmware id (device mode)"); 113MODULE_PARM_DESC(default_mode, "default firmware id (device mode)");
114 114
115int smscore_registry_getmode(char* devpath) 115int smscore_registry_getmode(char *devpath)
116{ 116{
117 smscore_registry_entry_t *entry; 117 smscore_registry_entry_t *entry;
118 struct list_head *next; 118 struct list_head *next;
@@ -144,7 +144,7 @@ int smscore_registry_getmode(char* devpath)
144 return default_mode; 144 return default_mode;
145} 145}
146 146
147void smscore_registry_setmode(char* devpath, int mode) 147void smscore_registry_setmode(char *devpath, int mode)
148{ 148{
149 smscore_registry_entry_t *entry; 149 smscore_registry_entry_t *entry;
150 struct list_head *next; 150 struct list_head *next;
@@ -166,7 +166,8 @@ void smscore_registry_setmode(char* devpath, int mode)
166} 166}
167 167
168 168
169void list_add_locked(struct list_head *new, struct list_head *head, spinlock_t* lock) 169void list_add_locked(struct list_head *new, struct list_head *head,
170 spinlock_t *lock)
170{ 171{
171 unsigned long flags; 172 unsigned long flags;
172 173
@@ -251,7 +252,7 @@ void smscore_unregister_hotplug(hotplug_t hotplug)
251 252
252void smscore_notify_clients(smscore_device_t *coredev) 253void smscore_notify_clients(smscore_device_t *coredev)
253{ 254{
254 smscore_client_t* client; 255 smscore_client_t *client;
255 256
256 // the client must call smscore_unregister_client from remove handler 257 // the client must call smscore_unregister_client from remove handler
257 while (!list_empty(&coredev->clients)) 258 while (!list_empty(&coredev->clients))
@@ -280,7 +281,8 @@ int smscore_notify_callbacks(smscore_device_t *coredev, struct device *device, i
280 return rc; 281 return rc;
281} 282}
282 283
283smscore_buffer_t *smscore_createbuffer(u8* buffer, void* common_buffer, dma_addr_t common_buffer_phys) 284smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
285 dma_addr_t common_buffer_phys)
284{ 286{
285 smscore_buffer_t *cb = kmalloc(sizeof(smscore_buffer_t), GFP_KERNEL); 287 smscore_buffer_t *cb = kmalloc(sizeof(smscore_buffer_t), GFP_KERNEL);
286 if (!cb) 288 if (!cb)
@@ -307,7 +309,7 @@ smscore_buffer_t *smscore_createbuffer(u8* buffer, void* common_buffer, dma_addr
307 */ 309 */
308int smscore_register_device(smsdevice_params_t *params, smscore_device_t **coredev) 310int smscore_register_device(smsdevice_params_t *params, smscore_device_t **coredev)
309{ 311{
310 smscore_device_t* dev; 312 smscore_device_t *dev;
311 u8 *buffer; 313 u8 *buffer;
312 314
313 dev = kzalloc(sizeof(smscore_device_t), GFP_KERNEL); 315 dev = kzalloc(sizeof(smscore_device_t), GFP_KERNEL);
@@ -409,7 +411,8 @@ int smscore_start_device(smscore_device_t *coredev)
409 return rc; 411 return rc;
410} 412}
411 413
412int smscore_sendrequest_and_wait(smscore_device_t *coredev, void* buffer, size_t size, struct completion *completion) 414int smscore_sendrequest_and_wait(smscore_device_t *coredev, void *buffer,
415 size_t size, struct completion *completion)
413{ 416{
414 int rc = coredev->sendrequest_handler(coredev->context, buffer, size); 417 int rc = coredev->sendrequest_handler(coredev->context, buffer, size);
415 if (rc < 0) 418 if (rc < 0)
@@ -423,7 +426,7 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer, size_
423 SmsFirmware_ST* firmware = (SmsFirmware_ST*) buffer; 426 SmsFirmware_ST* firmware = (SmsFirmware_ST*) buffer;
424 SmsMsgHdr_ST *msg; 427 SmsMsgHdr_ST *msg;
425 UINT32 mem_address = firmware->StartAddress; 428 UINT32 mem_address = firmware->StartAddress;
426 u8* payload = firmware->Payload; 429 u8 *payload = firmware->Payload;
427 int rc = 0; 430 int rc = 0;
428 431
429 if (coredev->preload_handler) 432 if (coredev->preload_handler)
@@ -513,12 +516,13 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer, size_
513 * 516 *
514 * @return 0 on success, <0 on error. 517 * @return 0 on success, <0 on error.
515 */ 518 */
516int smscore_load_firmware(smscore_device_t *coredev, char* filename, loadfirmware_t loadfirmware_handler) 519int smscore_load_firmware(smscore_device_t *coredev, char *filename,
520 loadfirmware_t loadfirmware_handler)
517{ 521{
518 int rc = -ENOENT; 522 int rc = -ENOENT;
519 523
520 const struct firmware *fw; 524 const struct firmware *fw;
521 u8* fw_buffer; 525 u8 *fw_buffer;
522 526
523 if (loadfirmware_handler == NULL && !(coredev->device_flags & SMS_DEVICE_FAMILY2)) 527 if (loadfirmware_handler == NULL && !(coredev->device_flags & SMS_DEVICE_FAMILY2))
524 return -EINVAL; 528 return -EINVAL;
@@ -739,7 +743,8 @@ int smscore_get_device_mode(smscore_device_t *coredev)
739 return coredev->mode; 743 return coredev->mode;
740} 744}
741 745
742smscore_client_t* smscore_getclient_by_type(smscore_device_t *coredev, int data_type) 746smscore_client_t *smscore_getclient_by_type(smscore_device_t *coredev,
747 int data_type)
743{ 748{
744 smscore_client_t *client = NULL; 749 smscore_client_t *client = NULL;
745 struct list_head *next, *first; 750 struct list_head *next, *first;
@@ -766,7 +771,7 @@ smscore_client_t* smscore_getclient_by_type(smscore_device_t *coredev, int data_
766 return client; 771 return client;
767} 772}
768 773
769smscore_client_t* smscore_getclient_by_id(smscore_device_t *coredev, int id) 774smscore_client_t *smscore_getclient_by_id(smscore_device_t *coredev, int id)
770{ 775{
771 smscore_client_t *client = NULL; 776 smscore_client_t *client = NULL;
772 struct list_head *next, *first; 777 struct list_head *next, *first;
@@ -801,7 +806,8 @@ smscore_client_t* smscore_getclient_by_id(smscore_device_t *coredev, int id)
801void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb) 806void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb)
802{ 807{
803 SmsMsgHdr_ST *phdr = (SmsMsgHdr_ST *)((u8*) cb->p + cb->offset); 808 SmsMsgHdr_ST *phdr = (SmsMsgHdr_ST *)((u8*) cb->p + cb->offset);
804 smscore_client_t * client = smscore_getclient_by_type(coredev, phdr->msgType); 809 smscore_client_t *client = smscore_getclient_by_type(coredev,
810 phdr->msgType);
805 int rc = -EBUSY; 811 int rc = -EBUSY;
806 812
807 static unsigned long last_sample_time = 0; 813 static unsigned long last_sample_time = 0;
@@ -957,7 +963,7 @@ int smscore_validate_client(smscore_device_t *coredev, smscore_client_t *client,
957 */ 963 */
958int smscore_register_client(smscore_device_t *coredev, smsclient_params_t *params, smscore_client_t **client) 964int smscore_register_client(smscore_device_t *coredev, smsclient_params_t *params, smscore_client_t **client)
959{ 965{
960 smscore_client_t* newclient; 966 smscore_client_t *newclient;
961 int rc; 967 int rc;
962 968
963 // check that no other channel with same data type exists 969 // check that no other channel with same data type exists
@@ -1039,7 +1045,7 @@ void smscore_unregister_client(smscore_client_t *client)
1039 */ 1045 */
1040int smsclient_sendrequest(smscore_client_t *client, void *buffer, size_t size) 1046int smsclient_sendrequest(smscore_client_t *client, void *buffer, size_t size)
1041{ 1047{
1042 smscore_device_t* coredev = client->coredev; 1048 smscore_device_t *coredev = client->coredev;
1043 SmsMsgHdr_ST* phdr = (SmsMsgHdr_ST*) buffer; 1049 SmsMsgHdr_ST* phdr = (SmsMsgHdr_ST*) buffer;
1044 1050
1045 // check that no other channel with same id exists 1051 // check that no other channel with same id exists
@@ -1070,7 +1076,8 @@ int smscore_get_common_buffer_size(smscore_device_t *coredev)
1070 * 1076 *
1071 * @return 0 on success, <0 on error. 1077 * @return 0 on success, <0 on error.
1072 */ 1078 */
1073int smscore_map_common_buffer(smscore_device_t *coredev, struct vm_area_struct * vma) 1079int smscore_map_common_buffer(smscore_device_t *coredev,
1080 struct vm_area_struct *vma)
1074{ 1081{
1075 unsigned long end = vma->vm_end, start = vma->vm_start, size = PAGE_ALIGN(coredev->common_buffer_size); 1082 unsigned long end = vma->vm_end, start = vma->vm_start, size = PAGE_ALIGN(coredev->common_buffer_size);
1076 1083
diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h
index 679487df8a53..e44507417d28 100644
--- a/drivers/media/dvb/siano/smscoreapi.h
+++ b/drivers/media/dvb/siano/smscoreapi.h
@@ -503,19 +503,23 @@ extern int smscore_register_device(smsdevice_params_t *params, smscore_device_t
503extern void smscore_unregister_device(smscore_device_t *coredev); 503extern void smscore_unregister_device(smscore_device_t *coredev);
504 504
505extern int smscore_start_device(smscore_device_t *coredev); 505extern int smscore_start_device(smscore_device_t *coredev);
506extern int smscore_load_firmware(smscore_device_t *coredev, char* filename, loadfirmware_t loadfirmware_handler); 506extern int smscore_load_firmware(smscore_device_t *coredev, char *filename,
507 loadfirmware_t loadfirmware_handler);
507 508
508extern int smscore_set_device_mode(smscore_device_t *coredev, int mode); 509extern int smscore_set_device_mode(smscore_device_t *coredev, int mode);
509extern int smscore_get_device_mode(smscore_device_t *coredev); 510extern int smscore_get_device_mode(smscore_device_t *coredev);
510 511
511extern int smscore_register_client(smscore_device_t *coredev, smsclient_params_t* params, smscore_client_t **client); 512extern int smscore_register_client(smscore_device_t *coredev,
513 smsclient_params_t *params,
514 smscore_client_t **client);
512extern void smscore_unregister_client(smscore_client_t *client); 515extern void smscore_unregister_client(smscore_client_t *client);
513 516
514extern int smsclient_sendrequest(smscore_client_t *client, void *buffer, size_t size); 517extern int smsclient_sendrequest(smscore_client_t *client, void *buffer, size_t size);
515extern void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb); 518extern void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb);
516 519
517extern int smscore_get_common_buffer_size(smscore_device_t *coredev); 520extern int smscore_get_common_buffer_size(smscore_device_t *coredev);
518extern int smscore_map_common_buffer(smscore_device_t *coredev, struct vm_area_struct * vma); 521extern int smscore_map_common_buffer(smscore_device_t *coredev,
522 struct vm_area_struct *vma);
519 523
520extern smscore_buffer_t *smscore_getbuffer(smscore_device_t *coredev); 524extern smscore_buffer_t *smscore_getbuffer(smscore_device_t *coredev);
521extern void smscore_putbuffer(smscore_device_t *coredev, smscore_buffer_t *cb); 525extern void smscore_putbuffer(smscore_device_t *coredev, smscore_buffer_t *cb);
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c
index 1a75033c35de..717e0e97fd1f 100644
--- a/drivers/media/dvb/siano/smsdvb.c
+++ b/drivers/media/dvb/siano/smsdvb.c
@@ -79,7 +79,7 @@ int smsdvb_onresponse(void *context, smscore_buffer_t *cb)
79 return 0; 79 return 0;
80} 80}
81 81
82void smsdvb_unregister_client(smsdvb_client_t* client) 82void smsdvb_unregister_client(smsdvb_client_t *client)
83{ 83{
84 // must be called under clientslock 84 // must be called under clientslock
85 85
@@ -136,7 +136,9 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed)
136 return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); 136 return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg));
137} 137}
138 138
139static int smsdvb_sendrequest_and_wait(smsdvb_client_t *client, void* buffer, size_t size, struct completion *completion) 139static int smsdvb_sendrequest_and_wait(smsdvb_client_t *client,
140 void *buffer, size_t size,
141 struct completion *completion)
140{ 142{
141 int rc = smsclient_sendrequest(client->smsclient, buffer, size); 143 int rc = smsclient_sendrequest(client->smsclient, buffer, size);
142 if (rc < 0) 144 if (rc < 0)
@@ -283,10 +285,11 @@ static struct dvb_frontend_ops smsdvb_fe_ops = {
283 .read_snr = smsdvb_read_snr, 285 .read_snr = smsdvb_read_snr,
284}; 286};
285 287
286int smsdvb_hotplug(smscore_device_t *coredev, struct device* device, int arrival) 288int smsdvb_hotplug(smscore_device_t *coredev, struct device *device,
289 int arrival)
287{ 290{
288 smsclient_params_t params; 291 smsclient_params_t params;
289 smsdvb_client_t* client; 292 smsdvb_client_t *client;
290 int rc; 293 int rc;
291 294
292 // device removal handled by onremove callback 295 // device removal handled by onremove callback
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c
index e15f0342d069..87dda39a7985 100644
--- a/drivers/media/dvb/siano/smsusb.c
+++ b/drivers/media/dvb/siano/smsusb.c
@@ -44,7 +44,7 @@ typedef struct _smsusb_urb
44 44
45typedef struct _smsusb_device 45typedef struct _smsusb_device
46{ 46{
47 struct usb_device* udev; 47 struct usb_device *udev;
48 smscore_device_t *coredev; 48 smscore_device_t *coredev;
49 49
50 smsusb_urb_t surbs[MAX_URBS]; 50 smsusb_urb_t surbs[MAX_URBS];
@@ -53,7 +53,7 @@ typedef struct _smsusb_device
53 int buffer_size; 53 int buffer_size;
54} *psmsusb_device_t; 54} *psmsusb_device_t;
55 55
56int smsusb_submit_urb(smsusb_device_t* dev, smsusb_urb_t* surb); 56int smsusb_submit_urb(smsusb_device_t *dev, smsusb_urb_t *surb);
57 57
58void smsusb_onresponse(struct urb *urb) 58void smsusb_onresponse(struct urb *urb)
59{ 59{
@@ -104,7 +104,7 @@ exit_and_resubmit:
104 smsusb_submit_urb(dev, surb); 104 smsusb_submit_urb(dev, surb);
105} 105}
106 106
107int smsusb_submit_urb(smsusb_device_t* dev, smsusb_urb_t* surb) 107int smsusb_submit_urb(smsusb_device_t *dev, smsusb_urb_t *surb)
108{ 108{
109 if (!surb->cb) 109 if (!surb->cb)
110 { 110 {
@@ -131,7 +131,7 @@ int smsusb_submit_urb(smsusb_device_t* dev, smsusb_urb_t* surb)
131 return usb_submit_urb(&surb->urb, GFP_ATOMIC); 131 return usb_submit_urb(&surb->urb, GFP_ATOMIC);
132} 132}
133 133
134void smsusb_stop_streaming(smsusb_device_t* dev) 134void smsusb_stop_streaming(smsusb_device_t *dev)
135{ 135{
136 int i; 136 int i;
137 137
@@ -147,7 +147,7 @@ void smsusb_stop_streaming(smsusb_device_t* dev)
147 } 147 }
148} 148}
149 149
150int smsusb_start_streaming(smsusb_device_t* dev) 150int smsusb_start_streaming(smsusb_device_t *dev)
151{ 151{
152 int i, rc; 152 int i, rc;
153 153
@@ -167,7 +167,7 @@ int smsusb_start_streaming(smsusb_device_t* dev)
167 167
168int smsusb_sendrequest(void *context, void *buffer, size_t size) 168int smsusb_sendrequest(void *context, void *buffer, size_t size)
169{ 169{
170 smsusb_device_t* dev = (smsusb_device_t*) context; 170 smsusb_device_t *dev = (smsusb_device_t *) context;
171 int dummy; 171 int dummy;
172 172
173 return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), buffer, size, &dummy, 1000); 173 return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), buffer, size, &dummy, 1000);
@@ -185,7 +185,7 @@ char *smsusb1_fw_lkup[] =
185int smsusb1_load_firmware(struct usb_device *udev, int id) 185int smsusb1_load_firmware(struct usb_device *udev, int id)
186{ 186{
187 const struct firmware *fw; 187 const struct firmware *fw;
188 u8* fw_buffer; 188 u8 *fw_buffer;
189 int rc, dummy; 189 int rc, dummy;
190 190
191 if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) 191 if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA)
@@ -285,7 +285,7 @@ void smsusb_term_device(struct usb_interface *intf)
285int smsusb_init_device(struct usb_interface *intf) 285int smsusb_init_device(struct usb_interface *intf)
286{ 286{
287 smsdevice_params_t params; 287 smsdevice_params_t params;
288 smsusb_device_t* dev; 288 smsusb_device_t *dev;
289 int i, rc; 289 int i, rc;
290 290
291 // create device object 291 // create device object