hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/staging/media/imx/imx-media-fim.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * Frame Interval Monitor.
34 *
45 * Copyright (c) 2016 Mentor Graphics Inc.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
106 */
117 #include <linux/delay.h>
128 #include <linux/irq.h>
....@@ -41,8 +37,6 @@
4137 #define FIM_CL_TOLERANCE_MAX_DEF 0 /* no max tolerance (unbounded) */
4238
4339 struct imx_media_fim {
44
- struct imx_media_dev *md;
45
-
4640 /* the owning subdev of this fim instance */
4741 struct v4l2_subdev *sd;
4842
....@@ -420,7 +414,6 @@
420414
421415 spin_unlock_irqrestore(&fim->lock, flags);
422416 }
423
-EXPORT_SYMBOL_GPL(imx_media_fim_eof_monitor);
424417
425418 /* Called by the subdev in its s_stream callback */
426419 int imx_media_fim_set_stream(struct imx_media_fim *fim,
....@@ -457,15 +450,13 @@
457450 v4l2_ctrl_unlock(fim->ctrl[FIM_CL_ENABLE]);
458451 return ret;
459452 }
460
-EXPORT_SYMBOL_GPL(imx_media_fim_set_stream);
461453
462454 int imx_media_fim_add_controls(struct imx_media_fim *fim)
463455 {
464456 /* add the FIM controls to the calling subdev ctrl handler */
465457 return v4l2_ctrl_add_handler(fim->sd->ctrl_handler,
466
- &fim->ctrl_handler, NULL);
458
+ &fim->ctrl_handler, NULL, false);
467459 }
468
-EXPORT_SYMBOL_GPL(imx_media_fim_add_controls);
469460
470461 /* Called by the subdev in its subdev registered callback */
471462 struct imx_media_fim *imx_media_fim_init(struct v4l2_subdev *sd)
....@@ -477,8 +468,6 @@
477468 if (!fim)
478469 return ERR_PTR(-ENOMEM);
479470
480
- /* get media device */
481
- fim->md = dev_get_drvdata(sd->v4l2_dev->dev);
482471 fim->sd = sd;
483472
484473 spin_lock_init(&fim->lock);
....@@ -489,10 +478,8 @@
489478
490479 return fim;
491480 }
492
-EXPORT_SYMBOL_GPL(imx_media_fim_init);
493481
494482 void imx_media_fim_free(struct imx_media_fim *fim)
495483 {
496484 v4l2_ctrl_handler_free(&fim->ctrl_handler);
497485 }
498
-EXPORT_SYMBOL_GPL(imx_media_fim_free);