您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DMSG_PANIC函数代码示例

51自学网 2021-06-01 20:22:49
  C++
这篇教程C++ DMSG_PANIC函数代码示例写得很实用,希望能帮到您。

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

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

示例1: get_usb_cfg

/*********************************************************************************                     get_usb_cfg** Description:*    void** Parameters:*    void** Return value:*    void** note:*    void*********************************************************************************/static s32 get_usb_cfg(struct sw_hci_hcd *sw_hci){    __s32 ret = 0;    /* usbc enable */    ret = script_parser_fetch(usbc_name[sw_hci->usbc_no], "usb_used", (int *)&sw_hci->used, 64);    if(ret != 0) {        DMSG_PANIC("ERR: get usbc2 enable failed/n");        //return -1;    }    /* request gpio */    ret = script_parser_fetch(usbc_name[sw_hci->usbc_no], "usb_drv_vbus_gpio", (int *)&sw_hci->drv_vbus_gpio_set, 64);    if(ret != 0) {        DMSG_PANIC("ERR: get usbc%d(%s) id failed/n", sw_hci->usbc_no, usbc_name[sw_hci->usbc_no]);        return -1;    }    /* host_init_state */    ret = script_parser_fetch(usbc_name[sw_hci->usbc_no], "usb_host_init_state", (int *)&(sw_hci->host_init_state), 64);    if(ret != 0) {        DMSG_PANIC("ERR: script_parser_fetch host_init_state failed/n");        return -1;    }    return 0;}
开发者ID:panlinbing,项目名称:lichee_linux-3.0,代码行数:45,


示例2: clock_init

/*********************************************************************************                     clock_init** Description:*    void** Parameters:*    void** Return value:*    void** note:*    void*********************************************************************************/static s32 clock_init(struct sw_hci_hcd *sw_hci, u32 ohci){    if(ohci){  /* ohci */    	sw_hci->sie_clk = clk_get(NULL, "ahb_ohci0");    	if (IS_ERR(sw_hci->sie_clk)){    		DMSG_PANIC("ERR: get ohci%d abh clk failed./n", (sw_hci->usbc_no - 1));    		goto failed;    	}    	sw_hci->ohci_gate = clk_get(NULL, "usb_ohci0");    	if (IS_ERR(sw_hci->ohci_gate)){    		DMSG_PANIC("ERR: get ohci%d gate clk failed./n", (sw_hci->usbc_no - 1));    		goto failed;    	}	}else{  /* ehci */    	sw_hci->sie_clk = clk_get(NULL, "ahb_ehci0");    	if (IS_ERR(sw_hci->sie_clk)){    		DMSG_PANIC("ERR: get ehci%d abh clk failed./n", (sw_hci->usbc_no - 1));    		goto failed;    	}	}	sw_hci->phy_gate = clk_get(NULL, "usb_phy1");	if (IS_ERR(sw_hci->phy_gate)){		DMSG_PANIC("ERR: get usb%d phy_gate failed./n", sw_hci->usbc_no);		goto failed;	}	sw_hci->phy_reset = clk_get(NULL, "usb_phy1");	if (IS_ERR(sw_hci->phy_reset)){		DMSG_PANIC("ERR: get usb%d phy_reset failed./n", sw_hci->usbc_no);		goto failed;	}	return 0;failed:	if(sw_hci->sie_clk){		clk_put(sw_hci->sie_clk);		sw_hci->sie_clk = NULL;	}	if(sw_hci->phy_gate){		clk_put(sw_hci->phy_gate);		sw_hci->phy_gate = NULL;	}	if(sw_hci->phy_reset){		clk_put(sw_hci->phy_reset);		sw_hci->phy_reset = NULL;	}	if(sw_hci->ohci_gate){	    clk_put(sw_hci->ohci_gate);		sw_hci->ohci_gate = NULL;	}	return -1;}
开发者ID:mantrid,项目名称:linux-allwinner,代码行数:77,


示例3: sw_ohci_hcd_suspend

/*********************************************************************************                     sw_ohci_hcd_suspend** Description:*    void** Parameters:*    void** Return value:*    void** note:*    void*********************************************************************************/static int sw_ohci_hcd_suspend(struct device *dev){	struct sw_hci_hcd *sw_ohci  = NULL;	struct usb_hcd *hcd         = NULL;	struct ohci_hcd	*ohci       = NULL;	unsigned long flags         = 0;	int rc                      = 0;	if(dev == NULL){		DMSG_PANIC("ERR: Argment is invalid/n");		return 0;	}	hcd = dev_get_drvdata(dev);	if(hcd == NULL){		DMSG_PANIC("ERR: hcd is null/n");		return 0;	}	sw_ohci = dev->platform_data;	if(sw_ohci == NULL){		DMSG_PANIC("ERR: sw_ohci is null/n");		return 0;	}	if(sw_ohci->probe == 0){		DMSG_PANIC("ERR: sw_ohci is disable, can not suspend/n");		return 0;	}	ohci = hcd_to_ohci(hcd);	if(ohci == NULL){		DMSG_PANIC("ERR: ohci is null/n");		return 0;	} 	DMSG_INFO("[%s]: sw_ohci_hcd_suspend/n", sw_ohci->hci_name);	/* Root hub was already suspended. Disable irq emission and	 * mark HW unaccessible, bail out if RH has been resumed. Use	 * the spinlock to properly synchronize with possible pending	 * RH suspend or resume activity.	 *	 * This is still racy as hcd->state is manipulated outside of	 * any locks =P But that will be a different fix.	 */	spin_lock_irqsave(&ohci->lock, flags);    ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);    (void)ohci_readl(ohci, &ohci->regs->intrdisable);    clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);    spin_unlock_irqrestore(&ohci->lock, flags);    sw_stop_ohc(sw_ohci);    return rc;}
开发者ID:Michael-Pizzileo,项目名称:lichee_linux-3.0,代码行数:77,


示例4: sunxi_otg_resume

static int sunxi_otg_resume(struct device *dev){	struct platform_device *pdev = NULL;	struct sunxi_otgc *otgc  = NULL;	int ret;	pdev = sunxi_otg_pdev;	if(pdev == NULL){		DMSG_PANIC("%s, pdev is NULL/n", __func__);		return 0;	}	otgc = platform_get_drvdata(pdev);	if(otgc == NULL){		DMSG_PANIC("%s, otgc is NULL/n", __func__);		return 0;	}	DMSG_INFO("start:%s, otgc_work_mode:%d/n", __func__, otgc_work_mode);	if(otgc_work_mode == 0){		DMSG_INFO("end:%s, otgc driver is no work and no need resume/n", __func__);		atomic_set(&thread_suspend_flag, 0);		goto end;	}	sunxi_open_usb_clock(otgc);	sunxi_set_mode(otgc, otgc_work_mode);	switch(otgc_work_mode){		case SUNXI_GCTL_PRTCAP_HOST:			sunxi_core_soft_reset(otgc->regs);			sunxi_host_set_vbus(otgc, 1);		break;		case SUNXI_GCTL_PRTCAP_DEVICE:			ret = sunxi_core_init(otgc);			if (ret) {				dev_err(&pdev->dev, "failed to initialize core, %s_%d/n", __func__, __LINE__);				atomic_set(&thread_suspend_flag, 0);				return ret;			}			sunxi_gadget_resume(otgc);			atomic_set(&thread_suspend_flag, 0);		break;		default:		return 0;	}end:	pm_runtime_disable(&pdev->dev);	pm_runtime_set_active(&pdev->dev);	pm_runtime_enable(&pdev->dev);	DMSG_INFO("end: %s/n", __func__);	return 0;}
开发者ID:phi-psi,项目名称:linux-3.4-sunxi,代码行数:58,


示例5: sw_hcd_port_suspend

/*********************************************************************************                     sw_hcd_port_suspend** Description:*    suspend USB port** Parameters:*    sw_hcd        :  input.  USB
C++ DMSetFromOptions函数代码示例
C++ DMSG_INFO函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。