aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pstore
diff options
context:
space:
mode:
Diffstat (limited to 'fs/pstore')
-rw-r--r--fs/pstore/platform.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 86d1038b5a12..b7ffe2bcd9c4 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -239,17 +239,15 @@ int pstore_register(struct pstore_info *psi)
239{ 239{
240 struct module *owner = psi->owner; 240 struct module *owner = psi->owner;
241 241
242 if (backend && strcmp(backend, psi->name))
243 return -EPERM;
244
242 spin_lock(&pstore_lock); 245 spin_lock(&pstore_lock);
243 if (psinfo) { 246 if (psinfo) {
244 spin_unlock(&pstore_lock); 247 spin_unlock(&pstore_lock);
245 return -EBUSY; 248 return -EBUSY;
246 } 249 }
247 250
248 if (backend && strcmp(backend, psi->name)) {
249 spin_unlock(&pstore_lock);
250 return -EINVAL;
251 }
252
253 if (!psi->write) 251 if (!psi->write)
254 psi->write = pstore_write_compat; 252 psi->write = pstore_write_compat;
255 psinfo = psi; 253 psinfo = psi;
@@ -274,6 +272,9 @@ int pstore_register(struct pstore_info *psi)
274 add_timer(&pstore_timer); 272 add_timer(&pstore_timer);
275 } 273 }
276 274
275 pr_info("pstore: Registered %s as persistent store backend\n",
276 psi->name);
277
277 return 0; 278 return 0;
278} 279}
279EXPORT_SYMBOL_GPL(pstore_register); 280EXPORT_SYMBOL_GPL(pstore_register);