Merge "msm: camera: sync: Fix kbuild config checks for synx driver" into camera-kernel.lnx.4.0

This commit is contained in:
Camera Software Integration 2020-05-07 20:30:46 -07:00 • committed by Gerrit - the friendly Code Review server
commit 15f0a07e50
2 changed files with 16 additions and 10 deletions

View file

@ -20,7 +20,7 @@ int cam_flash_led_prepare(struct led_trigger *trigger, int options,
int rc = 0;
if (is_wled) {
#ifdef CONFIG_BACKLIGHT_QCOM_SPMI_WLED
#if IS_REACHABLE(CONFIG_BACKLIGHT_QCOM_SPMI_WLED)
rc = wled_flash_led_prepare(trigger, options, max_current);
if (rc) {
CAM_ERR(CAM_FLASH, "enable reg failed: rc: %d",

View file

@ -9,14 +9,15 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/debugfs.h>
#if IS_REACHABLE(CONFIG_MSM_GLOBAL_SYNX)
#include <synx_api.h>
#endif
#include "cam_sync_util.h"
#include "cam_debug_util.h"
#include "cam_common_util.h"
#include "camera_main.h"
#ifdef CONFIG_MSM_GLOBAL_SYNX
#include <synx_api.h>
#endif
struct sync_device *sync_dev;
/*
@ -948,7 +949,7 @@ static struct v4l2_file_operations cam_sync_v4l2_fops = {
#endif
};
#if defined(CONFIG_MEDIA_CONTROLLER)
#if IS_REACHABLE(CONFIG_MEDIA_CONTROLLER)
static int cam_sync_media_controller_init(struct sync_device *sync_dev,
struct platform_device *pdev)
{
@ -1031,8 +1032,8 @@ static int cam_sync_create_debugfs(void)
return 0;
}
#ifdef CONFIG_MSM_GLOBAL_SYNX
static void cam_sync_register_synx_bind_ops(void)
#if IS_REACHABLE(CONFIG_MSM_GLOBAL_SYNX)
static int cam_sync_register_synx_bind_ops(void)
{
int rc = 0;
struct synx_register_params params;
@ -1046,7 +1047,9 @@ static void cam_sync_register_synx_bind_ops(void)
rc = synx_register_ops(&params);
if (rc)
CAM_ERR(CAM_SYNC, "synx registration fail with %d", rc);
CAM_ERR(CAM_SYNC, "synx registration fail with rc=%d", rc);
return rc;
}
#endif
@ -1124,8 +1127,11 @@ static int cam_sync_component_bind(struct device *dev,
trigger_cb_without_switch = false;
cam_sync_create_debugfs();
#ifdef CONFIG_MSM_GLOBAL_SYNX
cam_sync_register_synx_bind_ops();
#if IS_REACHABLE(CONFIG_MSM_GLOBAL_SYNX)
CAM_INFO(CAM_SYNC, "Registering with synx driver");
rc = cam_sync_register_synx_bind_ops();
if (rc)
goto v4l2_fail;
#endif
CAM_DBG(CAM_SYNC, "Component bound successfully");
return rc;