| .. | .. |
|---|
| 23 | 23 | * |
|---|
| 24 | 24 | */ |
|---|
| 25 | 25 | |
|---|
| 26 | +#include <linux/slab.h> |
|---|
| 27 | + |
|---|
| 26 | 28 | #include "dm_services.h" |
|---|
| 27 | 29 | #include "dm_helpers.h" |
|---|
| 28 | 30 | #include "core_types.h" |
|---|
| .. | .. |
|---|
| 31 | 33 | * Private functions |
|---|
| 32 | 34 | ******************************************************************************/ |
|---|
| 33 | 35 | |
|---|
| 34 | | -static void destruct(struct dc_sink *sink) |
|---|
| 36 | +static void dc_sink_destruct(struct dc_sink *sink) |
|---|
| 35 | 37 | { |
|---|
| 36 | 38 | if (sink->dc_container_id) { |
|---|
| 37 | 39 | kfree(sink->dc_container_id); |
|---|
| .. | .. |
|---|
| 39 | 41 | } |
|---|
| 40 | 42 | } |
|---|
| 41 | 43 | |
|---|
| 42 | | -static bool construct(struct dc_sink *sink, const struct dc_sink_init_data *init_params) |
|---|
| 44 | +static bool dc_sink_construct(struct dc_sink *sink, const struct dc_sink_init_data *init_params) |
|---|
| 43 | 45 | { |
|---|
| 44 | 46 | |
|---|
| 45 | 47 | struct dc_link *link = init_params->link; |
|---|
| .. | .. |
|---|
| 52 | 54 | sink->ctx = link->ctx; |
|---|
| 53 | 55 | sink->dongle_max_pix_clk = init_params->dongle_max_pix_clk; |
|---|
| 54 | 56 | sink->converter_disable_audio = init_params->converter_disable_audio; |
|---|
| 57 | + sink->is_mst_legacy = init_params->sink_is_legacy; |
|---|
| 55 | 58 | sink->dc_container_id = NULL; |
|---|
| 56 | 59 | sink->sink_id = init_params->link->ctx->dc_sink_id_count; |
|---|
| 57 | 60 | // increment dc_sink_id_count because we don't want two sinks with same ID |
|---|
| .. | .. |
|---|
| 73 | 76 | static void dc_sink_free(struct kref *kref) |
|---|
| 74 | 77 | { |
|---|
| 75 | 78 | struct dc_sink *sink = container_of(kref, struct dc_sink, refcount); |
|---|
| 76 | | - destruct(sink); |
|---|
| 79 | + dc_sink_destruct(sink); |
|---|
| 77 | 80 | kfree(sink); |
|---|
| 78 | 81 | } |
|---|
| 79 | 82 | |
|---|
| .. | .. |
|---|
| 89 | 92 | if (NULL == sink) |
|---|
| 90 | 93 | goto alloc_fail; |
|---|
| 91 | 94 | |
|---|
| 92 | | - if (false == construct(sink, init_params)) |
|---|
| 95 | + if (false == dc_sink_construct(sink, init_params)) |
|---|
| 93 | 96 | goto construct_fail; |
|---|
| 94 | 97 | |
|---|
| 95 | 98 | kref_init(&sink->refcount); |
|---|