Skip to content
Snippets Groups Projects
Commit 0d761d61 authored by Dmitry Osipenko's avatar Dmitry Osipenko
Browse files

powerpc/85xx: Use register_platform_power_off()


Utilize new register_platform_power_off() API that allows to register
multiple power-off handlers and deprecates global pm_power_off callback.

Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
parent 486b69b4
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/reboot.h>
#include <linux/kdev_t.h> #include <linux/kdev_t.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -161,7 +162,7 @@ static int __init corenet_generic_probe(void) ...@@ -161,7 +162,7 @@ static int __init corenet_generic_probe(void)
ppc_md.get_irq = ehv_pic_get_irq; ppc_md.get_irq = ehv_pic_get_irq;
ppc_md.restart = fsl_hv_restart; ppc_md.restart = fsl_hv_restart;
pm_power_off = fsl_hv_halt; register_platform_power_off(fsl_hv_halt);
ppc_md.halt = fsl_hv_halt; ppc_md.halt = fsl_hv_halt;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* /*
......
...@@ -118,7 +118,7 @@ static int gpio_halt_probe(struct platform_device *pdev) ...@@ -118,7 +118,7 @@ static int gpio_halt_probe(struct platform_device *pdev)
/* Register our halt function */ /* Register our halt function */
ppc_md.halt = gpio_halt_cb; ppc_md.halt = gpio_halt_cb;
pm_power_off = gpio_halt_cb; register_platform_power_off(gpio_halt_cb);
printk(KERN_INFO "gpio-halt: registered GPIO %d (%d trigger, %d" printk(KERN_INFO "gpio-halt: registered GPIO %d (%d trigger, %d"
" irq).\n", gpio, trigger, irq); " irq).\n", gpio, trigger, irq);
...@@ -132,10 +132,11 @@ static int gpio_halt_remove(struct platform_device *pdev) ...@@ -132,10 +132,11 @@ static int gpio_halt_remove(struct platform_device *pdev)
int gpio = of_get_gpio(halt_node, 0); int gpio = of_get_gpio(halt_node, 0);
int irq = irq_of_parse_and_map(halt_node, 0); int irq = irq_of_parse_and_map(halt_node, 0);
unregister_platform_power_off(gpio_halt_cb);
free_irq(irq, halt_node); free_irq(irq, halt_node);
ppc_md.halt = NULL; ppc_md.halt = NULL;
pm_power_off = NULL;
gpio_free(gpio); gpio_free(gpio);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment