#include #include #include int avm_get_hw_config(unsigned int version, const char *name, int *p_value, enum _avm_hw_param *p_param) { unsigned i; if (version != AVM_HW_CONFIG_VERSION) return -EFAULT; if (!avm_current_hw_config) { avm_current_hw_config = avm_get_hw_config_table(); if (!avm_current_hw_config) { pr_alert("%s: avm_current_hw_config is not set\n", __func__); return -ENOENT; } } for (i = 0; avm_current_hw_config[i].name; i++) { if (strcmp(avm_current_hw_config[i].name, name) == 0) { if (p_value) *p_value = avm_current_hw_config[i].value; if (p_param) *p_param = avm_current_hw_config[i].param; return 0; } } return -ENOENT; } EXPORT_SYMBOL(avm_get_hw_config);