#include "smscoreapi.h"
#include "sms-cards.h"
-int sms_debug;
-module_param_named(debug, sms_debug, int, 0644);
+int sms_dbg;
+module_param_named(debug, sms_dbg, int, 0644);
MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
struct smscore_device_notifyee_t {
core->led_state = led;
return core->led_state;
}
+EXPORT_SYMBOL(smscore_set_board_id);
int smscore_get_board_id(struct smscore_device_t *core)
{
return core->board_id;
}
+EXPORT_SYMBOL(smscore_get_board_id);
struct smscore_registry_entry_t {
struct list_head entry;
return default_mode;
}
+EXPORT_SYMBOL(smscore_registry_getmode);
static enum sms_device_type_st smscore_registry_gettype(char *devpath)
{
return rc;
}
+EXPORT_SYMBOL(smscore_register_hotplug);
/**
* unregister a client callback that called when device plugged in/unplugged
kmutex_unlock(&g_smscore_deviceslock);
}
+EXPORT_SYMBOL(smscore_unregister_hotplug);
static void smscore_notify_clients(struct smscore_device_t *coredev)
{
return 0;
}
+EXPORT_SYMBOL(smscore_register_device);
/**
* sets initial device mode and notifies client hotplugs that device is ready
return rc;
}
+EXPORT_SYMBOL(smscore_start_device);
static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev,
void *buffer, size_t size,
sms_info("device %p destroyed", coredev);
}
+EXPORT_SYMBOL(smscore_unregister_device);
static int smscore_detect_mode(struct smscore_device_t *coredev)
{
{
return coredev->mode;
}
+EXPORT_SYMBOL(smscore_get_device_mode);
/**
* find client by response id & type within the clients list.
smscore_putbuffer(coredev, cb);
}
}
+EXPORT_SYMBOL(smscore_onresponse);
/**
* return pointer to next free buffer descriptor from core pool
return cb;
}
+EXPORT_SYMBOL(smscore_getbuffer);
/**
* return buffer descriptor to a pool
{
list_add_locked(&cb->entry, &coredev->buffers, &coredev->bufferslock);
}
+EXPORT_SYMBOL(smscore_putbuffer);
static int smscore_validate_client(struct smscore_device_t *coredev,
struct smscore_client_t *client,
return 0;
}
+EXPORT_SYMBOL(smscore_register_client);
/**
* frees smsclient object and all subclients associated with it
spin_unlock_irqrestore(&coredev->clientslock, flags);
}
+EXPORT_SYMBOL(smscore_unregister_client);
/**
* verifies that source id is not taken by another client,
return coredev->sendrequest_handler(coredev->context, buffer, size);
}
+EXPORT_SYMBOL(smsclient_sendrequest);
int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
}
kmutex_unlock(&g_smscore_registrylock);
-//#ifdef DVB_CORE
-// smsdvb_unregister();
-//#endif
-
sms_debug("");
}
-EXPORT_SYMBOL(smscore_onresponse);
-EXPORT_SYMBOL(sms_get_board);
-EXPORT_SYMBOL(sms_debug);
-EXPORT_SYMBOL(smscore_putbuffer);
-EXPORT_SYMBOL(smscore_registry_getmode);
-EXPORT_SYMBOL(smscore_register_device);
-EXPORT_SYMBOL(smscore_set_board_id);
-EXPORT_SYMBOL(smscore_start_device);
-EXPORT_SYMBOL(smscore_unregister_device);
-EXPORT_SYMBOL(smscore_getbuffer);
-EXPORT_SYMBOL(smscore_get_device_mode);
-EXPORT_SYMBOL(smscore_register_client);
-EXPORT_SYMBOL(smscore_unregister_hotplug);
-EXPORT_SYMBOL(smsclient_sendrequest);
-EXPORT_SYMBOL(smscore_unregister_client);
-EXPORT_SYMBOL(smscore_get_board_id);
-EXPORT_SYMBOL(smscore_register_hotplug);
-
module_init(smscore_module_init);
module_exit(smscore_module_exit);
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 int smscore_get_fw_filename(struct smscore_device_t *coredev, int mode, char* filename);
-extern int smscore_send_fw_file(struct smscore_device_t *coredev, u8* ufwbuf,int size);
+extern int smscore_get_fw_filename(struct smscore_device_t *coredev,
+ int mode, char *filename);
+extern int smscore_send_fw_file(struct smscore_device_t *coredev,
+ u8 *ufwbuf, int size);
extern
struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev);
/* ------------------------------------------------------------------------ */
-extern int sms_debug;
+extern int sms_dbg;
#define DBG_INFO 1
#define DBG_ADV 2
printk(kern "%s: " fmt "\n", __func__, ##arg)
#define dprintk(kern, lvl, fmt, arg...) do {\
- if (sms_debug & lvl) \
+ if (sms_dbg & lvl) \
sms_printk(kern, fmt, ##arg); } while (0)
#define sms_log(fmt, arg...) sms_printk(KERN_INFO, fmt, ##arg)
{
struct smsusb_device_t *dev =
(struct smsusb_device_t *)usb_get_intfdata(intf);
- printk(KERN_INFO "%s Entering status %d.\n", __func__, msg.event);
+ printk(KERN_INFO "%s: Entering status %d.\n", __func__, msg.event);
smsusb_stop_streaming(dev);
return 0;
}
(struct smsusb_device_t *)usb_get_intfdata(intf);
struct usb_device *udev = interface_to_usbdev(intf);
- printk(KERN_INFO "%s Entering.\n", __func__);
+ printk(KERN_INFO "%s: Entering.\n", __func__);
usb_clear_halt(udev, usb_rcvbulkpipe(udev, 0x81));
usb_clear_halt(udev, usb_rcvbulkpipe(udev, 0x02));
intf->cur_altsetting->desc.
bInterfaceNumber, 0);
if (rc < 0) {
- printk(KERN_INFO
- "%s usb_set_interface failed, rc %d\n",
- __func__, rc);
+ printk(KERN_INFO "%s usb_set_interface failed, "
+ "rc %d\n", __func__, rc);
return rc;
}
}