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;
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;
}
-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;
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;
}
}
-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;
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 =
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) {
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;
*
* @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;
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
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);
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"},
* @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;
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;
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)
{
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;
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);
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;
}
}
-int smsusb_start_streaming(struct smsusb_device_t *dev)
+static int smsusb_start_streaming(struct smsusb_device_t *dev)
{
int i, rc;
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;
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",
"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;
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;
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 };
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);
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;
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];
return rc;
}
-void smsusb_disconnect(struct usb_interface *intf)
+static void smsusb_disconnect(struct usb_interface *intf)
{
smsusb_term_device(intf);
}