diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2011-06-21 03:35:55 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-06-29 17:48:22 +1000 |
commit | 3aef19f0a10d1c274a15191766b627fe550d456e (patch) | |
tree | c3731b65f9263626a03200eb2fce8db50095bb67 /arch/powerpc/platforms/pseries/dlpar.c | |
parent | e48f7eb27f0e38e1a461fa4e43025d18100d250b (diff) | |
download | kernel_samsung_smdk4412-3aef19f0a10d1c274a15191766b627fe550d456e.zip kernel_samsung_smdk4412-3aef19f0a10d1c274a15191766b627fe550d456e.tar.gz kernel_samsung_smdk4412-3aef19f0a10d1c274a15191766b627fe550d456e.tar.bz2 |
powerpc/pseries: Introduce pSeries_reconfig_notify()
This introduces pSeries_reconfig_notify() as a just wrapper of
blocking_notifier_call_chain() for pSeries_reconfig_chain.
This is a preparation to improvement of error code on reconfiguration
notifier failure.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/dlpar.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/dlpar.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index 57ceb92..e9be25b 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c @@ -262,12 +262,11 @@ int dlpar_attach_node(struct device_node *dn) if (!dn->parent) return -ENOMEM; - rc = blocking_notifier_call_chain(&pSeries_reconfig_chain, - PSERIES_RECONFIG_ADD, dn); - if (rc == NOTIFY_BAD) { + rc = pSeries_reconfig_notify(PSERIES_RECONFIG_ADD, dn); + if (rc) { printk(KERN_ERR "Failed to add device node %s\n", dn->full_name); - return -ENOMEM; /* For now, safe to assume kmalloc failure */ + return rc; } of_attach_node(dn); @@ -297,8 +296,7 @@ int dlpar_detach_node(struct device_node *dn) remove_proc_entry(dn->pde->name, parent->pde); #endif - blocking_notifier_call_chain(&pSeries_reconfig_chain, - PSERIES_RECONFIG_REMOVE, dn); + pSeries_reconfig_notify(PSERIES_RECONFIG_REMOVE, dn); of_detach_node(dn); of_node_put(dn); /* Must decrement the refcount */ |