本文整理汇总了C++中smd_close函数的典型用法代码示例。如果您正苦于以下问题:C++ smd_close函数的具体用法?C++ smd_close怎么用?C++ smd_close使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了smd_close函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: diagfwd_exit
void diagfwd_exit(void)
{
smd_close(driver->ch);
smd_close(driver->chqdsp);
driver->ch = 0; /*SMD can make this NULL */
driver->chqdsp = 0;
if (driver->usb_connected)
diag_close();
platform_driver_unregister(&msm_smd_ch1_driver);
diag_usb_unregister();
kfree(driver->usb_buf_in);
kfree(driver->usb_buf_in_qdsp);
kfree(driver->usb_buf_out);
kfree(driver->hdlc_buf);
kfree(driver->msg_masks);
kfree(driver->log_masks);
kfree(driver->event_masks);
kfree(driver->client_map);
kfree(driver->buf_tbl);
kfree(driver->data_ready);
kfree(driver->table);
kfree(driver->pkt_buf);
kfree(driver->usb_write_ptr);
kfree(driver->usb_write_ptr_qdsp);
kfree(driver->usb_read_ptr);
}
示例2: hci_smd_deregister_dev
static void hci_smd_deregister_dev(struct hci_smd_data *hsmd)
{
tasklet_kill(&hs.rx_task);
if (hsmd->hdev) {
if (hci_unregister_dev(hsmd->hdev) < 0)
BT_ERR("Can't unregister HCI device %s",
hsmd->hdev->name);
hci_free_dev(hsmd->hdev);
hsmd->hdev = NULL;
}
smd_close(hs.event_channel);
smd_close(hs.data_channel);
if (wake_lock_active(&hs.wake_lock_rx))
wake_unlock(&hs.wake_lock_rx);
if (wake_lock_active(&hs.wake_lock_tx))
wake_unlock(&hs.wake_lock_tx);
/*Destroy the timer used to monitor the Rx queue for emptiness */
if (hs.rx_q_timer.function) {
del_timer_sync(&hs.rx_q_timer);
hs.rx_q_timer.function = NULL;
hs.rx_q_timer.data = 0;
}
}
示例3: hci_smd_deregister_dev
static void hci_smd_deregister_dev(struct hci_smd_data *hsmd)
{
tasklet_kill(&hs.rx_task);
if (!test_and_clear_bit(HCI_REGISTER_SET, &hsmd->flags)) {
BT_ERR("HCI device un-registered already");
return;
} else
BT_INFO("HCI device un-registration going on");
if (hsmd->hdev) {
if (hci_unregister_dev(hsmd->hdev) < 0)
BT_ERR("Can't unregister HCI device %s",
hsmd->hdev->name);
hci_free_dev(hsmd->hdev);
hsmd->hdev = NULL;
}
smd_close(hs.event_channel);
smd_close(hs.data_channel);
if (wake_lock_active(&hs.wake_lock_rx))
wake_unlock(&hs.wake_lock_rx);
if (wake_lock_active(&hs.wake_lock_tx))
wake_unlock(&hs.wake_lock_tx);
/*Destroy the timer used to monitor the Rx queue for emptiness */
if (hs.rx_q_timer.function) {
del_timer_sync(&hs.rx_q_timer);
hs.rx_q_timer.function = NULL;
hs.rx_q_timer.data = 0;
}
}
示例4: smd_tty_close
static void smd_tty_close(struct tty_struct *tty, struct file *f)
{
struct smd_tty_info *info = tty->driver_data;
unsigned long flags;
if (info == 0)
return;
mutex_lock(&smd_tty_lock);
if (--info->open_count == 0) {
spin_lock_irqsave(&info->reset_lock, flags);
info->is_open = 0;
spin_unlock_irqrestore(&info->reset_lock, flags);
if (info->tty) {
tasklet_kill(&info->tty_tsklt);
wake_lock_destroy(&info->wake_lock);
info->tty = 0;
}
tty->driver_data = 0;
del_timer(&info->buf_req_timer);
if (info->ch) {
smd_close(info->ch);
info->ch = 0;
pil_put(info->pil);
}
}
mutex_unlock(&smd_tty_lock);
}
示例5: grmnet_ctrl_smd_ch_remove
static int grmnet_ctrl_smd_ch_remove(struct platform_device *pdev)
{
struct rmnet_ctrl_port *port;
struct smd_ch_info *c;
int i;
pr_debug("%s: name:%s\n", __func__, pdev->name);
for (i = 0; i < n_rmnet_ctrl_ports; i++) {
port = ctrl_smd_ports[i].port;
c = &port->ctrl_ch;
if (!strncmp(c->name, pdev->name, SMD_CH_MAX_LEN)) {
clear_bit(CH_READY, &c->flags);
clear_bit(CH_OPENED, &c->flags);
if (c->ch) {
smd_close(c->ch);
c->ch = NULL;
}
break;
}
}
return 0;
}
示例6: diagfwd_cntl_exit
void diagfwd_cntl_exit(void)
{
smd_close(driver->ch_cntl);
smd_close(driver->chlpass_cntl);
smd_close(driver->ch_wcnss_cntl);
driver->ch_cntl = 0;
driver->chlpass_cntl = 0;
driver->ch_wcnss_cntl = 0;
destroy_workqueue(driver->diag_cntl_wq);
platform_driver_unregister(&msm_smd_ch1_cntl_driver);
platform_driver_unregister(&diag_smd_lite_cntl_driver);
kfree(driver->buf_in_cntl);
kfree(driver->buf_in_lpass_cntl);
kfree(driver->buf_in_wcnss_cntl);
}
示例7: gsmd_ctrl_disconnect
void gsmd_ctrl_disconnect(struct grmnet *gr, u8 port_num)
{
struct rmnet_ctrl_port *port;
unsigned long flags;
struct smd_ch_info *c;
pr_debug("%s: grmnet:%p port#%d\n", __func__, gr, port_num);
if (port_num >= n_ports) {
pr_err("%s: invalid portno#%d\n", __func__, port_num);
return;
}
if (!gr) {
pr_err("%s: grmnet port is null\n", __func__);
return;
}
port = ports[port_num].port;
c = &port->ctrl_ch;
spin_lock_irqsave(&port->port_lock, flags);
port->port_usb = 0;
gr->send_cpkt_request = 0;
gr->send_cbits_tomodem = 0;
c->cbits_tomodem = 0;
spin_unlock_irqrestore(&port->port_lock, flags);
if (test_bit(CH_OPENED, &c->flags)) {
/* this should send the dtr zero */
smd_close(c->ch);
clear_bit(CH_OPENED, &c->flags);
}
}
示例8: rpcrouter_smd_remote_qdsp_close
static int rpcrouter_smd_remote_qdsp_close(void)
{
/*
* TBD: Implement when we have N way SMSM ported
* smsm_change_state(SMSM_APPS_STATE, SMSM_RPCINIT, 0);
*/
return smd_close(smd_remote_qdsp_xprt.channel);
}
示例9: wcnss_ctrl_remove
static int __devexit
wcnss_ctrl_remove(struct platform_device *pdev)
{
if (penv && penv->smd_ch)
smd_close(penv->smd_ch);
return 0;
}
示例10: smd_tty_port_shutdown
static void smd_tty_port_shutdown(struct tty_port *tport)
{
struct smd_tty_info *info;
struct tty_struct *tty = tty_port_tty_get(tport);
unsigned long flags;
#ifdef CONFIG_LGE_USES_SMD_DS_TTY
int res = 0;
int n = tty->index;
#endif
info = tty->driver_data;
if (info == 0) {
tty_kref_put(tty);
return;
}
mutex_lock(&smd_tty_lock);
spin_lock_irqsave(&info->reset_lock, flags);
info->is_open = 0;
spin_unlock_irqrestore(&info->reset_lock, flags);
tasklet_kill(&info->tty_tsklt);
wake_lock_destroy(&info->wake_lock);
wake_lock_destroy(&info->ra_wake_lock);
SMD_TTY_INFO("%s with PID %u closed port %s",
current->comm, current->pid,
info->smd->port_name);
tty->driver_data = NULL;
del_timer(&info->buf_req_timer);
smd_close(info->ch);
#ifdef CONFIG_LGE_USES_SMD_DS_TTY
/*
*/
pr_info("%s: waiting to close smd %s completely\n",
__func__, smd_tty[n].smd->port_name);
/* wait for reopen ready status in seconds */
res = wait_event_interruptible_timeout(
info->ch_opened_wait_queue,
!info->is_open, (lge_ds_modem_wait * HZ));
if (res == 0) {
/* just in case, remain result value */
res = -ETIMEDOUT;
pr_err("%s: timeout to wait for %s smd_close.\
next smd_open may fail....%d\n",
__func__, smd_tty[n].smd->port_name, res);
}
示例11: msm_diag_smd_close
static int msm_diag_smd_close(void)
{
struct diag_context *ctxt = &_context;
int r;
r = smd_close(ctxt->ch);
ctxt->ch = 0;
return r;
}
示例12: radio_hci_smd_deregister
static void radio_hci_smd_deregister(void)
{
radio_hci_unregister_dev();
kfree(hs.hdev);
hs.hdev = NULL;
smd_close(hs.fm_channel);
hs.fm_channel = 0;
fmsmd_set = 0;
}
示例13: wp_diag_device_op_release
static int wp_diag_device_op_release(struct inode *inode, struct file *filp)
{
//printk(KERN_INFO "wp_diag: %s, i_rdev %d\n", __FUNCTION__, inode->i_rdev);
if (_wp_context.configured) {
smd_close(_wp_context.ch);
list_del(&_wp_context.read_q);
_wp_context.configured = 0;
}
return 0;
}
示例14: diag_dci_exit
void diag_dci_exit(void)
{
smd_close(driver->ch_dci);
driver->ch_dci = 0;
platform_driver_unregister(&msm_diag_dci_driver);
kfree(driver->dci_tbl);
kfree(driver->dci_notify_tbl);
kfree(driver->apps_dci_buf);
kfree(driver->buf_in_dci);
kfree(driver->write_ptr_dci);
}
示例15: diagfwd_exit
void diagfwd_exit(void)
{
smd_close(driver->ch);
smd_close(driver->chqdsp);
smd_close(driver->ch_wcnss);
driver->ch = 0; /* SMD can make this NULL */
driver->chqdsp = 0;
driver->ch_wcnss = 0;
smd_diag_initialized = 0;
#ifdef CONFIG_DIAG_OVER_USB
if (driver->usb_connected)
usb_diag_free_req(driver->legacy_ch);
usb_diag_close(driver->legacy_ch);
#endif
platform_driver_unregister(&msm_smd_ch1_driver);
platform_driver_unregister(&diag_smd_lite_driver);
kfree(driver->buf_in_1);
kfree(driver->buf_in_2);
kfree(driver->buf_in_qdsp_1);
kfree(driver->buf_in_qdsp_2);
kfree(driver->buf_in_wcnss);
kfree(driver->usb_buf_out);
kfree(driver->hdlc_buf);
kfree(driver->msg_masks);
kfree(driver->log_masks);
kfree(driver->event_masks);
kfree(driver->client_map);
kfree(driver->buf_tbl);
kfree(driver->data_ready);
kfree(driver->table);
kfree(driver->pkt_buf);
kfree(driver->write_ptr_1);
kfree(driver->write_ptr_2);
kfree(driver->write_ptr_qdsp_1);
kfree(driver->write_ptr_qdsp_2);
kfree(driver->write_ptr_wcnss);
kfree(driver->usb_read_ptr);
kfree(driver->apps_rsp_buf);
kfree(driver->user_space_data);
destroy_workqueue(driver->diag_wq);
}