Exemple #1
0
static int adb_enable_release(struct inode *ip, struct file *fp)
{
	struct adb_context *ctxt = &_context;

	DBG("%s(): Disabling adb function ###\n", __func__);
	usb_function_enable(ADB_FUNCTION_NAME, 0);
	_unlock(&ctxt->enable_excl);
	return 0;
}
static int mtp_tunnel_enable_release(struct inode *ip, struct file *fp)
{
	struct mtp_tunnel_context *ctxt = &_context;

	DBG("%s(): Disabling %s function ###\n", __func__, MTP_TUNNEL_FUNCTION_NAME);
	usb_function_enable(MTP_TUNNEL_FUNCTION_NAME, 0);
	_unlock(&ctxt->enable_open_excl);
	return 0;
}
Exemple #3
0
static int adb_enable_release(struct inode *ip, struct file *fp)
{
	struct adb_context *ctxt = &_context;

	printk(KERN_INFO "disabling adb function\n");
	usb_function_enable(ADB_FUNCTION_NAME, 0);
	_unlock(&ctxt->enable_excl);
	return 0;
}
Exemple #4
0
static int adb_enable_open(struct inode *ip, struct file *fp)
{
	struct adb_context *ctxt = &_context;

	if (_lock(&ctxt->enable_excl))
		return -EBUSY;

	DBG("%s(): Enabling adb function ###\n", __func__);
	usb_function_enable(ADB_FUNCTION_NAME, 1);
	/* clear the error latch */
	ctxt->error = 0;

	return 0;
}
static int mtp_tunnel_enable_open(struct inode *ip, struct file *fp)
{
	struct mtp_tunnel_context *ctxt = &_context;

	if (_lock(&ctxt->enable_open_excl))
		return -EBUSY;

	DBG("%s(): Enabling %s function ###\n", __func__, MTP_TUNNEL_FUNCTION_NAME);
	usb_function_enable(MTP_TUNNEL_FUNCTION_NAME, 1);
	/* clear the error latch */
	ctxt->error = 0;

	return 0;
}
Exemple #6
0
static int adb_enable_open(struct inode *ip, struct file *fp)
{
	struct adb_context *ctxt = &_context;

	if (_lock(&ctxt->enable_excl))
		return -EBUSY;

	printk(KERN_INFO "enabling adb function\n");
	usb_function_enable(ADB_FUNCTION_NAME, 1);
	/* clear the error latch */
	ctxt->error = 0;

	return 0;
}