From 8a575393a241e60bdc35f21ebe6f112b8e087227 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Mon, 24 Nov 2014 17:58:01 +0000 Subject: of/reconfig: Always use the same structure for notifiers The OF_RECONFIG notifier callback uses a different structure depending on whether it is a node change or a property change. This is silly, and not very safe. Rework the code to use the same data structure regardless of the type of notifier. Signed-off-by: Grant Likely Cc: Benjamin Herrenschmidt Cc: Rob Herring Cc: Pantelis Antoniou Cc: (cherry picked from commit f5242e5a883bf1c1aba6bfd87b85e7dda0e62191) Signed-off-by: Mark Brown Conflicts: arch/powerpc/platforms/pseries/hotplug-memory.c include/linux/of.h --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'arch/powerpc/platforms/pseries/hotplug-cpu.c') diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 0ea99e3d4815..402c7fdf0399 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -337,16 +337,17 @@ static void pseries_remove_processor(struct device_node *np) } static int pseries_smp_notifier(struct notifier_block *nb, - unsigned long action, void *node) + unsigned long action, void *data) { + struct of_reconfig_data *rd = data; int err = 0; switch (action) { case OF_RECONFIG_ATTACH_NODE: - err = pseries_add_processor(node); + err = pseries_add_processor(rd->dn); break; case OF_RECONFIG_DETACH_NODE: - pseries_remove_processor(node); + pseries_remove_processor(rd->dn); break; } return notifier_from_errno(err); -- cgit v1.2.3