>+static struct device_attribute attrs[] = {If this is*only* for tests, then for sure this should be in debugfs?
>+ __ATTR(status, RMI_RW_ATTR,
>+ rmi_f09_status_show, rmi_f09_status_store),
>+ __ATTR(limitRegisterCount, RMI_RO_ATTR,
>+ rmi_f09_limit_register_count_show, rmi_store_error),
>+ __ATTR(hostTestEnable, RMI_RW_ATTR,
>+ rmi_f09_host_test_enable_show, rmi_f09_host_test_enable_store),
>+ __ATTR(internalLimits, RMI_RO_ATTR,
>+ rmi_f09_internal_limits_show, rmi_store_error),
>+ __ATTR(resultRegisterCount, RMI_RO_ATTR,
>+ rmi_f09_result_register_count_show, rmi_store_error),
>+ __ATTR(overall_bist_result, RMI_RO_ATTR,
>+ rmi_f09_overall_bist_result_show, rmi_store_error),
>+ __ATTR(test_number_control, RMI_RW_ATTR,
>+ rmi_f09_test_number_control_show,
>+ rmi_f09_test_number_control_store),
>+ __ATTR(test_result1, RMI_RO_ATTR,
>+ rmi_f09_test_result1_show, rmi_store_error),
>+ __ATTR(test_result2, RMI_RO_ATTR,
>+ rmi_f09_test_result2_show, rmi_store_error),
>+ __ATTR(run_bist, RMI_RW_ATTR,
>+ rmi_f09_run_bist_show, rmi_f09_run_bist_store),
>+ __ATTR(f09_control_test1, RMI_RW_ATTR,
>+ rmi_f09_control_test1_show, rmi_f09_control_test1_store),
>+ __ATTR(f09_control_test2, RMI_RW_ATTR,
>+ rmi_f09_control_test2_show, rmi_f09_control_test2_store),
>+};
>+static int rmi_f09_alloc_memory(struct rmi_function_container *fc)(...)>+static void rmi_f09_free_memory(struct rmi_function_container *fc)Why do you need separate functions for these two?
If they are only used from one place (which I suspect) then just
put the code at that site.