diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-20 22:44:02 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-20 22:44:02 -0400 |
commit | 64705827cbd42718a7e2cadc3913a4f2cd4f81f6 (patch) | |
tree | f966ca2d9a0f5638765af6e82948c22179e0089c /linux/drivers | |
parent | 20b18e71474d66e2f17f5a993a20dc6a92321e70 (diff) | |
download | mediapointer-dvb-s2-64705827cbd42718a7e2cadc3913a4f2cd4f81f6.tar.gz mediapointer-dvb-s2-64705827cbd42718a7e2cadc3913a4f2cd4f81f6.tar.bz2 |
sms1xxx: mark functions static
From: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/dvb/siano/smscoreapi.c | 59 | ||||
-rw-r--r-- | linux/drivers/media/dvb/siano/smscoreapi.h | 6 | ||||
-rw-r--r-- | linux/drivers/media/dvb/siano/smsdvb.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/dvb/siano/smsusb.c | 33 |
4 files changed, 54 insertions, 54 deletions
diff --git a/linux/drivers/media/dvb/siano/smscoreapi.c b/linux/drivers/media/dvb/siano/smscoreapi.c index 0f2f41e0e..1c68836e1 100644 --- a/linux/drivers/media/dvb/siano/smscoreapi.c +++ b/linux/drivers/media/dvb/siano/smscoreapi.c @@ -162,7 +162,7 @@ int smscore_registry_getmode(char *devpath) return default_mode; } -enum sms_device_type_st smscore_registry_gettype(char *devpath) +static enum sms_device_type_st smscore_registry_gettype(char *devpath) { struct smscore_registry_entry_t *entry; @@ -186,7 +186,8 @@ void smscore_registry_setmode(char *devpath, int mode) sms_err("No registry found."); } -void smscore_registry_settype(char *devpath, enum sms_device_type_st type) +static void smscore_registry_settype(char *devpath, + enum sms_device_type_st type) { struct smscore_registry_entry_t *entry; @@ -198,8 +199,8 @@ void smscore_registry_settype(char *devpath, enum sms_device_type_st type) } -void list_add_locked(struct list_head *new, struct list_head *head, - spinlock_t *lock) +static void list_add_locked(struct list_head *new, struct list_head *head, + spinlock_t *lock) { unsigned long flags; @@ -280,7 +281,7 @@ void smscore_unregister_hotplug(hotplug_t hotplug) kmutex_unlock(&g_smscore_deviceslock); } -void smscore_notify_clients(struct smscore_device_t *coredev) +static void smscore_notify_clients(struct smscore_device_t *coredev) { struct smscore_client_t *client; @@ -291,8 +292,8 @@ void smscore_notify_clients(struct smscore_device_t *coredev) } } -int smscore_notify_callbacks(struct smscore_device_t *coredev, - struct device *device, int arrival) +static int smscore_notify_callbacks(struct smscore_device_t *coredev, + struct device *device, int arrival) { struct list_head *next, *first; int rc = 0; @@ -311,7 +312,8 @@ int smscore_notify_callbacks(struct smscore_device_t *coredev, return rc; } -struct smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer, +static struct +smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer, dma_addr_t common_buffer_phys) { struct smscore_buffer_t *cb = @@ -450,8 +452,9 @@ int smscore_start_device(struct smscore_device_t *coredev) return rc; } -int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, void *buffer, - size_t size, struct completion *completion) +static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, + void *buffer, size_t size, + struct completion *completion) { int rc = coredev->sendrequest_handler(coredev->context, buffer, size); if (rc < 0) { @@ -464,8 +467,8 @@ int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, void *buffer, 0 : -ETIME; } -int smscore_load_firmware_family2(struct smscore_device_t *coredev, - void *buffer, size_t size) +static int smscore_load_firmware_family2(struct smscore_device_t *coredev, + void *buffer, size_t size) { struct SmsFirmware_ST *firmware = (struct SmsFirmware_ST *) buffer; struct SmsMsgHdr_ST *msg; @@ -580,9 +583,9 @@ int smscore_load_firmware_family2(struct smscore_device_t *coredev, * * @return 0 on success, <0 on error. */ -int smscore_load_firmware_from_file(struct smscore_device_t *coredev, - char *filename, - loadfirmware_t loadfirmware_handler) +static int smscore_load_firmware_from_file(struct smscore_device_t *coredev, + char *filename, + loadfirmware_t loadfirmware_handler) { int rc = -ENOENT; const struct firmware *fw; @@ -621,13 +624,6 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev, return rc; } -int smscore_load_firmware_from_buffer(struct smscore_device_t *coredev, - u8 *buffer, int size, int new_mode) -{ - sms_err("feature not yet implemented."); - return -EFAULT; -} - /** * notifies all clients registered with the device, notifies hotplugs, * frees all buffers and coredev object @@ -684,7 +680,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev) sms_info("device %p destroyed", coredev); } -int smscore_detect_mode(struct smscore_device_t *coredev) +static int smscore_detect_mode(struct smscore_device_t *coredev) { void *buffer = kmalloc(sizeof(struct SmsMsgHdr_ST) + SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA); @@ -720,7 +716,7 @@ int smscore_detect_mode(struct smscore_device_t *coredev) return rc; } -char *smscore_fw_lkup[][SMS_NUM_OF_DEVICE_TYPES] = { +static char *smscore_fw_lkup[][SMS_NUM_OF_DEVICE_TYPES] = { /*Stellar NOVA A0 Nova B0 VEGA*/ /*DVBT*/ {"none", "dvb_nova_12mhz.inp", "dvb_nova_12mhz_b0.inp", "none"}, @@ -861,7 +857,8 @@ int smscore_get_device_mode(struct smscore_device_t *coredev) * @param id client id (SMS_DONT_CARE for all id) * */ -struct smscore_client_t *smscore_find_client(struct smscore_device_t *coredev, +static struct +smscore_client_t *smscore_find_client(struct smscore_device_t *coredev, int data_type, int id) { struct smscore_client_t *client = NULL; @@ -1027,9 +1024,9 @@ void smscore_putbuffer(struct smscore_device_t *coredev, list_add_locked(&cb->entry, &coredev->buffers, &coredev->bufferslock); } -int smscore_validate_client(struct smscore_device_t *coredev, - struct smscore_client_t *client, - int data_type, int id) +static int smscore_validate_client(struct smscore_device_t *coredev, + struct smscore_client_t *client, + int data_type, int id) { struct smscore_idlist_t *listentry; struct smscore_client_t *registered_client; @@ -1175,6 +1172,7 @@ int smsclient_sendrequest(struct smscore_client_t *client, return coredev->sendrequest_handler(coredev->context, buffer, size); } +#if 0 /** * return the size of large (common) buffer * @@ -1195,8 +1193,8 @@ int smscore_get_common_buffer_size(struct smscore_device_t *coredev) * * @return 0 on success, <0 on error. */ -int smscore_map_common_buffer(struct smscore_device_t *coredev, - struct vm_area_struct *vma) +static int smscore_map_common_buffer(struct smscore_device_t *coredev, + struct vm_area_struct *vma) { unsigned long end = vma->vm_end, start = vma->vm_start, @@ -1223,6 +1221,7 @@ int smscore_map_common_buffer(struct smscore_device_t *coredev, return 0; } +#endif int smscore_module_init(void) { diff --git a/linux/drivers/media/dvb/siano/smscoreapi.h b/linux/drivers/media/dvb/siano/smscoreapi.h index 7fea03039..78afcc913 100644 --- a/linux/drivers/media/dvb/siano/smscoreapi.h +++ b/linux/drivers/media/dvb/siano/smscoreapi.h @@ -543,10 +543,6 @@ extern int smscore_load_firmware(struct smscore_device_t *coredev, char *filename, loadfirmware_t loadfirmware_handler); -extern int smscore_load_firmware_from_buffer(struct smscore_device_t *coredev, - u8 *buffer, int size, - int new_mode); - extern int smscore_set_device_mode(struct smscore_device_t *coredev, int mode); extern int smscore_get_device_mode(struct smscore_device_t *coredev); @@ -560,9 +556,11 @@ extern int smsclient_sendrequest(struct smscore_client_t *client, extern void smscore_onresponse(struct smscore_device_t *coredev, struct smscore_buffer_t *cb); +#if 0 extern int smscore_get_common_buffer_size(struct smscore_device_t *coredev); extern int smscore_map_common_buffer(struct smscore_device_t *coredev, struct vm_area_struct *vma); +#endif extern struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev); extern void smscore_putbuffer(struct smscore_device_t *coredev, diff --git a/linux/drivers/media/dvb/siano/smsdvb.c b/linux/drivers/media/dvb/siano/smsdvb.c index d097e3940..4d65053f3 100644 --- a/linux/drivers/media/dvb/siano/smsdvb.c +++ b/linux/drivers/media/dvb/siano/smsdvb.c @@ -30,7 +30,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); struct list_head g_smsdvb_clients; kmutex_t g_smsdvb_clientslock; -int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) +static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) { struct smsdvb_client_t *client = (struct smsdvb_client_t *) context; struct SmsMsgHdr_ST *phdr = @@ -84,7 +84,7 @@ int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) return 0; } -void smsdvb_unregister_client(struct smsdvb_client_t *client) +static void smsdvb_unregister_client(struct smsdvb_client_t *client) { /* must be called under clientslock */ @@ -98,7 +98,7 @@ void smsdvb_unregister_client(struct smsdvb_client_t *client) kfree(client); } -void smsdvb_onremove(void *context) +static void smsdvb_onremove(void *context) { kmutex_lock(&g_smsdvb_clientslock); @@ -313,8 +313,8 @@ static struct dvb_frontend_ops smsdvb_fe_ops = { .read_snr = smsdvb_read_snr, }; -int smsdvb_hotplug(struct smscore_device_t *coredev, - struct device *device, int arrival) +static int smsdvb_hotplug(struct smscore_device_t *coredev, + struct device *device, int arrival) { struct smsclient_params_t params; struct smsdvb_client_t *client; diff --git a/linux/drivers/media/dvb/siano/smsusb.c b/linux/drivers/media/dvb/siano/smsusb.c index e05856895..2f756d5d4 100644 --- a/linux/drivers/media/dvb/siano/smsusb.c +++ b/linux/drivers/media/dvb/siano/smsusb.c @@ -52,12 +52,13 @@ struct smsusb_device_t { int buffer_size; }; -int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb); +static int smsusb_submit_urb(struct smsusb_device_t *dev, + struct smsusb_urb_t *surb); #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) -void smsusb_onresponse(struct urb *urb) +static void smsusb_onresponse(struct urb *urb) #else -void smsusb_onresponse(struct urb *urb, struct pt_regs *regs) +static void smsusb_onresponse(struct urb *urb, struct pt_regs *regs) #endif { struct smsusb_urb_t *surb = (struct smsusb_urb_t *) urb->context; @@ -114,7 +115,8 @@ exit_and_resubmit: smsusb_submit_urb(dev, surb); } -int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb) +static int smsusb_submit_urb(struct smsusb_device_t *dev, + struct smsusb_urb_t *surb) { if (!surb->cb) { surb->cb = smscore_getbuffer(dev->coredev); @@ -139,7 +141,7 @@ int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb) return usb_submit_urb(&surb->urb, GFP_ATOMIC); } -void smsusb_stop_streaming(struct smsusb_device_t *dev) +static void smsusb_stop_streaming(struct smsusb_device_t *dev) { int i; @@ -153,7 +155,7 @@ void smsusb_stop_streaming(struct smsusb_device_t *dev) } } -int smsusb_start_streaming(struct smsusb_device_t *dev) +static int smsusb_start_streaming(struct smsusb_device_t *dev) { int i, rc; @@ -169,7 +171,7 @@ int smsusb_start_streaming(struct smsusb_device_t *dev) return rc; } -int smsusb_sendrequest(void *context, void *buffer, size_t size) +static int smsusb_sendrequest(void *context, void *buffer, size_t size) { struct smsusb_device_t *dev = (struct smsusb_device_t *) context; int dummy; @@ -178,7 +180,7 @@ int smsusb_sendrequest(void *context, void *buffer, size_t size) buffer, size, &dummy, 1000); } -char *smsusb1_fw_lkup[] = { +static char *smsusb1_fw_lkup[] = { "dvbt_stellar_usb.inp", "dvbh_stellar_usb.inp", "tdmb_stellar_usb.inp", @@ -186,7 +188,7 @@ char *smsusb1_fw_lkup[] = { "dvbt_bda_stellar_usb.inp", }; -int smsusb1_load_firmware(struct usb_device *udev, int id) +static int smsusb1_load_firmware(struct usb_device *udev, int id) { const struct firmware *fw; u8 *fw_buffer; @@ -224,7 +226,7 @@ int smsusb1_load_firmware(struct usb_device *udev, int id) return rc; } -void smsusb1_detectmode(void *context, int *mode) +static void smsusb1_detectmode(void *context, int *mode) { char *product_string = ((struct smsusb_device_t *) context)->udev->product; @@ -246,7 +248,7 @@ void smsusb1_detectmode(void *context, int *mode) sms_info("%d \"%s\"", *mode, product_string); } -int smsusb1_setmode(void *context, int mode) +static int smsusb1_setmode(void *context, int mode) { struct SmsMsgHdr_ST Msg = { MSG_SW_RELOAD_REQ, 0, HIF_TASK, sizeof(struct SmsMsgHdr_ST), 0 }; @@ -259,7 +261,7 @@ int smsusb1_setmode(void *context, int mode) return smsusb_sendrequest(context, &Msg, sizeof(Msg)); } -void smsusb_term_device(struct usb_interface *intf) +static void smsusb_term_device(struct usb_interface *intf) { struct smsusb_device_t *dev = (struct smsusb_device_t *) usb_get_intfdata(intf); @@ -279,7 +281,7 @@ void smsusb_term_device(struct usb_interface *intf) usb_set_intfdata(intf, NULL); } -int smsusb_init_device(struct usb_interface *intf, int board_id) +static int smsusb_init_device(struct usb_interface *intf, int board_id) { struct smsdevice_params_t params; struct smsusb_device_t *dev; @@ -380,7 +382,8 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) return rc; } -int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id) +static int smsusb_probe(struct usb_interface *intf, + const struct usb_device_id *id) { struct usb_device *udev = interface_to_usbdev(intf); char devpath[32]; @@ -425,7 +428,7 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id) return rc; } -void smsusb_disconnect(struct usb_interface *intf) +static void smsusb_disconnect(struct usb_interface *intf) { smsusb_term_device(intf); } |