Commit 45fce7ea authored by Rusty Russell's avatar Rusty Russell Committed by Kai Germaschewski

[PATCH] v850 obsolete params fix

Since these are just symbols in the module object, they need symbol name
munging to find the symbol from the parameter name.
parent d6ad9cca
...@@ -679,19 +679,19 @@ static int obsolete_params(const char *name, ...@@ -679,19 +679,19 @@ static int obsolete_params(const char *name,
if (!kp) if (!kp)
return -ENOMEM; return -ENOMEM;
DEBUGP("Module %s has %u obsolete params\n", name, num);
for (i = 0; i < num; i++)
DEBUGP("Param %i: %s type %s\n",
num, obsparm[i].name, obsparm[i].type);
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
char sym_name[128 + sizeof(MODULE_SYMBOL_PREFIX)];
snprintf(sym_name, sizeof(sym_name), "%s%s",
MODULE_SYMBOL_PREFIX, obsparm[i].name);
kp[i].name = obsparm[i].name; kp[i].name = obsparm[i].name;
kp[i].perm = 000; kp[i].perm = 000;
kp[i].set = set_obsolete; kp[i].set = set_obsolete;
kp[i].get = NULL; kp[i].get = NULL;
obsparm[i].addr obsparm[i].addr
= (void *)find_local_symbol(sechdrs, symindex, strtab, = (void *)find_local_symbol(sechdrs, symindex, strtab,
obsparm[i].name); sym_name);
if (!obsparm[i].addr) { if (!obsparm[i].addr) {
printk("%s: falsely claims to have parameter %s\n", printk("%s: falsely claims to have parameter %s\n",
name, obsparm[i].name); name, obsparm[i].name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment