diff --git a/rotator/sde_rotator_dev.c b/rotator/sde_rotator_dev.c index 1c9dbe2f..c97d52e6 100644 --- a/rotator/sde_rotator_dev.c +++ b/rotator/sde_rotator_dev.c @@ -52,7 +52,7 @@ #define SDE_ROTATOR_ADD_REQUEST 1 #define SDE_ROTATOR_REMOVE_REQUEST 0 - +#ifndef CONFIG_MSM_SDE_ROTATOR_INIT_ONLY static void sde_rotator_submit_handler(struct kthread_work *work); static void sde_rotator_retire_handler(struct kthread_work *work); #ifdef CONFIG_COMPAT @@ -3373,6 +3373,7 @@ static struct v4l2_m2m_ops sde_rotator_m2m_ops = { .job_abort = sde_rotator_job_abort, .job_ready = sde_rotator_job_ready, }; +#endif /* Device tree match struct */ static const struct of_device_id sde_rotator_dt_match[] = { @@ -3383,6 +3384,7 @@ static const struct of_device_id sde_rotator_dt_match[] = { {} }; +#ifndef CONFIG_MSM_SDE_ROTATOR_INIT_ONLY /* * sde_rotator_get_drv_data - rotator device driver data. * @dev: Pointer to device. @@ -3580,6 +3582,36 @@ static struct platform_driver rotator_driver = { }, }; +#else +/* + * sde_rotator_probe - rotator device probe method. + * @pdev: Pointer to rotator platform device. + */ +static int sde_rotator_probe(struct platform_device *pdev) +{ + return 0; +} + +/* + * sde_rotator_remove - rotator device remove method. + * @pdev: Pointer rotator platform device. + */ +static int sde_rotator_remove(struct platform_device *pdev) +{ + return 0; +} + +/* SDE Rotator platform driver definition */ +static struct platform_driver rotator_driver = { + .probe = sde_rotator_probe, + .remove = sde_rotator_remove, + .driver = { + .name = SDE_ROTATOR_DRV_NAME, + .of_match_table = sde_rotator_dt_match, + }, +}; +#endif + void __init sde_rotator_register(void) { platform_driver_register(&rotator_driver); diff --git a/rotator/sde_rotator_dev.h b/rotator/sde_rotator_dev.h index 8091ae02..d83e9d7f 100644 --- a/rotator/sde_rotator_dev.h +++ b/rotator/sde_rotator_dev.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. */ #ifndef __SDE_ROTATOR_DEV_H__ @@ -215,7 +215,9 @@ struct sde_rotator_device { struct device *dev; struct v4l2_device v4l2_dev; struct video_device *vdev; +#ifndef CONFIG_MSM_SDE_ROTATOR_INIT_ONLY struct v4l2_m2m_dev *m2m_dev; +#endif struct platform_device *pdev; const void *drvdata; u32 early_submit;