当前位置: 首页>>代码示例>>C++>>正文


C++ smd_close函数代码示例

本文整理汇总了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);
}
开发者ID:AntonioPT,项目名称:u8150-kernel-pulse-port,代码行数:30,代码来源:diagfwd.c

示例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;
	}
}
开发者ID:GTurn,项目名称:Matrix_Force,代码行数:28,代码来源:hci_smd.c

示例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;
	}
}
开发者ID:KernelStalker,项目名称:GalaxyS3_Tmo-Att_Kernel,代码行数:34,代码来源:hci_smd.c

示例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);
}
开发者ID:NooNameR,项目名称:QSD3.0,代码行数:28,代码来源:smd_tty.c

示例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;
}
开发者ID:ColonelSaumon,项目名称:android_kernel_nokia_msm8x25,代码行数:25,代码来源:u_rmnet_ctrl_smd.c

示例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);
}
开发者ID:Adrioid83,项目名称:jflte_xxx,代码行数:16,代码来源:diagfwd_cntl.c

示例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);
	}
}
开发者ID:dimax754,项目名称:msm_2.6.38,代码行数:34,代码来源:u_rmnet_ctrl_smd.c

示例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);
}
开发者ID:1111saeid,项目名称:jb_kernel_3.0.16_htc_golfu,代码行数:8,代码来源:rpcrouter_smd_xprt.c

示例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;
}
开发者ID:Loller79,项目名称:Solid_Kernel-STOCK-KK,代码行数:8,代码来源:wcnss_wlan.c

示例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);
	}
开发者ID:AbdulrahmanAmir,项目名称:Dorimanx-LG-G2-D802-Kernel,代码行数:57,代码来源:smd_tty.c

示例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;
}
开发者ID:astarasikov,项目名称:android_kernel_htc_kovsky,代码行数:9,代码来源:smd_diag.c

示例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;
}
开发者ID:devc100,项目名称:Nemesis_Kernel,代码行数:10,代码来源:radio-iris-transport.c

示例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;
}
开发者ID:Austrie,项目名称:SpeedDemon-Kernel,代码行数:10,代码来源:wpdiag.c

示例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);
}
开发者ID:KonstaT,项目名称:sailfishos_kernel_jolla_msm8930,代码行数:11,代码来源:diag_dci.c

示例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);
}
开发者ID:dic1911,项目名称:android_kernel_htc_gtou,代码行数:41,代码来源:diagfwd.c


注:本文中的smd_close函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。