forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c
....@@ -1,13 +1,5 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
2
- *
3
- * This program is free software; you can redistribute it and/or modify
4
- * it under the terms of the GNU General Public License version 2 and
5
- * only version 2 as published by the Free Software Foundation.
6
- *
7
- * This program is distributed in the hope that it will be useful,
8
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- * GNU General Public License for more details.
113 */
124
135 #define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
....@@ -30,16 +22,10 @@
3022 * @type: hw block type - enum dpu_hw_blk_type
3123 * @id: instance id of the hw block
3224 * @ops: Pointer to block operations
33
- * return: 0 if success; error code otherwise
3425 */
35
-int dpu_hw_blk_init(struct dpu_hw_blk *hw_blk, u32 type, int id,
26
+void dpu_hw_blk_init(struct dpu_hw_blk *hw_blk, u32 type, int id,
3627 struct dpu_hw_blk_ops *ops)
3728 {
38
- if (!hw_blk) {
39
- pr_err("invalid parameters\n");
40
- return -EINVAL;
41
- }
42
-
4329 INIT_LIST_HEAD(&hw_blk->list);
4430 hw_blk->type = type;
4531 hw_blk->id = id;
....@@ -51,8 +37,6 @@
5137 mutex_lock(&dpu_hw_blk_lock);
5238 list_add(&hw_blk->list, &dpu_hw_blk_list);
5339 mutex_unlock(&dpu_hw_blk_lock);
54
-
55
- return 0;
5640 }
5741
5842 /**