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

C++ diagmem_free函数代码示例

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

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



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

示例1: diagfwd_write_complete

int diagfwd_write_complete(struct diag_request *diag_write_ptr)
{
	unsigned char *buf = diag_write_ptr->buf;
	/*Determine if the write complete is for data from arm9/apps/q6 */
	/* Need a context variable here instead */
	if (buf == (void *)driver->buf_in_1) {
		driver->in_busy_1 = 0;
		APPEND_DEBUG('o');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_work));
	} else if (buf == (void *)driver->buf_in_2) {
		driver->in_busy_2 = 0;
		APPEND_DEBUG('O');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_work));
	} else if (buf == (void *)driver->buf_in_qdsp_1) {
		driver->in_busy_qdsp_1 = 0;
		APPEND_DEBUG('p');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_qdsp_work));
	} else if (buf == (void *)driver->buf_in_qdsp_2) {
		driver->in_busy_qdsp_2 = 0;
		APPEND_DEBUG('P');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_qdsp_work));
	} else {
		diagmem_free(driver, (unsigned char *)buf, POOL_TYPE_HDLC);
		diagmem_free(driver, (unsigned char *)diag_write_ptr,
						 POOL_TYPE_WRITE_STRUCT);
		APPEND_DEBUG('q');
	}
	return 0;
}
开发者ID:Oleg-k,项目名称:Cranium_Kernel,代码行数:29,代码来源:diagfwd.c


示例2: diagfwd_write_complete

int diagfwd_write_complete(struct diag_request *diag_write_ptr)
{
	unsigned char *buf = diag_write_ptr->buf;
	/*Determine if the write complete is for data from arm9/apps/q6 */
	/* Need a context variable here instead */
	if (buf == (void *)driver->usb_buf_in) {
		driver->in_busy = 0;
		APPEND_DEBUG('o');
		spin_lock(&diagchar_smd_lock);
		__diag_smd_send_req(NON_SMD_CONTEXT);
		spin_unlock(&diagchar_smd_lock);
	} else if (buf == (void *)driver->usb_buf_in_qdsp) {
		driver->in_busy_qdsp = 0;
		APPEND_DEBUG('p');
		spin_lock(&diagchar_smd_qdsp_lock);
		__diag_smd_qdsp_send_req(NON_SMD_CONTEXT);
		spin_unlock(&diagchar_smd_qdsp_lock);
	} else {
		diagmem_free(driver, (unsigned char *)buf, POOL_TYPE_HDLC);
		diagmem_free(driver, (unsigned char *)diag_write_ptr,
							 POOL_TYPE_USB_STRUCT);
		APPEND_DEBUG('q');
	}
	return 0;
}
开发者ID:AntonioPT,项目名称:u8150-kernel-pulse-port,代码行数:25,代码来源:diagfwd.c


示例3: diag_process_hsic_work_fn

static void diag_process_hsic_work_fn(struct work_struct *work)
{
	struct diag_hsic_dci_dev *hsic_struct = container_of(work,
						struct diag_hsic_dci_dev,
						diag_process_hsic_work);
	int index = hsic_struct->id;

	if (!diag_hsic_dci[index].data) {
		diagmem_free(driver, diag_hsic_dci[index].data_buf,
			     POOL_TYPE_HSIC_DCI + index);
		return;
	}

	if (diag_hsic_dci[index].data_len <= 0) {
		diagmem_free(driver, diag_hsic_dci[index].data_buf,
			     POOL_TYPE_HSIC_DCI + index);
		return;
	}
	diag_process_hsic_dci_read_data(index, diag_hsic_dci[index].data,
					diag_hsic_dci[index].data_len);
	diagmem_free(driver, diag_hsic_dci[index].data_buf,
		     POOL_TYPE_HSIC_DCI + index);
	queue_work(diag_bridge_dci[index].wq,
		   &diag_hsic_dci[index].diag_read_hsic_work);
}
开发者ID:Pafcholini,项目名称:Nadia-kernel-KK-N910F-EUR-KK-OpenSource,代码行数:25,代码来源:diagfwd_hsic.c


示例4: diag_hsic_read_complete_callback

static void diag_hsic_read_complete_callback(void *ctxt, char *buf,
					int buf_size, int actual_size)
{
	int err = -2;

	if (!driver->hsic_ch) {
		/*
		 * The hsic channel is closed. Return the buffer to
		 * the pool.  Do not send it on.
		 */
		diagmem_free(driver, buf, POOL_TYPE_HSIC);
		pr_debug("diag: In %s: driver->hsic_ch == 0, actual_size: %d\n",
			__func__, actual_size);
		return;
	}

	/*
	 * Note that zero length is valid and still needs to be sent to
	 * the USB only when we are logging data to the USB
	 */
	if ((actual_size > 0) ||
		((actual_size == 0) && (driver->logging_mode == USB_MODE))) {
		if (!buf) {
			pr_err("diag: Out of diagmem for HSIC\n");
		} else {
			/*
			 * Send data in buf to be written on the
			 * appropriate device, e.g. USB MDM channel
			 */
			driver->write_len_mdm = actual_size;
			err = diag_device_write((void *)buf, HSIC_DATA, NULL);
			/* If an error, return buffer to the pool */
			if (err) {
				diagmem_free(driver, buf, POOL_TYPE_HSIC);
				pr_err_ratelimited("diag: In %s, error calling diag_device_write, err: %d\n",
					__func__, err);
			}
		}
	} else {
		/*
		 * The buffer has an error status associated with it. Do not
		 * pass it on. Note that -ENOENT is sent when the diag bridge
		 * is closed.
		 */
		diagmem_free(driver, buf, POOL_TYPE_HSIC);
		pr_debug("diag: In %s: error status: %d\n", __func__,
			actual_size);
	}

	/*
	 * If for some reason there was no hsic data to write to the
	 * mdm channel, set up another read
	 */
	if (err &&
		((driver->logging_mode == MEMORY_DEVICE_MODE) ||
		(driver->usb_mdm_connected && !driver->hsic_suspend))) {
		queue_work(driver->diag_hsic_wq,
				 &driver->diag_read_hsic_work);
	}
}
开发者ID:thedancomplex,项目名称:BMW-OpenSource,代码行数:60,代码来源:diagfwd_hsic.c


示例5: diagfwd_write_complete

int diagfwd_write_complete(struct diag_request *diag_write_ptr)
{
	unsigned char *buf = diag_write_ptr->buf;
	/*Determine if the write complete is for data from modem/apps/q6 */
	/* Need a context variable here instead */
	if (buf == (void *)driver->buf_in_1) {
		driver->in_busy_1 = 0;
		APPEND_DEBUG('o');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_work));
	} else if (buf == (void *)driver->buf_in_2) {
		driver->in_busy_2 = 0;
		APPEND_DEBUG('O');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_work));
	} else if (buf == (void *)driver->buf_in_qdsp_1) {
		driver->in_busy_qdsp_1 = 0;
		APPEND_DEBUG('p');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_qdsp_work));
	} else if (buf == (void *)driver->buf_in_qdsp_2) {
		driver->in_busy_qdsp_2 = 0;
		APPEND_DEBUG('P');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_qdsp_work));
	} else if (is_wcnss_used && buf == (void *)driver->buf_in_wcnss) {
		driver->in_busy_wcnss = 0;
		APPEND_DEBUG('R');
		queue_work(driver->diag_wq,
			 &(driver->diag_read_smd_wcnss_work));
#if DIAG_XPST
	} else if (driver->in_busy_dmrounter == 1) {
		driver->in_busy_dmrounter = 0;
#endif
	}
#ifdef CONFIG_DIAG_SDIO_PIPE
	else if (buf == (void *)driver->buf_in_sdio_1) {
		driver->in_busy_sdio_1 = 0;
		APPEND_DEBUG('q');
		queue_work(driver->diag_sdio_wq, &(driver->diag_read_sdio_work));
	} else if (buf == (void *)driver->buf_in_sdio_2) {
		driver->in_busy_sdio_2 = 0;
		APPEND_DEBUG('Q');
		queue_work(driver->diag_sdio_wq, &(driver->diag_read_sdio_work));
	}
#endif
	else {
		diagmem_free(driver, (unsigned char *)buf, POOL_TYPE_HDLC);
		diagmem_free(driver, (unsigned char *)diag_write_ptr,
						 POOL_TYPE_WRITE_STRUCT);
		APPEND_DEBUG('q');
	}
	return 0;
}
开发者ID:dic1911,项目名称:android_kernel_htc_gtou,代码行数:50,代码来源:diagfwd.c


示例6: diag_hsic_read_complete

static void diag_hsic_read_complete(void *ctxt, char *buf, int len,
				    int actual_size)
{
	int err = 0;
	int index = (int)(uintptr_t)ctxt;
	struct diag_hsic_info *ch = NULL;

	if (index < 0 || index >= NUM_HSIC_DEV) {
		pr_err_ratelimited("diag: In %s, invalid HSIC index %d\n",
				   __func__, index);
		return;
	}
	ch = &diag_hsic[index];

	/*
	 * Don't pass on the buffer if the channel is closed when a pending read
	 * completes. Also, actual size can be negative error codes - do not
	 * pass on the buffer.
	 */
	if (!ch->opened || actual_size <= 0)
		goto fail;
	err = diag_remote_dev_read_done(ch->dev_id, buf, actual_size);
	if (err)
		goto fail;
	return;

fail:
	diagmem_free(driver, buf, ch->mempool);
	queue_work(ch->hsic_wq, &ch->read_work);
	return;
}
开发者ID:Sony-Kernels,项目名称:android_kernel_sony_msm8994_suzuran_6.0.x,代码行数:31,代码来源:diagfwd_hsic.c


示例7: hsic_read_work_fn

static void hsic_read_work_fn(struct work_struct *work)
{
	int err = 0;
	unsigned char *buf = NULL;
	struct diag_hsic_info *ch = container_of(work, struct diag_hsic_info,
						 read_work);
	if (!ch || !ch->enabled || !ch->opened)
		return;

	do {
		buf = diagmem_alloc(driver, DIAG_MDM_BUF_SIZE, ch->mempool);
		if (!buf) {
			err = -ENOMEM;
			break;
		}

		err = diag_bridge_read(ch->id, buf, DIAG_MDM_BUF_SIZE);
		if (err) {
			diagmem_free(driver, buf, ch->mempool);
			pr_err_ratelimited("diag: Unable to read from HSIC channel %d, err: %d\n",
					   ch->id, err);
			break;
		}
	} while (buf);

	/* Read from the HSIC channel continously if the channel is present */
	if (!err)
		queue_work(ch->hsic_wq, &ch->read_work);
}
开发者ID:Sony-Kernels,项目名称:android_kernel_sony_msm8994_suzuran_6.0.x,代码行数:29,代码来源:diagfwd_hsic.c


示例8: diag_hsic_dci_read_complete_callback

static void diag_hsic_dci_read_complete_callback(void *ctxt, char *buf,
						 int buf_size, int actual_size)
{
	int index = (int)ctxt;

	if (!diag_hsic_dci[index].hsic_ch) {
		/*
		 * The HSIC channel is closed. Return the buffer to
		 * the pool.  Do not send it on.
		 */
		diagmem_free(driver, buf, POOL_TYPE_HSIC_DCI + index);
		pr_debug("diag: In %s: hsic_ch == 0, actual_size: %d\n",
			__func__, actual_size);
		return;
	}

	if (actual_size > 0 && actual_size <= READ_HSIC_BUF_SIZE_DCI) {
		if (!buf) {
			pr_err("diag: Out of diagmem for HSIC\n");
		} else {
			diag_dci_try_activate_wakeup_source();
			diag_hsic_dci[index].data_len = actual_size;
			diag_hsic_dci[index].data_buf = buf;
			memcpy(diag_hsic_dci[index].data, buf, actual_size);
			queue_work(diag_bridge_dci[index].wq,
				  &diag_hsic_dci[index].diag_process_hsic_work);
		}
	} else {
		/*
		 * The buffer has an error status associated with it. Do not
		 * pass it on. Note that -ENOENT is sent when the diag bridge
		 * is closed.
		 */
		diagmem_free(driver, buf, POOL_TYPE_HSIC_DCI + index);
		pr_debug("diag: In %s: error status: %d\n", __func__,
			actual_size);
	}

	/*
	 * Actual Size can be negative error codes. In such cases, don't
	 * queue another read. The HSIC channel can goto suspend.
	 * Queuing a read will prevent HSIC from going to suspend.
	 */
	if (actual_size >= 0)
		queue_work(diag_bridge_dci[index].wq,
			   &diag_hsic_dci[index].diag_read_hsic_work);
}
开发者ID:Pafcholini,项目名称:Nadia-kernel-KK-N910F-EUR-KK-OpenSource,代码行数:47,代码来源:diagfwd_hsic.c


示例9: diag_usb_write

int diag_usb_write(int id, unsigned char *buf, int len, int ctxt)
{
    int err = 0;
    struct diag_request *req = NULL;
    struct diag_usb_info *usb_info = NULL;

    if (id < 0 || id >= NUM_DIAG_USB_DEV) {
        pr_err_ratelimited("diag: In %s, Incorrect id %d\n",
                           __func__, id);
        return -EINVAL;
    }

    usb_info = &diag_usb[id];

    req = diagmem_alloc(driver, sizeof(struct diag_request),
                        usb_info->mempool);
    if (!req) {
        /*
         * This should never happen. It either means that we are
         * trying to write more buffers than the max supported by
         * this particualar diag USB channel at any given instance,
         * or the previous write ptrs are stuck in the USB layer.
         */
        pr_err_ratelimited("diag: In %s, cannot retrieve USB write ptrs for USB channel %s\n",
                           __func__, usb_info->name);
        return -ENOMEM;
    }

    req->buf = buf;
    req->length = len;
    req->context = (void *)(uintptr_t)ctxt;

    if (!usb_info->hdl || !usb_info->connected) {
        pr_debug_ratelimited("diag: USB ch %s is not connected\n",
                             usb_info->name);
        diagmem_free(driver, req, usb_info->mempool);
        return -ENODEV;
    }
    err = usb_diag_write(usb_info->hdl, req);
    if (err) {
        pr_err_ratelimited("diag: In %s, error writing to usb channel %s, err: %d\n",
                           __func__, usb_info->name, err);
        diagmem_free(driver, req, usb_info->mempool);
    }

    return err;
}
开发者ID:Clumsy-Kernel-Development,项目名称:M9_Kernel,代码行数:47,代码来源:diag_usb.c


示例10: diagfwd_write_complete

int diagfwd_write_complete(struct diag_request *diag_write_ptr)
{
	unsigned char *buf = diag_write_ptr->buf;
	int found_it = 0;
	int i;

	/* Determine if the write complete is for data from modem/apps/q6 */
	/* Need a context variable here instead */
	for (i = 0; i < NUM_SMD_DATA_CHANNELS; i++) {
		struct diag_smd_info *data = &(driver->smd_data[i]);
		if (buf == (void *)data->buf_in_1) {
			data->in_busy_1 = 0;
			queue_work(driver->diag_wq,
				&(data->diag_read_smd_work));
			found_it = 1;
			break;
		} else if (buf == (void *)data->buf_in_2) {
			data->in_busy_2 = 0;
			queue_work(driver->diag_wq,
				&(data->diag_read_smd_work));
			found_it = 1;
			break;
		}
	}
#ifdef CONFIG_DIAG_SDIO_PIPE
	if (!found_it) {
		if (buf == (void *)driver->buf_in_sdio) {
			if (machine_is_msm8x60_fusion() ||
				 machine_is_msm8x60_fusn_ffa())
				diagfwd_write_complete_sdio();
			else
				pr_err("diag: Incorrect buffer pointer while WRITE");
			found_it = 1;
		}
	}
#endif
	if (!found_it) {
		diagmem_free(driver, (unsigned char *)buf,
						POOL_TYPE_HDLC);
		diagmem_free(driver, (unsigned char *)diag_write_ptr,
						POOL_TYPE_WRITE_STRUCT);
	}
	return 0;
}
开发者ID:emuikernel,项目名称:YulongKernel,代码行数:44,代码来源:diagfwd.c


示例11: diagfwd_write_complete

int diagfwd_write_complete(struct diag_request *diag_write_ptr)
{
	unsigned char *buf = diag_write_ptr->buf;
	/*Determine if the write complete is for data from modem/apps/q6 */
	/* Need a context variable here instead */
	if (buf == (void *)driver->buf_in_1) {
		driver->in_busy_1 = 0;
		APPEND_DEBUG('o');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_work));
	} else if (buf == (void *)driver->buf_in_2) {
		driver->in_busy_2 = 0;
		APPEND_DEBUG('O');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_work));
	} else if (buf == (void *)driver->buf_in_qdsp_1) {
		driver->in_busy_qdsp_1 = 0;
		APPEND_DEBUG('p');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_qdsp_work));
	} else if (buf == (void *)driver->buf_in_qdsp_2) {
		driver->in_busy_qdsp_2 = 0;
		APPEND_DEBUG('P');
		queue_work(driver->diag_wq, &(driver->diag_read_smd_qdsp_work));
	} else if (buf == (void *)driver->buf_in_wcnss) {
		driver->in_busy_wcnss = 0;
		APPEND_DEBUG('R');
		queue_work(driver->diag_wq,
			 &(driver->diag_read_smd_wcnss_work));
	}
#ifdef CONFIG_DIAG_SDIO_PIPE
	else if (buf == (void *)driver->buf_in_sdio)
		if (machine_is_msm8x60_fusion() ||
					 machine_is_msm8x60_fusn_ffa())
			diagfwd_write_complete_sdio();
		else
			pr_err("diag: Incorrect buffer pointer while WRITE");
#endif
	else {
		diagmem_free(driver, (unsigned char *)buf, POOL_TYPE_HDLC);
		diagmem_free(driver, (unsigned char *)diag_write_ptr,
						 POOL_TYPE_WRITE_STRUCT);
		APPEND_DEBUG('q');
	}
	return 0;
}
开发者ID:desalesouche,项目名称:kernel_huawei,代码行数:43,代码来源:diagfwd.c


示例12: diagfwd_write_complete_hsic

/*
 * diagfwd_write_complete_hsic is called after the asynchronous
 * usb_diag_write() on mdm channel is complete
 */
int diagfwd_write_complete_hsic(struct diag_request *diag_write_ptr, int index)
{
	unsigned char *buf = (diag_write_ptr) ? diag_write_ptr->buf : NULL;

	if (buf) {
		/* Return buffers to their pools */
		diagmem_free(driver, (unsigned char *)buf, index + POOL_TYPE_HSIC);
		diagmem_free(driver, (unsigned char *)diag_write_ptr, index + POOL_TYPE_HSIC_WRITE);
	}

	if (!diag_hsic[index].hsic_ch) {
		pr_err("diag: In %s: hsic_ch == 0\n", __func__);
		return 0;
	}

	/* Read data from the HSIC */
	queue_work(diag_bridge[index].wq, &diag_hsic[index].diag_read_hsic_work);

	return 0;
}
开发者ID:FrozenCow,项目名称:FIRE-ICE,代码行数:24,代码来源:diagfwd_hsic.c


示例13: diag_usb_write

int diag_usb_write(int id, unsigned char *buf, int len, int ctxt)
{
	int err = 0;
	struct diag_request *req = NULL;
	struct diag_usb_info *usb_info = NULL;

	if (id < 0 || id >= NUM_DIAG_USB_DEV) {
		pr_err_ratelimited("diag: In %s, Incorrect id %d\n",
				   __func__, id);
		return -EINVAL;
	}

	usb_info = &diag_usb[id];

	req = diagmem_alloc(driver, sizeof(struct diag_request),
			    usb_info->mempool);
	if (!req) {
		pr_err_ratelimited("diag: In %s, cannot retrieve USB write ptrs for USB channel %s\n",
				   __func__, usb_info->name);
		return -ENOMEM;
	}

	req->buf = buf;
	req->length = len;
	req->context = (void *)(uintptr_t)ctxt;

	if (!usb_info->hdl || !usb_info->connected) {
		pr_debug_ratelimited("diag: USB ch %s is not connected\n",
				     usb_info->name);
		diagmem_free(driver, req, usb_info->mempool);
		return -ENODEV;
	}
	err = usb_diag_write(usb_info->hdl, req);
	if (err) {
		pr_err_ratelimited("diag: In %s, error writing to usb channel %s, err: %d\n",
				   __func__, usb_info->name, err);
		diagmem_free(driver, req, usb_info->mempool);
	}

	return err;
}
开发者ID:Flinny,项目名称:kernel_htc_msm8994,代码行数:41,代码来源:diag_usb.c


示例14: diagfwd_write_complete_hsic

int diagfwd_write_complete_hsic(struct diag_request *diag_write_ptr)
{
	unsigned char *buf = (diag_write_ptr) ? diag_write_ptr->buf : NULL;

	if (buf) {
		
		diagmem_free(driver, (unsigned char *)buf, POOL_TYPE_HSIC);
		diagmem_free(driver, (unsigned char *)diag_write_ptr,
							POOL_TYPE_HSIC_WRITE);
	}

	if (!driver->hsic_ch) {
		pr_err("diag: In %s: driver->hsic_ch == 0\n", __func__);
		return 0;
	}

	
	queue_work(driver->diag_bridge_wq, &driver->diag_read_hsic_work);

	return 0;
}
开发者ID:mdeejay,项目名称:android_kernel_dlxu,代码行数:21,代码来源:diagfwd_hsic.c


示例15: diag_drain_work_fn

void diag_drain_work_fn(struct work_struct *work)
{
	int err = 0;
	timer_in_progress = 0;

	mutex_lock(&driver->diagchar_mutex);
	if (buf_hdlc) {
		err = diag_device_write(buf_hdlc, APPS_DATA, NULL);
		if (err) {
			/*Free the buffer right away if write failed */
			diagmem_free(driver, buf_hdlc, POOL_TYPE_HDLC);
			diagmem_free(driver, (unsigned char *)driver->
				 write_ptr_svc, POOL_TYPE_WRITE_STRUCT);
		}
		buf_hdlc = NULL;
		diag_printk(1,"diag:%s Number of bytes written "
				 "from timer is %d ",__func__, driver->used);
		driver->used = 0;
	}
	mutex_unlock(&driver->diagchar_mutex);
}
开发者ID:KonstaT,项目名称:sailfishos_kernel_jolla_msm8930,代码行数:21,代码来源:diagchar_core.c


示例16: hsic_fwd_complete

static int hsic_fwd_complete(int id, unsigned char *buf, int len, int ctxt)
{
	if (id < 0 || id >= NUM_HSIC_DEV) {
		pr_err_ratelimited("diag: In %s, invalid index %d\n",
				   __func__, id);
		return -EINVAL;
	}
	if (!buf)
		return -EIO;
	diagmem_free(driver, buf, diag_hsic[id].mempool);
	queue_work(diag_hsic[id].hsic_wq, &(diag_hsic[id].read_work));
	return 0;
}
开发者ID:Sony-Kernels,项目名称:android_kernel_sony_msm8994_suzuran_6.0.x,代码行数:13,代码来源:diagfwd_hsic.c


示例17: diag_drain_work_fn

void diag_drain_work_fn(struct work_struct *work)
{
	int err = 0;
	timer_in_progress = 0;

	mutex_lock(&driver->diagchar_mutex);
	if (buf_hdlc) {
		err = diag_device_write(buf_hdlc, APPS_DATA, NULL);
		if (err) {
			/*Free the buffer right away if write failed */
			diagmem_free(driver, buf_hdlc, POOL_TYPE_HDLC);
			diagmem_free(driver, (unsigned char *)driver->
				 usb_write_ptr_svc, POOL_TYPE_USB_STRUCT);
		}
		buf_hdlc = NULL;
#ifdef DIAG_DEBUG
		printk(KERN_INFO "\n Number of bytes written "
				 "from timer is %d ", driver->used);
#endif
		driver->used = 0;
	}
	mutex_unlock(&driver->diagchar_mutex);
}
开发者ID:manuelnaranjo,项目名称:P500-2.6.32.x,代码行数:23,代码来源:diagchar_core.c


示例18: lge_dm_usb_fn

void lge_dm_usb_fn(struct work_struct *work)
{
    int err = 0;
    struct diag_usb_info *usb_info = NULL;

#ifndef CONFIG_DIAGFWD_BRIDGE_CODE
    usb_info = &diag_usb[DIAG_MUX_LOCAL];
#else
    usb_info = &diag_usb[DIAG_MUX_MDM];
#endif

    err = usb_diag_write(usb_info->hdl, lge_dm_tty->dm_usb_req);
    if (err)
        diagmem_free(driver, lge_dm_tty->dm_usb_req, usb_info->mempool);
}
开发者ID:TeamRegular,项目名称:android_kernel_lge_msm8992,代码行数:15,代码来源:lg_dm_tty.c


示例19: diag_usb_write_done

static void diag_usb_write_done(struct diag_usb_info *ch,
				struct diag_request *req)
{
	int ctxt = 0;

	if (!ch || !req)
		return;

	ch->write_cnt++;
	ctxt = (int)(uintptr_t)req->context;
	if (ch->ops && ch->ops->write_done)
		ch->ops->write_done(req->buf, req->actual, ctxt, ch->ctxt);
	diagmem_free(driver, req, ch->mempool);
	queue_work(ch->usb_wq, &(ch->read_work));
}
开发者ID:magnostik,项目名称:kernel-msm-3.10,代码行数:15,代码来源:diag_usb.c


示例20: diag_clear_hsic_tbl

void diag_clear_hsic_tbl(void)
{
    int i;

    driver->num_hsic_buf_tbl_entries = 0;
    for (i = 0; i < driver->poolsize_hsic_write; i++) {
        if (driver->hsic_buf_tbl[i].buf) {
            /* Return the buffer to the pool */
            diagmem_free(driver, (unsigned char *)
                         (driver->hsic_buf_tbl[i].buf),
                         POOL_TYPE_HSIC);
            driver->hsic_buf_tbl[i].buf = 0;
        }
        driver->hsic_buf_tbl[i].length = 0;
    }
}
开发者ID:nsingh94,项目名称:msm7x30-caf,代码行数:16,代码来源:diagchar_core.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ diagnostics函数代码示例发布时间:2022-05-30
下一篇:
C++ diagfwd_connect函数代码示例发布时间: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