From 874f32f212d4c55e965eeadb7a03de6bdaa7486e Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Mon, 25 Sep 2023 18:56:38 +0300 Subject: [PATCH] sinowealth: make report rates list const --- src/driver-sinowealth.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/driver-sinowealth.c b/src/driver-sinowealth.c index 21df27e8..a3b8528f 100644 --- a/src/driver-sinowealth.c +++ b/src/driver-sinowealth.c @@ -121,6 +121,10 @@ static const unsigned int SINOWEALTH_DEBOUNCE_TIMES[] = { 4, 6, 8, 10, 12, 14, 16 }; +static const unsigned int SINOWEALTH_REPORT_RATES[] = { + 125, 250, 500, 1000 +}; + /* Bit mask for @ref sinowealth_config_report.config. * * This naming may be incorrect as it's not actually known what the other bits do. @@ -1755,8 +1759,7 @@ sinowealth_init_profile(struct ratbag_device *device) } /* Set up available report rates. */ - unsigned int report_rates[] = { 125, 250, 500, 1000 }; - ratbag_profile_set_report_rate_list(profile, report_rates, ARRAY_LENGTH(report_rates)); + ratbag_profile_set_report_rate_list(profile, SINOWEALTH_REPORT_RATES, ARRAY_LENGTH(SINOWEALTH_REPORT_RATES)); /* Set up LED capabilities */ if (drv_data->led_count > 0) {