mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-13 16:40:22 +00:00
V4L/DVB (8299): sms1xxx: mark functions static
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
c65c7a652f
commit
0c071f374f
@ -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;
|
||||
@ -1016,9 +1013,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;
|
||||
@ -1164,54 +1161,6 @@ int smsclient_sendrequest(struct smscore_client_t *client,
|
||||
return coredev->sendrequest_handler(coredev->context, buffer, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* return the size of large (common) buffer
|
||||
*
|
||||
* @param coredev pointer to a coredev object from clients hotplug
|
||||
*
|
||||
* @return size (in bytes) of the buffer
|
||||
*/
|
||||
int smscore_get_common_buffer_size(struct smscore_device_t *coredev)
|
||||
{
|
||||
return coredev->common_buffer_size;
|
||||
}
|
||||
|
||||
/**
|
||||
* maps common buffer (if supported by platform)
|
||||
*
|
||||
* @param coredev pointer to a coredev object from clients hotplug
|
||||
* @param vma pointer to vma struct from mmap handler
|
||||
*
|
||||
* @return 0 on success, <0 on error.
|
||||
*/
|
||||
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,
|
||||
size = PAGE_ALIGN(coredev->common_buffer_size);
|
||||
|
||||
if (!(vma->vm_flags & (VM_READ | VM_SHARED)) ||
|
||||
(vma->vm_flags & VM_WRITE)) {
|
||||
sms_err("invalid vm flags");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((end - start) != size) {
|
||||
sms_err("invalid size %d expected %d",
|
||||
(int)(end - start), (int) size);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (remap_pfn_range(vma, start,
|
||||
coredev->common_buffer_phys >> PAGE_SHIFT,
|
||||
size, pgprot_noncached(vma->vm_page_prot))) {
|
||||
sms_err("remap_page_range failed");
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int smscore_module_init(void)
|
||||
{
|
||||
|
@ -378,10 +378,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);
|
||||
|
||||
@ -395,9 +391,6 @@ extern int smsclient_sendrequest(struct smscore_client_t *client,
|
||||
extern void smscore_onresponse(struct smscore_device_t *coredev,
|
||||
struct smscore_buffer_t *cb);
|
||||
|
||||
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);
|
||||
|
||||
extern struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev);
|
||||
extern void smscore_putbuffer(struct smscore_device_t *coredev,
|
||||
|
@ -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);
|
||||
|
||||
@ -310,8 +310,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;
|
||||
|
@ -52,9 +52,10 @@ 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);
|
||||
|
||||
void smsusb_onresponse(struct urb *urb)
|
||||
static void smsusb_onresponse(struct urb *urb)
|
||||
{
|
||||
struct smsusb_urb_t *surb = (struct smsusb_urb_t *) urb->context;
|
||||
struct smsusb_device_t *dev = surb->dev;
|
||||
@ -110,7 +111,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);
|
||||
@ -135,7 +137,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;
|
||||
|
||||
@ -149,7 +151,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;
|
||||
|
||||
@ -165,7 +167,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;
|
||||
@ -174,7 +176,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",
|
||||
@ -182,7 +184,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;
|
||||
@ -220,7 +222,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;
|
||||
@ -242,7 +244,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 };
|
||||
@ -255,7 +257,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);
|
||||
@ -275,7 +277,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;
|
||||
@ -376,7 +378,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];
|
||||
@ -421,7 +424,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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user