Commit a83ccdd6 authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab

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: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 3617691f
...@@ -112,7 +112,7 @@ static int default_mode = 1; ...@@ -112,7 +112,7 @@ static int default_mode = 1;
module_param(default_mode, int, 0644); module_param(default_mode, int, 0644);
MODULE_PARM_DESC(default_mode, "default firmware id (device mode)"); MODULE_PARM_DESC(default_mode, "default firmware id (device mode)");
int smscore_registry_getmode(char* devpath) int smscore_registry_getmode(char *devpath)
{ {
smscore_registry_entry_t *entry; smscore_registry_entry_t *entry;
struct list_head *next; struct list_head *next;
...@@ -144,7 +144,7 @@ int smscore_registry_getmode(char* devpath) ...@@ -144,7 +144,7 @@ int smscore_registry_getmode(char* devpath)
return default_mode; return default_mode;
} }
void smscore_registry_setmode(char* devpath, int mode) void smscore_registry_setmode(char *devpath, int mode)
{ {
smscore_registry_entry_t *entry; smscore_registry_entry_t *entry;
struct list_head *next; struct list_head *next;
...@@ -166,7 +166,8 @@ void smscore_registry_setmode(char* devpath, int mode) ...@@ -166,7 +166,8 @@ void smscore_registry_setmode(char* devpath, int mode)
} }
void list_add_locked(struct list_head *new, struct list_head *head, spinlock_t* lock) void list_add_locked(struct list_head *new, struct list_head *head,
spinlock_t *lock)
{ {
unsigned long flags; unsigned long flags;
...@@ -251,7 +252,7 @@ void smscore_unregister_hotplug(hotplug_t hotplug) ...@@ -251,7 +252,7 @@ void smscore_unregister_hotplug(hotplug_t hotplug)
void smscore_notify_clients(smscore_device_t *coredev) void smscore_notify_clients(smscore_device_t *coredev)
{ {
smscore_client_t* client; smscore_client_t *client;
// the client must call smscore_unregister_client from remove handler // the client must call smscore_unregister_client from remove handler
while (!list_empty(&coredev->clients)) while (!list_empty(&coredev->clients))
...@@ -280,7 +281,8 @@ int smscore_notify_callbacks(smscore_device_t *coredev, struct device *device, i ...@@ -280,7 +281,8 @@ int smscore_notify_callbacks(smscore_device_t *coredev, struct device *device, i
return rc; return rc;
} }
smscore_buffer_t *smscore_createbuffer(u8* buffer, void* common_buffer, dma_addr_t common_buffer_phys) smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
dma_addr_t common_buffer_phys)
{ {
smscore_buffer_t *cb = kmalloc(sizeof(smscore_buffer_t), GFP_KERNEL); smscore_buffer_t *cb = kmalloc(sizeof(smscore_buffer_t), GFP_KERNEL);
if (!cb) if (!cb)
...@@ -307,7 +309,7 @@ smscore_buffer_t *smscore_createbuffer(u8* buffer, void* common_buffer, dma_addr ...@@ -307,7 +309,7 @@ smscore_buffer_t *smscore_createbuffer(u8* buffer, void* common_buffer, dma_addr
*/ */
int smscore_register_device(smsdevice_params_t *params, smscore_device_t **coredev) int smscore_register_device(smsdevice_params_t *params, smscore_device_t **coredev)
{ {
smscore_device_t* dev; smscore_device_t *dev;
u8 *buffer; u8 *buffer;
dev = kzalloc(sizeof(smscore_device_t), GFP_KERNEL); dev = kzalloc(sizeof(smscore_device_t), GFP_KERNEL);
...@@ -409,7 +411,8 @@ int smscore_start_device(smscore_device_t *coredev) ...@@ -409,7 +411,8 @@ int smscore_start_device(smscore_device_t *coredev)
return rc; return rc;
} }
int smscore_sendrequest_and_wait(smscore_device_t *coredev, void* buffer, size_t size, struct completion *completion) int smscore_sendrequest_and_wait(smscore_device_t *coredev, void *buffer,
size_t size, struct completion *completion)
{ {
int rc = coredev->sendrequest_handler(coredev->context, buffer, size); int rc = coredev->sendrequest_handler(coredev->context, buffer, size);
if (rc < 0) if (rc < 0)
...@@ -423,7 +426,7 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer, size_ ...@@ -423,7 +426,7 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer, size_
SmsFirmware_ST* firmware = (SmsFirmware_ST*) buffer; SmsFirmware_ST* firmware = (SmsFirmware_ST*) buffer;
SmsMsgHdr_ST *msg; SmsMsgHdr_ST *msg;
UINT32 mem_address = firmware->StartAddress; UINT32 mem_address = firmware->StartAddress;
u8* payload = firmware->Payload; u8 *payload = firmware->Payload;
int rc = 0; int rc = 0;
if (coredev->preload_handler) if (coredev->preload_handler)
...@@ -513,12 +516,13 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer, size_ ...@@ -513,12 +516,13 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer, size_
* *
* @return 0 on success, <0 on error. * @return 0 on success, <0 on error.
*/ */
int smscore_load_firmware(smscore_device_t *coredev, char* filename, loadfirmware_t loadfirmware_handler) int smscore_load_firmware(smscore_device_t *coredev, char *filename,
loadfirmware_t loadfirmware_handler)
{ {
int rc = -ENOENT; int rc = -ENOENT;
const struct firmware *fw; const struct firmware *fw;
u8* fw_buffer; u8 *fw_buffer;
if (loadfirmware_handler == NULL && !(coredev->device_flags & SMS_DEVICE_FAMILY2)) if (loadfirmware_handler == NULL && !(coredev->device_flags & SMS_DEVICE_FAMILY2))
return -EINVAL; return -EINVAL;
...@@ -739,7 +743,8 @@ int smscore_get_device_mode(smscore_device_t *coredev) ...@@ -739,7 +743,8 @@ int smscore_get_device_mode(smscore_device_t *coredev)
return coredev->mode; return coredev->mode;
} }
smscore_client_t* smscore_getclient_by_type(smscore_device_t *coredev, int data_type) smscore_client_t *smscore_getclient_by_type(smscore_device_t *coredev,
int data_type)
{ {
smscore_client_t *client = NULL; smscore_client_t *client = NULL;
struct list_head *next, *first; struct list_head *next, *first;
...@@ -766,7 +771,7 @@ smscore_client_t* smscore_getclient_by_type(smscore_device_t *coredev, int data_ ...@@ -766,7 +771,7 @@ smscore_client_t* smscore_getclient_by_type(smscore_device_t *coredev, int data_
return client; return client;
} }
smscore_client_t* smscore_getclient_by_id(smscore_device_t *coredev, int id) smscore_client_t *smscore_getclient_by_id(smscore_device_t *coredev, int id)
{ {
smscore_client_t *client = NULL; smscore_client_t *client = NULL;
struct list_head *next, *first; struct list_head *next, *first;
...@@ -801,7 +806,8 @@ smscore_client_t* smscore_getclient_by_id(smscore_device_t *coredev, int id) ...@@ -801,7 +806,8 @@ smscore_client_t* smscore_getclient_by_id(smscore_device_t *coredev, int id)
void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb) void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb)
{ {
SmsMsgHdr_ST *phdr = (SmsMsgHdr_ST *)((u8*) cb->p + cb->offset); SmsMsgHdr_ST *phdr = (SmsMsgHdr_ST *)((u8*) cb->p + cb->offset);
smscore_client_t * client = smscore_getclient_by_type(coredev, phdr->msgType); smscore_client_t *client = smscore_getclient_by_type(coredev,
phdr->msgType);
int rc = -EBUSY; int rc = -EBUSY;
static unsigned long last_sample_time = 0; static unsigned long last_sample_time = 0;
...@@ -957,7 +963,7 @@ int smscore_validate_client(smscore_device_t *coredev, smscore_client_t *client, ...@@ -957,7 +963,7 @@ int smscore_validate_client(smscore_device_t *coredev, smscore_client_t *client,
*/ */
int smscore_register_client(smscore_device_t *coredev, smsclient_params_t *params, smscore_client_t **client) int smscore_register_client(smscore_device_t *coredev, smsclient_params_t *params, smscore_client_t **client)
{ {
smscore_client_t* newclient; smscore_client_t *newclient;
int rc; int rc;
// check that no other channel with same data type exists // check that no other channel with same data type exists
...@@ -1039,7 +1045,7 @@ void smscore_unregister_client(smscore_client_t *client) ...@@ -1039,7 +1045,7 @@ void smscore_unregister_client(smscore_client_t *client)
*/ */
int smsclient_sendrequest(smscore_client_t *client, void *buffer, size_t size) int smsclient_sendrequest(smscore_client_t *client, void *buffer, size_t size)
{ {
smscore_device_t* coredev = client->coredev; smscore_device_t *coredev = client->coredev;
SmsMsgHdr_ST* phdr = (SmsMsgHdr_ST*) buffer; SmsMsgHdr_ST* phdr = (SmsMsgHdr_ST*) buffer;
// check that no other channel with same id exists // check that no other channel with same id exists
...@@ -1070,7 +1076,8 @@ int smscore_get_common_buffer_size(smscore_device_t *coredev) ...@@ -1070,7 +1076,8 @@ int smscore_get_common_buffer_size(smscore_device_t *coredev)
* *
* @return 0 on success, <0 on error. * @return 0 on success, <0 on error.
*/ */
int smscore_map_common_buffer(smscore_device_t *coredev, struct vm_area_struct * vma) int smscore_map_common_buffer(smscore_device_t *coredev,
struct vm_area_struct *vma)
{ {
unsigned long end = vma->vm_end, start = vma->vm_start, size = PAGE_ALIGN(coredev->common_buffer_size); unsigned long end = vma->vm_end, start = vma->vm_start, size = PAGE_ALIGN(coredev->common_buffer_size);
......
...@@ -503,19 +503,23 @@ extern int smscore_register_device(smsdevice_params_t *params, smscore_device_t ...@@ -503,19 +503,23 @@ extern int smscore_register_device(smsdevice_params_t *params, smscore_device_t
extern void smscore_unregister_device(smscore_device_t *coredev); extern void smscore_unregister_device(smscore_device_t *coredev);
extern int smscore_start_device(smscore_device_t *coredev); extern int smscore_start_device(smscore_device_t *coredev);
extern int smscore_load_firmware(smscore_device_t *coredev, char* filename, loadfirmware_t loadfirmware_handler); extern int smscore_load_firmware(smscore_device_t *coredev, char *filename,
loadfirmware_t loadfirmware_handler);
extern int smscore_set_device_mode(smscore_device_t *coredev, int mode); extern int smscore_set_device_mode(smscore_device_t *coredev, int mode);
extern int smscore_get_device_mode(smscore_device_t *coredev); extern int smscore_get_device_mode(smscore_device_t *coredev);
extern int smscore_register_client(smscore_device_t *coredev, smsclient_params_t* params, smscore_client_t **client); extern int smscore_register_client(smscore_device_t *coredev,
smsclient_params_t *params,
smscore_client_t **client);
extern void smscore_unregister_client(smscore_client_t *client); extern void smscore_unregister_client(smscore_client_t *client);
extern int smsclient_sendrequest(smscore_client_t *client, void *buffer, size_t size); extern int smsclient_sendrequest(smscore_client_t *client, void *buffer, size_t size);
extern void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb); extern void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb);
extern int smscore_get_common_buffer_size(smscore_device_t *coredev); extern int smscore_get_common_buffer_size(smscore_device_t *coredev);
extern int smscore_map_common_buffer(smscore_device_t *coredev, struct vm_area_struct * vma); extern int smscore_map_common_buffer(smscore_device_t *coredev,
struct vm_area_struct *vma);
extern smscore_buffer_t *smscore_getbuffer(smscore_device_t *coredev); extern smscore_buffer_t *smscore_getbuffer(smscore_device_t *coredev);
extern void smscore_putbuffer(smscore_device_t *coredev, smscore_buffer_t *cb); extern void smscore_putbuffer(smscore_device_t *coredev, smscore_buffer_t *cb);
......
...@@ -79,7 +79,7 @@ int smsdvb_onresponse(void *context, smscore_buffer_t *cb) ...@@ -79,7 +79,7 @@ int smsdvb_onresponse(void *context, smscore_buffer_t *cb)
return 0; return 0;
} }
void smsdvb_unregister_client(smsdvb_client_t* client) void smsdvb_unregister_client(smsdvb_client_t *client)
{ {
// must be called under clientslock // must be called under clientslock
...@@ -136,7 +136,9 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed) ...@@ -136,7 +136,9 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed)
return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg));
} }
static int smsdvb_sendrequest_and_wait(smsdvb_client_t *client, void* buffer, size_t size, struct completion *completion) static int smsdvb_sendrequest_and_wait(smsdvb_client_t *client,
void *buffer, size_t size,
struct completion *completion)
{ {
int rc = smsclient_sendrequest(client->smsclient, buffer, size); int rc = smsclient_sendrequest(client->smsclient, buffer, size);
if (rc < 0) if (rc < 0)
...@@ -283,10 +285,11 @@ static struct dvb_frontend_ops smsdvb_fe_ops = { ...@@ -283,10 +285,11 @@ static struct dvb_frontend_ops smsdvb_fe_ops = {
.read_snr = smsdvb_read_snr, .read_snr = smsdvb_read_snr,
}; };
int smsdvb_hotplug(smscore_device_t *coredev, struct device* device, int arrival) int smsdvb_hotplug(smscore_device_t *coredev, struct device *device,
int arrival)
{ {
smsclient_params_t params; smsclient_params_t params;
smsdvb_client_t* client; smsdvb_client_t *client;
int rc; int rc;
// device removal handled by onremove callback // device removal handled by onremove callback
......
...@@ -44,7 +44,7 @@ typedef struct _smsusb_urb ...@@ -44,7 +44,7 @@ typedef struct _smsusb_urb
typedef struct _smsusb_device typedef struct _smsusb_device
{ {
struct usb_device* udev; struct usb_device *udev;
smscore_device_t *coredev; smscore_device_t *coredev;
smsusb_urb_t surbs[MAX_URBS]; smsusb_urb_t surbs[MAX_URBS];
...@@ -53,7 +53,7 @@ typedef struct _smsusb_device ...@@ -53,7 +53,7 @@ typedef struct _smsusb_device
int buffer_size; int buffer_size;
} *psmsusb_device_t; } *psmsusb_device_t;
int smsusb_submit_urb(smsusb_device_t* dev, smsusb_urb_t* surb); int smsusb_submit_urb(smsusb_device_t *dev, smsusb_urb_t *surb);
void smsusb_onresponse(struct urb *urb) void smsusb_onresponse(struct urb *urb)
{ {
...@@ -104,7 +104,7 @@ void smsusb_onresponse(struct urb *urb) ...@@ -104,7 +104,7 @@ void smsusb_onresponse(struct urb *urb)
smsusb_submit_urb(dev, surb); smsusb_submit_urb(dev, surb);
} }
int smsusb_submit_urb(smsusb_device_t* dev, smsusb_urb_t* surb) int smsusb_submit_urb(smsusb_device_t *dev, smsusb_urb_t *surb)
{ {
if (!surb->cb) if (!surb->cb)
{ {
...@@ -131,7 +131,7 @@ int smsusb_submit_urb(smsusb_device_t* dev, smsusb_urb_t* surb) ...@@ -131,7 +131,7 @@ int smsusb_submit_urb(smsusb_device_t* dev, smsusb_urb_t* surb)
return usb_submit_urb(&surb->urb, GFP_ATOMIC); return usb_submit_urb(&surb->urb, GFP_ATOMIC);
} }
void smsusb_stop_streaming(smsusb_device_t* dev) void smsusb_stop_streaming(smsusb_device_t *dev)
{ {
int i; int i;
...@@ -147,7 +147,7 @@ void smsusb_stop_streaming(smsusb_device_t* dev) ...@@ -147,7 +147,7 @@ void smsusb_stop_streaming(smsusb_device_t* dev)
} }
} }
int smsusb_start_streaming(smsusb_device_t* dev) int smsusb_start_streaming(smsusb_device_t *dev)
{ {
int i, rc; int i, rc;
...@@ -167,7 +167,7 @@ int smsusb_start_streaming(smsusb_device_t* dev) ...@@ -167,7 +167,7 @@ int smsusb_start_streaming(smsusb_device_t* dev)
int smsusb_sendrequest(void *context, void *buffer, size_t size) int smsusb_sendrequest(void *context, void *buffer, size_t size)
{ {
smsusb_device_t* dev = (smsusb_device_t*) context; smsusb_device_t *dev = (smsusb_device_t *) context;
int dummy; int dummy;
return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), buffer, size, &dummy, 1000); return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), buffer, size, &dummy, 1000);
...@@ -185,7 +185,7 @@ char *smsusb1_fw_lkup[] = ...@@ -185,7 +185,7 @@ char *smsusb1_fw_lkup[] =
int smsusb1_load_firmware(struct usb_device *udev, int id) int smsusb1_load_firmware(struct usb_device *udev, int id)
{ {
const struct firmware *fw; const struct firmware *fw;
u8* fw_buffer; u8 *fw_buffer;
int rc, dummy; int rc, dummy;
if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA)
...@@ -285,7 +285,7 @@ void smsusb_term_device(struct usb_interface *intf) ...@@ -285,7 +285,7 @@ void smsusb_term_device(struct usb_interface *intf)
int smsusb_init_device(struct usb_interface *intf) int smsusb_init_device(struct usb_interface *intf)
{ {
smsdevice_params_t params; smsdevice_params_t params;
smsusb_device_t* dev; smsusb_device_t *dev;
int i, rc; int i, rc;
// create device object // create device object
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment