|
@@ -239,17 +239,15 @@ int pstore_register(struct pstore_info *psi)
|
|
|
{
|
|
|
struct module *owner = psi->owner;
|
|
|
|
|
|
+ if (backend && strcmp(backend, psi->name))
|
|
|
+ return -EPERM;
|
|
|
+
|
|
|
spin_lock(&pstore_lock);
|
|
|
if (psinfo) {
|
|
|
spin_unlock(&pstore_lock);
|
|
|
return -EBUSY;
|
|
|
}
|
|
|
|
|
|
- if (backend && strcmp(backend, psi->name)) {
|
|
|
- spin_unlock(&pstore_lock);
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
if (!psi->write)
|
|
|
psi->write = pstore_write_compat;
|
|
|
psinfo = psi;
|
|
@@ -274,6 +272,9 @@ int pstore_register(struct pstore_info *psi)
|
|
|
add_timer(&pstore_timer);
|
|
|
}
|
|
|
|
|
|
+ pr_info("pstore: Registered %s as persistent store backend\n",
|
|
|
+ psi->name);
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(pstore_register);
|