Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea7e56a7 authored by Jigarkumar Zala's avatar Jigarkumar Zala Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: update common logging macros



Start using common logging macros for SMMU, Sync, Core and Util modules
for info/debug/warn/error logs.

Change-Id: I2ba73290ba51fca74c97f958d096e1299498ae10
Signed-off-by: default avatarJigarkumar Zala <jzala@codeaurora.org>
parent 01e80386
Loading
Loading
Loading
Loading
+45 −48
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include <linux/slab.h>
#include <linux/uaccess.h>
#include "cam_context.h"
#include "cam_debug_util.h"

static int cam_context_handle_hw_event(void *context, uint32_t evt_id,
	void *evt_data)
@@ -21,7 +22,7 @@ static int cam_context_handle_hw_event(void *context, uint32_t evt_id,
	struct cam_context *ctx = (struct cam_context *)context;

	if (!ctx || !ctx->state_machine) {
		pr_err("%s: Context is not ready.\n", __func__);
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
	}

@@ -29,8 +30,9 @@ static int cam_context_handle_hw_event(void *context, uint32_t evt_id,
		rc = ctx->state_machine[ctx->state].irq_ops(ctx, evt_id,
			evt_data);
	else
		pr_debug("%s: No function to handle event %d in dev %d, state %d\n",
				__func__, evt_id, ctx->dev_hdl, ctx->state);
		CAM_DBG(CAM_CORE,
			"No function to handle event %d in dev %d, state %d",
			evt_id, ctx->dev_hdl, ctx->state);
	return rc;
}

@@ -40,12 +42,12 @@ int cam_context_handle_crm_get_dev_info(struct cam_context *ctx,
	int rc;

	if (!ctx->state_machine) {
		pr_err("%s: Context is not ready.\n'", __func__);
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
	}

	if (!info) {
		pr_err("%s: Invalid get device info payload.\n", __func__);
		CAM_ERR(CAM_CORE, "Invalid get device info payload");
		return -EINVAL;
	}

@@ -54,8 +56,8 @@ int cam_context_handle_crm_get_dev_info(struct cam_context *ctx,
		rc = ctx->state_machine[ctx->state].crm_ops.get_dev_info(
			ctx, info);
	} else {
		pr_err("%s: No get device info in dev %d, state %d\n",
			__func__, ctx->dev_hdl, ctx->state);
		CAM_ERR(CAM_CORE, "No get device info in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
		rc = -EPROTO;
	}
	mutex_unlock(&ctx->ctx_mutex);
@@ -69,12 +71,12 @@ int cam_context_handle_crm_link(struct cam_context *ctx,
	int rc;

	if (!ctx->state_machine) {
		pr_err("%s: Context is not ready.\n", __func__);
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
	}

	if (!link) {
		pr_err("%s: Invalid link payload.\n", __func__);
		CAM_ERR(CAM_CORE, "Invalid link payload");
		return -EINVAL;
	}

@@ -82,7 +84,7 @@ int cam_context_handle_crm_link(struct cam_context *ctx,
	if (ctx->state_machine[ctx->state].crm_ops.link) {
		rc = ctx->state_machine[ctx->state].crm_ops.link(ctx, link);
	} else {
		pr_err("%s: No crm link in dev %d, state %d\n", __func__,
		CAM_ERR(CAM_CORE, "No crm link in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
		rc = -EPROTO;
	}
@@ -97,12 +99,12 @@ int cam_context_handle_crm_unlink(struct cam_context *ctx,
	int rc;

	if (!ctx->state_machine) {
		pr_err("%s: Context is not ready!\n", __func__);
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
	}

	if (!unlink) {
		pr_err("%s: Invalid unlink payload.\n", __func__);
		CAM_ERR(CAM_CORE, "Invalid unlink payload");
		return -EINVAL;
	}

@@ -111,8 +113,8 @@ int cam_context_handle_crm_unlink(struct cam_context *ctx,
		rc = ctx->state_machine[ctx->state].crm_ops.unlink(
			ctx, unlink);
	} else {
		pr_err("%s: No crm unlink in dev %d, state %d\n",
			__func__, ctx->dev_hdl, ctx->state);
		CAM_ERR(CAM_CORE, "No crm unlink in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
		rc = -EPROTO;
	}
	mutex_unlock(&ctx->ctx_mutex);
@@ -126,12 +128,12 @@ int cam_context_handle_crm_apply_req(struct cam_context *ctx,
	int rc;

	if (!ctx->state_machine) {
		pr_err("%s: Context is not ready.\n'", __func__);
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
	}

	if (!apply) {
		pr_err("%s: Invalid apply request payload.\n'", __func__);
		CAM_ERR(CAM_CORE, "Invalid apply request payload");
		return -EINVAL;
	}

@@ -140,8 +142,8 @@ int cam_context_handle_crm_apply_req(struct cam_context *ctx,
		rc = ctx->state_machine[ctx->state].crm_ops.apply_req(ctx,
			apply);
	} else {
		pr_err("%s: No crm apply req in dev %d, state %d\n",
			__func__, ctx->dev_hdl, ctx->state);
		CAM_ERR(CAM_CORE, "No crm apply req in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
		rc = -EPROTO;
	}
	mutex_unlock(&ctx->ctx_mutex);
@@ -155,7 +157,7 @@ int cam_context_handle_crm_flush_req(struct cam_context *ctx,
	int rc;

	if (!ctx->state_machine) {
		pr_err("%s: Context is not ready\n", __func__);
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
	}

@@ -164,8 +166,8 @@ int cam_context_handle_crm_flush_req(struct cam_context *ctx,
		rc = ctx->state_machine[ctx->state].crm_ops.flush_req(ctx,
			flush);
	} else {
		pr_err("%s: No crm flush req in dev %d, state %d\n",
			__func__, ctx->dev_hdl, ctx->state);
		CAM_ERR(CAM_CORE, "No crm flush req in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
		rc = -EPROTO;
	}
	mutex_unlock(&ctx->ctx_mutex);
@@ -179,13 +181,12 @@ int cam_context_handle_acquire_dev(struct cam_context *ctx,
	int rc;

	if (!ctx->state_machine) {
		pr_err("%s: Context is not ready.\n", __func__);
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
	}

	if (!cmd) {
		pr_err("%s: Invalid acquire device command payload.\n",
			__func__);
		CAM_ERR(CAM_CORE, "Invalid acquire device command payload");
		return -EINVAL;
	}

@@ -194,8 +195,8 @@ int cam_context_handle_acquire_dev(struct cam_context *ctx,
		rc = ctx->state_machine[ctx->state].ioctl_ops.acquire_dev(
			ctx, cmd);
	} else {
		pr_err("%s: No acquire device in dev %d, state %d\n",
			__func__, cmd->dev_handle, ctx->state);
		CAM_ERR(CAM_CORE, "No acquire device in dev %d, state %d",
			cmd->dev_handle, ctx->state);
		rc = -EPROTO;
	}
	mutex_unlock(&ctx->ctx_mutex);
@@ -209,13 +210,12 @@ int cam_context_handle_release_dev(struct cam_context *ctx,
	int rc;

	if (!ctx->state_machine) {
		pr_err("%s: Context is not ready.\n", __func__);
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
	}

	if (!cmd) {
		pr_err("%s: Invalid release device command payload.\n",
			__func__);
		CAM_ERR(CAM_CORE, "Invalid release device command payload");
		return -EINVAL;
	}

@@ -224,8 +224,8 @@ int cam_context_handle_release_dev(struct cam_context *ctx,
		rc = ctx->state_machine[ctx->state].ioctl_ops.release_dev(
			ctx, cmd);
	} else {
		pr_err("%s: No release device in dev %d, state %d\n",
			__func__, ctx->dev_hdl, ctx->state);
		CAM_ERR(CAM_CORE, "No release device in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
		rc = -EPROTO;
	}
	mutex_unlock(&ctx->ctx_mutex);
@@ -239,13 +239,12 @@ int cam_context_handle_config_dev(struct cam_context *ctx,
	int rc;

	if (!ctx->state_machine) {
		pr_err("%s: context is not ready\n'", __func__);
		CAM_ERR(CAM_CORE, "context is not ready");
		return -EINVAL;
	}

	if (!cmd) {
		pr_err("%s: Invalid config device command payload.\n",
			__func__);
		CAM_ERR(CAM_CORE, "Invalid config device command payload");
		return -EINVAL;
	}

@@ -254,8 +253,8 @@ int cam_context_handle_config_dev(struct cam_context *ctx,
		rc = ctx->state_machine[ctx->state].ioctl_ops.config_dev(
			ctx, cmd);
	} else {
		pr_err("%s: No config device in dev %d, state %d\n",
			__func__, ctx->dev_hdl, ctx->state);
		CAM_ERR(CAM_CORE, "No config device in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
		rc = -EPROTO;
	}
	mutex_unlock(&ctx->ctx_mutex);
@@ -269,13 +268,12 @@ int cam_context_handle_start_dev(struct cam_context *ctx,
	int rc = 0;

	if (!ctx->state_machine) {
		pr_err("%s: Context is not ready.\n", __func__);
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
	}

	if (!cmd) {
		pr_err("%s: Invalid start device command payload.\n",
			__func__);
		CAM_ERR(CAM_CORE, "Invalid start device command payload");
		return -EINVAL;
	}

@@ -285,8 +283,8 @@ int cam_context_handle_start_dev(struct cam_context *ctx,
			ctx, cmd);
	else
		/* start device can be optional for some driver */
		pr_debug("%s: No start device in dev %d, state %d\n",
			__func__, ctx->dev_hdl, ctx->state);
		CAM_DBG(CAM_CORE, "No start device in dev %d, state %d",
			ctx->dev_hdl, ctx->state);

	mutex_unlock(&ctx->ctx_mutex);

@@ -299,13 +297,12 @@ int cam_context_handle_stop_dev(struct cam_context *ctx,
	int rc = 0;

	if (!ctx->state_machine) {
		pr_err("%s: Context is not ready.\n'", __func__);
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
	}

	if (!cmd) {
		pr_err("%s: Invalid stop device command payload.\n",
			__func__);
		CAM_ERR(CAM_CORE, "Invalid stop device command payload");
		return -EINVAL;
	}

@@ -315,8 +312,8 @@ int cam_context_handle_stop_dev(struct cam_context *ctx,
			ctx, cmd);
	else
		/* stop device can be optional for some driver */
		pr_warn("%s: No stop device in dev %d, state %d\n",
			__func__, ctx->dev_hdl, ctx->state);
		CAM_WARN(CAM_CORE, "No stop device in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
	mutex_unlock(&ctx->ctx_mutex);

	return rc;
@@ -332,7 +329,7 @@ int cam_context_init(struct cam_context *ctx,

	/* crm_node_intf is optinal */
	if (!ctx || !hw_mgr_intf || !req_list) {
		pr_err("%s: Invalid input parameters\n", __func__);
		CAM_ERR(CAM_CORE, "Invalid input parameters");
		return -EINVAL;
	}

@@ -375,7 +372,7 @@ int cam_context_deinit(struct cam_context *ctx)
	 * so we just free the memory for the context
	 */
	if (ctx->state != CAM_CTX_AVAILABLE)
		pr_err("%s: Device did not shutdown cleanly.\n", __func__);
		CAM_ERR(CAM_CORE, "Device did not shutdown cleanly");

	memset(ctx, 0, sizeof(*ctx));

+48 −48
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

#include "cam_node.h"
#include "cam_trace.h"

#include "cam_debug_util.h"
static void  __cam_node_handle_shutdown(struct cam_node *node)
{
	if (node->hw_mgr_intf.hw_close)
@@ -30,7 +30,7 @@ static int __cam_node_handle_query_cap(struct cam_node *node,
	int rc = -EFAULT;

	if (!query) {
		pr_err("%s: Invalid params\n", __func__);
		CAM_ERR(CAM_CORE, "Invalid params");
		return -EINVAL;
	}

@@ -65,7 +65,7 @@ static int __cam_node_handle_acquire_dev(struct cam_node *node,

	rc = cam_context_handle_acquire_dev(ctx, acquire);
	if (rc) {
		pr_err("%s: Acquire device failed\n", __func__);
		CAM_ERR(CAM_CORE, "Acquire device failed");
		goto free_ctx;
	}

@@ -87,19 +87,19 @@ static int __cam_node_handle_start_dev(struct cam_node *node,
		return -EINVAL;

	if (start->dev_handle <= 0) {
		pr_err("Invalid device handle for context\n");
		CAM_ERR(CAM_CORE, "Invalid device handle for context");
		return -EINVAL;
	}

	if (start->session_handle <= 0) {
		pr_err("Invalid session handle for context\n");
		CAM_ERR(CAM_CORE, "Invalid session handle for context");
		return -EINVAL;
	}

	ctx = (struct cam_context *)cam_get_device_priv(start->dev_handle);
	if (!ctx) {
		pr_err("%s: Can not get context for handle %d\n",
			__func__, start->dev_handle);
		CAM_ERR(CAM_CORE, "Can not get context for handle %d",
			start->dev_handle);
		return -EINVAL;
	}

@@ -115,19 +115,19 @@ static int __cam_node_handle_stop_dev(struct cam_node *node,
		return -EINVAL;

	if (stop->dev_handle <= 0) {
		pr_err("Invalid device handle for context\n");
		CAM_ERR(CAM_CORE, "Invalid device handle for context");
		return -EINVAL;
	}

	if (stop->session_handle <= 0) {
		pr_err("Invalid session handle for context\n");
		CAM_ERR(CAM_CORE, "Invalid session handle for context");
		return -EINVAL;
	}

	ctx = (struct cam_context *)cam_get_device_priv(stop->dev_handle);
	if (!ctx) {
		pr_err("%s: Can not get context for handle %d\n",
			__func__, stop->dev_handle);
		CAM_ERR(CAM_CORE, "Can not get context for handle %d",
			stop->dev_handle);
		return -EINVAL;
	}

@@ -143,19 +143,19 @@ static int __cam_node_handle_config_dev(struct cam_node *node,
		return -EINVAL;

	if (config->dev_handle <= 0) {
		pr_err("Invalid device handle for context\n");
		CAM_ERR(CAM_CORE, "Invalid device handle for context");
		return -EINVAL;
	}

	if (config->session_handle <= 0) {
		pr_err("Invalid session handle for context\n");
		CAM_ERR(CAM_CORE, "Invalid session handle for context");
		return -EINVAL;
	}

	ctx = (struct cam_context *)cam_get_device_priv(config->dev_handle);
	if (!ctx) {
		pr_err("%s: Can not get context for handle %d\n",
			__func__, config->dev_handle);
		CAM_ERR(CAM_CORE, "Can not get context for handle %d",
			config->dev_handle);
		return -EINVAL;
	}

@@ -172,29 +172,29 @@ static int __cam_node_handle_release_dev(struct cam_node *node,
		return -EINVAL;

	if (release->dev_handle <= 0) {
		pr_err("Invalid device handle for context\n");
		CAM_ERR(CAM_CORE, "Invalid device handle for context");
		return -EINVAL;
	}

	if (release->session_handle <= 0) {
		pr_err("Invalid session handle for context\n");
		CAM_ERR(CAM_CORE, "Invalid session handle for context");
		return -EINVAL;
	}

	ctx = (struct cam_context *)cam_get_device_priv(release->dev_handle);
	if (!ctx) {
		pr_err("%s: Can not get context for handle %d\n",
			__func__, release->dev_handle);
		CAM_ERR(CAM_CORE, "Can not get context for handle %d",
			release->dev_handle);
		return -EINVAL;
	}

	rc = cam_context_handle_release_dev(ctx, release);
	if (rc)
		pr_err("%s: context release failed\n", __func__);
		CAM_ERR(CAM_CORE, "context release failed");

	rc = cam_destroy_device_hdl(release->dev_handle);
	if (rc)
		pr_err("%s: destroy device handle is failed\n", __func__);
		CAM_ERR(CAM_CORE, "destroy device handle is failed");

	mutex_lock(&node->list_mutex);
	list_add_tail(&ctx->list, &node->free_ctx_list);
@@ -211,8 +211,8 @@ static int __cam_node_crm_get_dev_info(struct cam_req_mgr_device_info *info)

	ctx = (struct cam_context *) cam_get_device_priv(info->dev_hdl);
	if (!ctx) {
		pr_err("%s: Can not get context  for handle %d\n",
			__func__, info->dev_hdl);
		CAM_ERR(CAM_CORE, "Can not get context  for handle %d",
			info->dev_hdl);
		return -EINVAL;
	}
	return cam_context_handle_crm_get_dev_info(ctx, info);
@@ -229,8 +229,8 @@ static int __cam_node_crm_link_setup(

	ctx = (struct cam_context *) cam_get_device_priv(setup->dev_hdl);
	if (!ctx) {
		pr_err("%s: Can not get context for handle %d\n",
			__func__, setup->dev_hdl);
		CAM_ERR(CAM_CORE, "Can not get context for handle %d",
			setup->dev_hdl);
		return -EINVAL;
	}

@@ -251,8 +251,8 @@ static int __cam_node_crm_apply_req(struct cam_req_mgr_apply_request *apply)

	ctx = (struct cam_context *) cam_get_device_priv(apply->dev_hdl);
	if (!ctx) {
		pr_err("%s: Can not get context for handle %d\n",
			__func__, apply->dev_hdl);
		CAM_ERR(CAM_CORE, "Can not get context for handle %d",
			apply->dev_hdl);
		return -EINVAL;
	}

@@ -266,14 +266,14 @@ static int __cam_node_crm_flush_req(struct cam_req_mgr_flush_request *flush)
	struct cam_context *ctx = NULL;

	if (!flush) {
		pr_err("%s: Invalid flush request payload\n", __func__);
		CAM_ERR(CAM_CORE, "Invalid flush request payload");
		return -EINVAL;
	}

	ctx = (struct cam_context *) cam_get_device_priv(flush->dev_hdl);
	if (!ctx) {
		pr_err("%s: Can not get context for handle %d\n",
			__func__, flush->dev_hdl);
		CAM_ERR(CAM_CORE, "Can not get context for handle %d",
			flush->dev_hdl);
		return -EINVAL;
	}

@@ -285,7 +285,7 @@ int cam_node_deinit(struct cam_node *node)
	if (node)
		memset(node, 0, sizeof(*node));

	pr_debug("%s: deinit complete!\n", __func__);
	CAM_DBG(CAM_CORE, "deinit complete");

	return 0;
}
@@ -317,8 +317,8 @@ int cam_node_init(struct cam_node *node, struct cam_hw_mgr_intf *hw_mgr_intf,
	node->ctx_size = ctx_size;
	for (i = 0; i < ctx_size; i++) {
		if (!ctx_list[i].state_machine) {
			pr_err("%s: camera context %d is not initialized!",
				__func__, i);
			CAM_ERR(CAM_CORE,
				"camera context %d is not initialized", i);
			rc = -1;
			goto err;
		}
@@ -328,7 +328,7 @@ int cam_node_init(struct cam_node *node, struct cam_hw_mgr_intf *hw_mgr_intf,

	node->state = CAM_NODE_STATE_INIT;
err:
	pr_debug("%s: Exit. (rc = %d)\n", __func__, rc);
	CAM_DBG(CAM_CORE, "Exit. (rc = %d)", rc);
	return rc;
}

@@ -339,7 +339,7 @@ int cam_node_handle_ioctl(struct cam_node *node, struct cam_control *cmd)
	if (!cmd)
		return -EINVAL;

	pr_debug("%s: handle cmd %d\n", __func__, cmd->op_code);
	CAM_DBG(CAM_CORE, "handle cmd %d", cmd->op_code);

	switch (cmd->op_code) {
	case CAM_QUERY_CAP: {
@@ -353,8 +353,8 @@ int cam_node_handle_ioctl(struct cam_node *node, struct cam_control *cmd)

		rc = __cam_node_handle_query_cap(node, &query);
		if (rc) {
			pr_err("%s: querycap is failed(rc = %d)\n",
				__func__,  rc);
			CAM_ERR(CAM_CORE, "querycap is failed(rc = %d)",
				rc);
			break;
		}

@@ -374,8 +374,8 @@ int cam_node_handle_ioctl(struct cam_node *node, struct cam_control *cmd)
		}
		rc = __cam_node_handle_acquire_dev(node, &acquire);
		if (rc) {
			pr_err("%s: acquire device failed(rc = %d)\n",
				__func__, rc);
			CAM_ERR(CAM_CORE, "acquire device failed(rc = %d)",
				rc);
			break;
		}
		if (copy_to_user((void __user *)cmd->handle, &acquire,
@@ -392,8 +392,8 @@ int cam_node_handle_ioctl(struct cam_node *node, struct cam_control *cmd)
		else {
			rc = __cam_node_handle_start_dev(node, &start);
			if (rc)
				pr_err("%s: start device failed(rc = %d)\n",
					__func__, rc);
				CAM_ERR(CAM_CORE,
					"start device failed(rc = %d)", rc);
		}
		break;
	}
@@ -406,8 +406,8 @@ int cam_node_handle_ioctl(struct cam_node *node, struct cam_control *cmd)
		else {
			rc = __cam_node_handle_stop_dev(node, &stop);
			if (rc)
				pr_err("%s: stop device failed(rc = %d)\n",
					__func__, rc);
				CAM_ERR(CAM_CORE,
					"stop device failed(rc = %d)", rc);
		}
		break;
	}
@@ -420,8 +420,8 @@ int cam_node_handle_ioctl(struct cam_node *node, struct cam_control *cmd)
		else {
			rc = __cam_node_handle_config_dev(node, &config);
			if (rc)
				pr_err("%s: config device failed(rc = %d)\n",
					__func__, rc);
				CAM_ERR(CAM_CORE,
					"config device failed(rc = %d)", rc);
		}
		break;
	}
@@ -434,8 +434,8 @@ int cam_node_handle_ioctl(struct cam_node *node, struct cam_control *cmd)
		else {
			rc = __cam_node_handle_release_dev(node, &release);
			if (rc)
				pr_err("%s: release device failed(rc = %d)\n",
					__func__, rc);
				CAM_ERR(CAM_CORE,
					"release device failed(rc = %d)", rc);
		}
		break;
	}
@@ -443,7 +443,7 @@ int cam_node_handle_ioctl(struct cam_node *node, struct cam_control *cmd)
		__cam_node_handle_shutdown(node);
		break;
	default:
		pr_err("Unknown op code %d\n", cmd->op_code);
		CAM_ERR(CAM_CORE, "Unknown op code %d", cmd->op_code);
		rc = -EINVAL;
	}

+7 −5
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

#include "cam_subdev.h"
#include "cam_node.h"
#include "cam_debug_util.h"

/**
 * cam_subdev_subscribe_event()
@@ -63,7 +64,7 @@ static long cam_subdev_ioctl(struct v4l2_subdev *sd, unsigned int cmd,
			(struct cam_control *) arg);
		break;
	default:
		pr_err("Invalid command %d for %s!\n", cmd,
		CAM_ERR(CAM_CORE, "Invalid command %d for %s", cmd,
			node->name);
		rc = -EINVAL;
	}
@@ -80,7 +81,7 @@ static long cam_subdev_compat_ioctl(struct v4l2_subdev *sd,

	if (copy_from_user(&cmd_data, (void __user *)arg,
		sizeof(cmd_data))) {
		pr_err("Failed to copy from user_ptr=%pK size=%zu\n",
		CAM_ERR(CAM_CORE, "Failed to copy from user_ptr=%pK size=%zu",
			(void __user *)arg, sizeof(cmd_data));
		return -EFAULT;
	}
@@ -88,7 +89,8 @@ static long cam_subdev_compat_ioctl(struct v4l2_subdev *sd,
	if (!rc) {
		if (copy_to_user((void __user *)arg, &cmd_data,
			sizeof(cmd_data))) {
			pr_err("Failed to copy to user_ptr=%pK size=%zu\n",
			CAM_ERR(CAM_CORE,
				"Failed to copy to user_ptr=%pK size=%zu",
				(void __user *)arg, sizeof(cmd_data));
			rc = -EFAULT;
		}
@@ -147,8 +149,8 @@ int cam_subdev_probe(struct cam_subdev *sd, struct platform_device *pdev,

	rc = cam_register_subdev(sd);
	if (rc) {
		pr_err("%s: cam_register_subdev() failed for dev: %s!\n",
			__func__, sd->name);
		CAM_ERR(CAM_CORE, "cam_register_subdev() failed for dev: %s",
			sd->name);
		goto err;
	}
	platform_set_drvdata(sd->pdev, sd);
+2 −0
Original line number Diff line number Diff line
ccflags-y += -Idrivers/media/platform/msm/camera/cam_utils

obj-$(CONFIG_SPECTRA_CAMERA) += cam_smmu_api.o
+270 −212

File changed.

Preview size limit exceeded, changes collapsed.

Loading