• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ smd_close函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中smd_close函数的典型用法代码示例。如果您正苦于以下问题:C++ smd_close函数的具体用法?C++ smd_close怎么用?C++ smd_close使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了smd_close函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: diag_smd_destructor

void diag_smd_destructor(struct diag_smd_info *smd_info)
{
	if (smd_info->ch)
		smd_close(smd_info->ch);

	smd_info->ch = 0;
	smd_info->ch_save = 0;
	kfree(smd_info->buf_in_1);
	kfree(smd_info->buf_in_2);
	kfree(smd_info->write_ptr_1);
	kfree(smd_info->write_ptr_2);
}
开发者ID:emuikernel,项目名称:YulongKernel,代码行数:12,代码来源:diagfwd.c


示例17: nmea_release

static int nmea_release(struct inode *ip, struct file *fp)
{
	int r = 0;

	mutex_lock(&nmea_ch_lock);
	if (nmea_devp->ch != 0) {
		r = smd_close(nmea_devp->ch);
		nmea_devp->ch = 0;
	}
	mutex_unlock(&nmea_ch_lock);

	return r;
}
开发者ID:404992361,项目名称:mi1_kernel,代码行数:13,代码来源:smd_nmea.c


示例18: 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;
#ifdef CONFIG_LGE_USES_SMD_DS_TTY
    int res = 0;
    int n = tty->index;
#endif

    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);
#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:rhino889a,项目名称:Freedom-Kernel-l0,代码行数:51,代码来源:smd_tty.c


示例19: smm6260net_stop

static int smm6260net_stop(struct net_device *dev)
{
	struct smm6260net_private *p = netdev_priv(dev);
	int r=0;
	pr_info("haozz smm6260net_stop(),%d\n",p->ucount);
        if(p->ch && !(--p->ucount)){
			r = smd_close(p->ch);
		if(r < 0)
			return -ENODEV;
		p->ch = NULL;
		netif_stop_queue(dev);
	}	
	return 0;
}
开发者ID:krizky82,项目名称:android_kernel_lenovo_stuttgart,代码行数:14,代码来源:smm6260_net.c


示例20: hci_smd_deregister_dev

static void hci_smd_deregister_dev(struct hci_smd_data *hsmd)
{
	tasklet_kill(&hs.rx_task);
	if (ssr_state)
		BT_DBG("SSR state is : %x", ssr_state);
	/* Though the hci_smd driver is not registered with the hci
	 * need to close the opened channels as a part of cleaup
	 */
	if (!test_and_clear_bit(HCI_REGISTER_SET, &hsmd->flags)) {
		BT_ERR("HCI device un-registered already");
	} 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:Rondeau7,项目名称:android_kernel_lge_msm8960,代码行数:37,代码来源:hci_smd.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ smd_cur_packet_size函数代码示例发布时间:2022-05-30
下一篇:
C++ smbus_read_byte函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap