Skip to content

Commit 35732a0

Browse files
Srinivasa Rao Mandadapuvinodkoul
authored andcommitted
soundwire: qcom: constify static struct qcom_swrm_data global variables
The qcom_swrm_data structures is only required for setting soundwire params, so make the qcom_swrm_data structure const to allow the compiler to put it in read-only memory and avoid unintentional modifications. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com> Link: https://lore.kernel.org/r/1646224982-3361-3-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 04d46a7 commit 35732a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/soundwire/qcom.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,12 @@ struct qcom_swrm_data {
181181
u32 default_rows;
182182
};
183183

184-
static struct qcom_swrm_data swrm_v1_3_data = {
184+
static const struct qcom_swrm_data swrm_v1_3_data = {
185185
.default_rows = 48,
186186
.default_cols = 16,
187187
};
188188

189-
static struct qcom_swrm_data swrm_v1_5_data = {
189+
static const struct qcom_swrm_data swrm_v1_5_data = {
190190
.default_rows = 50,
191191
.default_cols = 16,
192192
};

0 commit comments

Comments
 (0)