add const to const * strings

I don't think this will amke any difference except maybe for hosted ports

Change-Id: I84f898aea92a6963901a6d889dd18b63f24c9a41
This commit is contained in:
William Wilgus 2022-05-03 22:54:33 -04:00 committed by William Wilgus
parent 4dd3c2b33e
commit 79864c6ec2
14 changed files with 25 additions and 25 deletions

View file

@ -940,8 +940,8 @@ bool dbg_hw_info_emi(void)
bool dbg_hw_info_audio(void)
{
static const char *hp_sel[2] = {"DAC", "Line1"};
static const char *mux_sel[4] = {"Mic", "Line1", "HP", "Line2"};
static const char * const hp_sel[2] = {"DAC", "Line1"};
static const char * const mux_sel[4] = {"Mic", "Line1", "HP", "Line2"};
lcd_setfont(FONT_SYSFIXED);
while(1)
@ -1171,7 +1171,7 @@ bool dbg_hw_info_button(void)
}
else if(MAP[i].periph == IMX233_BUTTON_LRADC)
{
static const char *op_name[] =
static const char * const op_name[] =
{
[IMX233_BUTTON_EQ] = "eq",
[IMX233_BUTTON_GT] = "gt",

View file

@ -112,7 +112,7 @@ bool dbg_hw_info(void)
_DEBUG_PRINTF("PMU:");
for(i=0;i<7;i++)
{
char *device[] = {"(unknown)",
static const char * const device[] = {"(unknown)",
"(CLICKWHEEL)",
"(LCD)",
"(AUDIO)",
@ -139,7 +139,7 @@ bool dbg_hw_info(void)
char line_cfg[4];
int abr_stat;
uint32_t abr_cnt;
char *abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
static const char * const abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
uartc_port_get_line_info(&ser_port,
&tx_stat, &rx_stat, &tx_speed, &rx_speed, line_cfg);

View file

@ -104,7 +104,7 @@ bool dbg_hw_info(void)
_DEBUG_PRINTF("PMU:");
for(i=0;i<7;i++)
{
char *device[] = {"unknown",
static const char *const device[] = {"unknown",
"unknown",
"LCD",
"AUDIO",
@ -157,7 +157,7 @@ bool dbg_hw_info(void)
char line_cfg[4];
int abr_stat;
uint32_t abr_cnt;
char *abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
static const char * const abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
uartc_port_get_line_info(&ser_port,
&tx_stat, &rx_stat, &tx_speed, &rx_speed, line_cfg);

View file

@ -123,7 +123,7 @@ static void* pcm_thread_run(void* nothing)
/* https://github.com/tinyalsa/tinyalsa/blob/master/tinypcminfo.c */
static const char* format_lookup[] =
static const char* const format_lookup[] =
{
/*[0] =*/ "S8",
"U8",

View file

@ -32,7 +32,7 @@
#include "sysfs-ibasso.h"
static const char* SYSFS_PATHS[] =
static const char* const SYSFS_PATHS[] =
{
/* SYSFS_DX50_CODEC_VOLUME */
"/dev/codec_volume",

View file

@ -63,8 +63,8 @@ void usb_enable(bool on)
*/
int disk_mount_all(void)
{
const char *dev[] = {"/dev/mmcblk0p1", "/dev/mmcblk0"};
const char *fs[] = {"vfat", "exfat"};
const char * const dev[] = {"/dev/mmcblk0p1", "/dev/mmcblk0"};
const char * const fs[] = {"vfat", "exfat"};
sysfs_set_string("/sys/class/android_usb/android0/f_mass_storage/lun/file", "");