فهرست منبع

Merge f9a2d47d34d8e1180d8daede13863b94f38ea547 on remote branch

Change-Id: If9956c672d26689530f10e753c1e5ab6f890699d
Linux Build Service Account 2 سال پیش
والد
کامیت
5648fe74ba
2فایلهای تغییر یافته به همراه11 افزوده شده و 7 حذف شده
  1. 2 0
      Android.mk
  2. 9 7
      drivers/spcom.c

+ 2 - 0
Android.mk

@@ -6,6 +6,8 @@ ifeq ($(call is-board-platform-in-list,kalama pineapple),true)
 ifneq ($(findstring vendor,$(LOCAL_PATH)),)
 	LOCAL_PATH := $(call my-dir)
 	SPU_BLD_DIR := $(TOP)/vendor/qcom/opensource/spu-kernel
+	LOCAL_MODULE_DDK_BUILD := true
+	LOCAL_MODULE_KO_DIRS := drivers/spcom.ko drivers/spss_utils.ko
 	DLKM_DIR := $(TOP)/device/qcom/common/dlkm
 	INSTALL_MODULE_HEADERS := 1
 

+ 9 - 7
drivers/spcom.c

@@ -679,8 +679,12 @@ static int spcom_handle_create_channel_command(void *cmd_buf, int cmd_size)
 	mutex_lock(&spcom_dev->chdev_count_lock);
 	ret = spcom_create_channel_chardev(cmd->ch_name, cmd->is_sharable);
 	mutex_unlock(&spcom_dev->chdev_count_lock);
-	if (ret)
-		spcom_pr_err("failed to create ch[%s], ret [%d]\n", cmd->ch_name, ret);
+	if (ret) {
+		if (-EINVAL == ret)
+			spcom_pr_err("failed to create channel, ret [%d]\n", ret);
+		else
+			spcom_pr_err("failed to create ch[%s], ret [%d]\n", cmd->ch_name, ret);
+	}
 
 	return ret;
 }
@@ -2907,15 +2911,13 @@ static int spcom_ioctl_handle_get_message(struct spcom_ioctl_message *arg, void
 	ch_name = arg->ch_name;
 	if (!is_valid_ch_name(ch_name)) {
 		spcom_pr_err("invalid channel name\n");
-		ret = -EINVAL;
-		goto get_message_out;
+		return -EINVAL;
 	}
 
 	/* DEVICE_NAME name is reserved for control channel */
 	if (is_control_channel_name(ch_name)) {
 		spcom_pr_err("cannot send message on management channel %s\n", ch_name);
-		ret = -EFAULT;
-		goto get_message_out;
+		return -EFAULT;
 	}
 
 	ch = spcom_find_channel_by_name(ch_name);
@@ -2991,7 +2993,7 @@ static int spcom_ioctl_handle_get_message(struct spcom_ioctl_message *arg, void
 
 get_message_out:
 
-	if (ch && ch->active_pid == current_pid()) {
+	if (ch->active_pid == current_pid()) {
 		ch->active_pid = 0;
 		mutex_unlock(&ch->shared_sync_lock);
 	}