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


C++ request_firmware_nowait函数代码示例

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


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

示例1: mwifiex_init_hw_fw

/*
 * This function initializes the hardware and gets firmware.
 */
static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter)
{
	int ret;

	init_completion(&adapter->fw_load);
	ret = request_firmware_nowait(THIS_MODULE, 1, adapter->fw_name,
				      adapter->dev, GFP_KERNEL, adapter,
				      mwifiex_fw_dpc);
	if (ret < 0)
		dev_err(adapter->dev,
			"request_firmware_nowait() returned error %d\n", ret);
	return ret;
}
开发者ID:AICP,项目名称:kernel_moto_shamu,代码行数:16,代码来源:main.c

示例2: carl9170_usb_probe

static int carl9170_usb_probe(struct usb_interface *intf,
			      const struct usb_device_id *id)
{
	struct ar9170 *ar;
	struct usb_device *udev;
	int err;

	err = usb_reset_device(interface_to_usbdev(intf));
	if (err)
		return err;

	ar = carl9170_alloc(sizeof(*ar));
	if (IS_ERR(ar))
		return PTR_ERR(ar);

	udev = interface_to_usbdev(intf);
	usb_get_dev(udev);
	ar->udev = udev;
	ar->intf = intf;
	ar->features = id->driver_info;

	usb_set_intfdata(intf, ar);
	SET_IEEE80211_DEV(ar->hw, &intf->dev);

	init_usb_anchor(&ar->rx_anch);
	init_usb_anchor(&ar->rx_pool);
	init_usb_anchor(&ar->rx_work);
	init_usb_anchor(&ar->tx_wait);
	init_usb_anchor(&ar->tx_anch);
	init_usb_anchor(&ar->tx_cmd);
	init_usb_anchor(&ar->tx_err);
	init_completion(&ar->cmd_wait);
	init_completion(&ar->fw_boot_wait);
	init_completion(&ar->fw_load_wait);
	tasklet_init(&ar->usb_tasklet, carl9170_usb_tasklet,
		     (unsigned long)ar);

	atomic_set(&ar->tx_cmd_urbs, 0);
	atomic_set(&ar->tx_anch_urbs, 0);
	atomic_set(&ar->rx_work_urbs, 0);
	atomic_set(&ar->rx_anch_urbs, 0);
	atomic_set(&ar->rx_pool_urbs, 0);
	ar->cmd_seq = -2;

	usb_get_dev(ar->udev);

	carl9170_set_state(ar, CARL9170_STOPPED);

	return request_firmware_nowait(THIS_MODULE, 1, CARL9170FW_NAME,
		&ar->udev->dev, GFP_KERNEL, ar, carl9170_usb_firmware_step2);
}
开发者ID:Ale1ster,项目名称:kerneldir,代码行数:51,代码来源:usb.c

示例3: hdcp_load_keys

static int hdcp_load_keys(void)
{
	int ret;

	ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG,
				      "hdcp.keys", mdev.this_device, GFP_KERNEL,
				      &hdcp, hdcp_load_keys_cb);
	if (ret < 0) {
		pr_err("HDCP: request_firmware_nowait failed: %d\n", ret);
		hdcp.hdcp_keys_loaded = false;
		return ret;
	}

	return 0;
}
开发者ID:ARMP,项目名称:ARM-Project,代码行数:15,代码来源:hdcp_top.c

示例4: spec_load_firmware

void spec_load_firmware(struct work_struct *work)
{
    struct spec_dev *dev = container_of(work, struct spec_dev, work);
    struct pci_dev *pdev = dev->pdev;
    static char fwname[SPEC_MAX_FWNAME_SIZE];
    int err;

    if (!(*fwname)) {
        dev_err(&pdev->dev, "no fwname specified\n");
        return;
    }
    if (SPEC_DEBUG)
        pr_info(KBUILD_MODNAME ": %s: %s\n", __func__, fwname);

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
    err = request_firmware_nowait(THIS_MODULE, 1, fwname, &pdev->dev,
                                  dev, spec_complete_firmware);
#else
    err = request_firmware_nowait(THIS_MODULE, 1, fwname, &pdev->dev,
                                  GFP_KERNEL, dev, spec_complete_firmware);
#endif
    pr_info(KBUILD_MODNAME ": %s: request_firmware returned %i\n",
            __func__, err);
}
开发者ID:mvanga,项目名称:SPEC-Driver,代码行数:24,代码来源:spec.c

示例5: hdcp_load_keys

static int hdcp_load_keys(void)
{
	int ret;

	HDCP_DBG("%s\n", __func__);

	ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG,
					"hdcp.keys", hdcp.mdev->this_device,
					GFP_KERNEL, &hdcp, hdcp_load_keys_cb);
	if (ret < 0) {
		HDCP_ERR("request_firmware_nowait failed: %d\n", ret);
		hdcp.hdcp_keys_loaded = false;
	}

	return ret;
}
开发者ID:robacklin,项目名称:omap-android,代码行数:16,代码来源:hdcp_top.c

示例6: upgrade_firmware_from_class

static int upgrade_firmware_from_class(struct device *dev)
{
	int retval;

	dev_vdbg(dev, "%s: Enabling firmware class loader\n", __func__);

	retval = request_firmware_nowait(THIS_MODULE, FW_ACTION_NOHOTPLUG,
			CY_FW_MANUAL_UPGRADE_FILE_NAME, dev, GFP_KERNEL, dev,
			_cyttsp5_firmware_cont);
	if (retval < 0) {
		dev_err(dev, "%s: Fail request firmware class file load\n",
			__func__);
		return retval;
	}

	return 0;
}
开发者ID:moonlightly,项目名称:NX523J_kernel,代码行数:17,代码来源:cyttsp5_loader.c

示例7: mxt_load_fw_from_req_fw

static int mxt_load_fw_from_req_fw(struct mxt_fw_info *fw_info,
		const struct firmware *fw)
{
	struct mxt_data *data = fw_info->data;
	struct device *dev = &data->client->dev;
	const char *firmware_name =
		data->pdata->firmware_name ?: MXT_DEFAULT_FIRMWARE_NAME;
	int ret = 0;

	if (MXT_FIRMWARE_UPDATE_TYPE) {
		char fw_path[MXT_MAX_FW_PATH];

		memset(&fw_path, 0, MXT_MAX_FW_PATH);

		snprintf(fw_path, MXT_MAX_FW_PATH, "%s/%s",
			MXT_FIRMWARE_INKERNEL_PATH, firmware_name);

		dev_err(dev, "%s\n", fw_path);

		ret = request_firmware(&fw, fw_path, dev);
		if (ret) {
			dev_err(dev,
				"Could not request firmware %s\n", fw_path);
			goto out;
		}
	} else {
		ret = request_firmware_nowait(THIS_MODULE, true, firmware_name,
					dev, GFP_KERNEL,
					data, mxt_request_firmware_work);
		if (ret) {
			dev_err(dev,
				"Could not request firmware %s\n",
				firmware_name);
			goto out;
		}
	}

	ret = mxt_verify_fw(fw_info, fw);
out:
	return ret;
}
开发者ID:C457,项目名称:android_kernel_samsung_t110,代码行数:41,代码来源:mxts_sec.c

示例8: cptk_update_firmware

static int cptk_update_firmware(struct cptk_data *cptk)
{
	int ret;
	struct device *dev = &cptk->input_dev->dev;
	cptk->touchkey_update_status = 1;
	if (!cptk->pdata->fw_name) {
		dev_err(dev, "%s: Device firmware name is not set\n", __func__);
		return -EINVAL;
	}

	ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG,
			cptk->pdata->fw_name, dev, GFP_KERNEL, cptk,
			cptk_update_firmware_cb);
	if (ret) {
		dev_err(dev, "%s: Can't open firmware file from %s\n", __func__,
			cptk->pdata->fw_name);
		return ret;
	}

	return 0;
}
开发者ID:nickh186,项目名称:Samsung-GT-P3113-AOSP-CM-Kernel-and-Ramdisk,代码行数:21,代码来源:cypress-touchkey.c

示例9: rr_load_firmware

/*
 * We want to run the actual loading from a work queue, to have a known
 * loading environment, especially one that can sleep. The function
 * pointer is already in the work structure, set at compile time from
 * rawrabbit-core.c .
 */
void rr_load_firmware(struct work_struct *work)
{
	struct rr_dev *dev = container_of(work, struct rr_dev, work);
	struct pci_dev *pdev = dev->pdev;
	static char fwname[RR_MAX_FWNAME_SIZE];
	int err;

	if (rr_expand_name(dev, fwname)) {
		dev_err(&pdev->dev, "Wrong fwname: \"%s\"\n", rr_fwname);
		return;
	}
	if (1)
		printk("%s: %s\n", __func__, fwname);

	__rr_report_env(__func__);
	printk(KERN_INFO "firmware name: %s\n", fwname);
	err = request_firmware_nowait(THIS_MODULE, 1, fwname, &pdev->dev,
				      __RR_GFP_FOR_RFNW(GFP_KERNEL)
				      dev, rr_loader_complete);
	printk("request firmware returned %i\n", err);
}
开发者ID:mcattin,项目名称:fmc_adc_100Ms_test,代码行数:27,代码来源:loader.c

示例10: m6mo_load_firmware

int m6mo_load_firmware(struct v4l2_subdev *sd)
{
	int ret = 0;	
	struct i2c_client *client = v4l2_get_subdevdata(sd);

	m6mo_set_firmware_status(sd, FIRMWARE_REQUESTING);

	ret = request_firmware_nowait(THIS_MODULE,
				      FW_ACTION_HOTPLUG,
				      M6MO_FIRMWARE_FILE_NAME,
				      &client->dev,
				      GFP_KERNEL,
				      sd,
				      m6mo_fw_request_complete_handler);
	if (ret) {
		dev_err(&client->dev, "could not load firmware (err=%d)\n", ret);
		m6mo_set_firmware_status(sd, FIRMWARE_CHECKED);
	}

	return ret;
}
开发者ID:Scorpio92,项目名称:android_kernel_mx2,代码行数:21,代码来源:m6mo_fw.c

示例11: rtl92cu_init_sw_vars

static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
{
	struct rtl_priv *rtlpriv = rtl_priv(hw);
	int err;
	char *fw_name;

	rtlpriv->dm.dm_initialgain_enable = true;
	rtlpriv->dm.dm_flag = 0;
	rtlpriv->dm.disable_framebursting = false;
	rtlpriv->dm.thermalvalue = 0;
	rtlpriv->cfg->mod_params->sw_crypto =
		rtlpriv->cfg->mod_params->sw_crypto;

	/* for firmware buf */
	rtlpriv->rtlhal.pfirmware = vzalloc(0x4000);
	if (!rtlpriv->rtlhal.pfirmware) {
		pr_err("Can't alloc buffer for fw\n");
		return 1;
	}
	if (IS_VENDOR_UMC_A_CUT(rtlpriv->rtlhal.version) &&
	    !IS_92C_SERIAL(rtlpriv->rtlhal.version)) {
		fw_name = "rtlwifi/rtl8192cufw_A.bin";
	} else if (IS_81XXC_VENDOR_UMC_B_CUT(rtlpriv->rtlhal.version)) {
		fw_name = "rtlwifi/rtl8192cufw_B.bin";
	} else {
		fw_name = "rtlwifi/rtl8192cufw_TMSC.bin";
	}
	/* provide name of alternative file */
	rtlpriv->cfg->alt_fw_name = "rtlwifi/rtl8192cufw.bin";
	pr_info("Loading firmware %s\n", fw_name);
	rtlpriv->max_fw_size = 0x4000;
	err = request_firmware_nowait(THIS_MODULE, 1,
				      fw_name, rtlpriv->io.dev,
				      GFP_KERNEL, hw, rtl_fw_cb);
	if (err) {
		vfree(rtlpriv->rtlhal.pfirmware);
		rtlpriv->rtlhal.pfirmware = NULL;
	}
	return err;
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:40,代码来源:sw.c

示例12: callbackfn_rbu

static void callbackfn_rbu(const struct firmware *fw, void *context)
{
	int rc = 0;

	if (!fw || !fw->size) {
		rbu_data.entry_created = 0;
		return;
	}

	spin_lock(&rbu_data.lock);
	if (!strcmp(image_type, "mono")) {
		if (!img_update_realloc(fw->size))
			memcpy(rbu_data.image_update_buffer,
				fw->data, fw->size);
	} else if (!strcmp(image_type, "packet")) {
		/*
		 * we need to free previous packets if a
		 * new hunk of packets needs to be downloaded
		 */
		packet_empty_list();
		if (packetize_data(fw->data, fw->size))
			/* Incase something goes wrong when we are
			 * in middle of packetizing the data, we
			 * need to free up whatever packets might
			 * have been created before we quit.
			 */
			packet_empty_list();
	} else
		pr_debug("invalid image type specified.\n");
	spin_unlock(&rbu_data.lock);

	rc = request_firmware_nowait(THIS_MODULE, FW_ACTION_NOHOTPLUG,
		"dell_rbu", &rbu_device->dev, &context, callbackfn_rbu);
	if (rc)
		printk(KERN_ERR
			"dell_rbu:%s request_firmware_nowait failed"
			" %d\n", __FUNCTION__, rc);
	else
		rbu_data.entry_created = 1;
}
开发者ID:BackupTheBerlios,项目名称:tew632-brp-svn,代码行数:40,代码来源:dell_rbu.c

示例13: ar9170_usb_firmware_inits

static void ar9170_usb_firmware_inits(const struct firmware *fw,
				      void *context)
{
	struct ar9170_usb *aru = context;
	int err;

	if (!fw) {
		dev_err(&aru->udev->dev, "file with init values not found.\n");
		ar9170_usb_firmware_failed(aru);
		return;
	}

	aru->init_values = fw;

	/* ok so we have the init values -- get code for two-stage */

	err = request_firmware_nowait(THIS_MODULE, 1, "ar9170-2.fw",
				      &aru->udev->dev, GFP_KERNEL, aru,
				      ar9170_usb_firmware_finish);
	if (err)
		ar9170_usb_firmware_failed(aru);
}
开发者ID:kronenpj,项目名称:samsung-s3c6410-android.2.0,代码行数:22,代码来源:usb.c

示例14: fdma_do_bootload

static int fdma_do_bootload(struct fdma *fdma)
{
	int err;
	int result;

	result = snprintf(fdma->fw_name, sizeof(fdma->fw_name),
			  "fdma_%s_%d.elf", get_cpu_subtype(&current_cpu_data),
			  (fdma->pdev->id == -1) ? 0 : fdma->pdev->id);
	BUG_ON(result >= sizeof(fdma->fw_name)); /* was the string truncated? */

	fdma_dbg(fdma, "FDMA: Loading ELF Firmware (%s)...\n", fdma->fw_name);

	err = request_firmware_nowait(THIS_MODULE, 1, fdma->fw_name,
					&fdma->pdev->dev, (struct fdma *)fdma,
					(void *)fdma_load_elf);
	if (err)
		return -ENOMEM;

	wake_up(&fdma->fw_load_q);

	return 0;
}
开发者ID:geraldmusch,项目名称:satip-axe,代码行数:22,代码来源:fdma.c

示例15: rtl92cu_init_sw_vars

static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
{
	struct rtl_priv *rtlpriv = rtl_priv(hw);
	int err;

	rtlpriv->dm.dm_initialgain_enable = true;
	rtlpriv->dm.dm_flag = 0;
	rtlpriv->dm.disable_framebursting = false;
	rtlpriv->dm.thermalvalue = 0;
	rtlpriv->dbg.global_debuglevel = rtlpriv->cfg->mod_params->debug;

	INIT_WORK(&rtlpriv->works.fill_h2c_cmd,
		  rtl92cu_fill_h2c_cmd_work_callback);

	/* for firmware buf */
	rtlpriv->rtlhal.pfirmware = vzalloc(0x4000);
	if (!rtlpriv->rtlhal.pfirmware) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
			 "Can't alloc buffer for fw\n");
		return 1;
	}
	if (IS_VENDOR_UMC_A_CUT(rtlpriv->rtlhal.version) &&
	    !IS_92C_SERIAL(rtlpriv->rtlhal.version)) {
		rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cufw_A.bin";
	} else if (IS_81XXC_VENDOR_UMC_B_CUT(rtlpriv->rtlhal.version)) {
		rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cufw_B.bin";
	} else {
		rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cufw_TMSC.bin";
	}
	/* provide name of alternative file */
	rtlpriv->cfg->alt_fw_name = "rtlwifi/rtl8192cufw.bin";
	pr_info("Loading firmware %s\n", rtlpriv->cfg->fw_name);
	rtlpriv->max_fw_size = 0x4000;
	err = request_firmware_nowait(THIS_MODULE, 1,
				      rtlpriv->cfg->fw_name, rtlpriv->io.dev,
				      GFP_KERNEL, hw, rtl_fw_cb);
	return err;
}
开发者ID:UNwS,项目名称:rtl8192su,代码行数:38,代码来源:sw.c


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