forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/platform/xilinx/xilinx-tpg.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Xilinx Test Pattern Generator
34 *
....@@ -6,10 +7,6 @@
67 *
78 * Contacts: Hyun Kwon <hyun.kwon@xilinx.com>
89 * Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License version 2 as
12
- * published by the Free Software Foundation.
1310 */
1411
1512 #include <linux/device.h>
....@@ -725,7 +722,7 @@
725722 const struct xvip_video_format *format;
726723 struct device_node *endpoint;
727724
728
- if (!port->name || of_node_cmp(port->name, "port"))
725
+ if (!of_node_name_eq(port, "port"))
729726 continue;
730727
731728 format = xvip_of_get_format(port);
....@@ -833,7 +830,7 @@
833830 v4l2_subdev_init(subdev, &xtpg_ops);
834831 subdev->dev = &pdev->dev;
835832 subdev->internal_ops = &xtpg_internal_ops;
836
- strlcpy(subdev->name, dev_name(&pdev->dev), sizeof(subdev->name));
833
+ strscpy(subdev->name, dev_name(&pdev->dev), sizeof(subdev->name));
837834 v4l2_set_subdevdata(subdev, xtpg);
838835 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
839836 subdev->entity.ops = &xtpg_media_ops;