Cleanup config dump routine

update-lkm
nirenjan 2022-09-22 21:31:49 -07:00
parent 7f59984357
commit b2f292bf58
1 changed files with 2 additions and 6 deletions

View File

@ -140,16 +140,12 @@ exit_dump:
const char *x52d_config_get_param(struct x52d_config *cfg, const char *section, const char *key)
{
const char *value = NULL;
#define CFG(section_c, key_c, name, type, def) do { \
if (strcasecmp(section, #section_c) == 0 && strcasecmp(key, #key_c) == 0) { \
value = type ## _dumper(section, key, cfg, offsetof(struct x52d_config, name)); \
goto return_value; \
return type ## _dumper(section, key, cfg, offsetof(struct x52d_config, name)); \
} \
} while (0);
#include "x52d_config.def"
return_value:
return value;
return NULL;
}