| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* 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. |
|---|
| 11 | 3 | */ |
|---|
| 12 | 4 | |
|---|
| 13 | 5 | #define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__ |
|---|
| .. | .. |
|---|
| 30 | 22 | * @type: hw block type - enum dpu_hw_blk_type |
|---|
| 31 | 23 | * @id: instance id of the hw block |
|---|
| 32 | 24 | * @ops: Pointer to block operations |
|---|
| 33 | | - * return: 0 if success; error code otherwise |
|---|
| 34 | 25 | */ |
|---|
| 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, |
|---|
| 36 | 27 | struct dpu_hw_blk_ops *ops) |
|---|
| 37 | 28 | { |
|---|
| 38 | | - if (!hw_blk) { |
|---|
| 39 | | - pr_err("invalid parameters\n"); |
|---|
| 40 | | - return -EINVAL; |
|---|
| 41 | | - } |
|---|
| 42 | | - |
|---|
| 43 | 29 | INIT_LIST_HEAD(&hw_blk->list); |
|---|
| 44 | 30 | hw_blk->type = type; |
|---|
| 45 | 31 | hw_blk->id = id; |
|---|
| .. | .. |
|---|
| 51 | 37 | mutex_lock(&dpu_hw_blk_lock); |
|---|
| 52 | 38 | list_add(&hw_blk->list, &dpu_hw_blk_list); |
|---|
| 53 | 39 | mutex_unlock(&dpu_hw_blk_lock); |
|---|
| 54 | | - |
|---|
| 55 | | - return 0; |
|---|
| 56 | 40 | } |
|---|
| 57 | 41 | |
|---|
| 58 | 42 | /** |
|---|