Loading drivers/soc/qcom/spcom.c +7 −3 Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ struct spcom_device { int channel_count; /* private */ struct mutex lock; struct mutex cmd_lock; /* Link state */ struct completion link_state_changed; Loading Loading @@ -1952,6 +1952,8 @@ static int spcom_handle_write(struct spcom_channel *ch, swap_id = htonl(cmd->cmd_id); memcpy(cmd_name, &swap_id, sizeof(int)); mutex_lock(&spcom_dev->cmd_lock); pr_debug("cmd_id [0x%x] cmd_name [%s].\n", cmd_id, cmd_name); switch (cmd_id) { Loading @@ -1972,9 +1974,11 @@ static int spcom_handle_write(struct spcom_channel *ch, break; default: pr_err("Invalid Command Id [0x%x].\n", (int) cmd->cmd_id); return -EINVAL; ret = -EINVAL; } mutex_unlock(&spcom_dev->cmd_lock); return ret; } Loading Loading @@ -2675,7 +2679,7 @@ static int spcom_probe(struct platform_device *pdev) return -ENOMEM; spcom_dev = dev; mutex_init(&dev->lock); mutex_init(&spcom_dev->cmd_lock); init_completion(&dev->link_state_changed); spcom_dev->link_state = GLINK_LINK_STATE_DOWN; Loading Loading
drivers/soc/qcom/spcom.c +7 −3 Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ struct spcom_device { int channel_count; /* private */ struct mutex lock; struct mutex cmd_lock; /* Link state */ struct completion link_state_changed; Loading Loading @@ -1952,6 +1952,8 @@ static int spcom_handle_write(struct spcom_channel *ch, swap_id = htonl(cmd->cmd_id); memcpy(cmd_name, &swap_id, sizeof(int)); mutex_lock(&spcom_dev->cmd_lock); pr_debug("cmd_id [0x%x] cmd_name [%s].\n", cmd_id, cmd_name); switch (cmd_id) { Loading @@ -1972,9 +1974,11 @@ static int spcom_handle_write(struct spcom_channel *ch, break; default: pr_err("Invalid Command Id [0x%x].\n", (int) cmd->cmd_id); return -EINVAL; ret = -EINVAL; } mutex_unlock(&spcom_dev->cmd_lock); return ret; } Loading Loading @@ -2675,7 +2679,7 @@ static int spcom_probe(struct platform_device *pdev) return -ENOMEM; spcom_dev = dev; mutex_init(&dev->lock); mutex_init(&spcom_dev->cmd_lock); init_completion(&dev->link_state_changed); spcom_dev->link_state = GLINK_LINK_STATE_DOWN; Loading