summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorClaudiu.Beznea@microchip.com <Claudiu.Beznea@microchip.com>2020-01-21 10:03:31 +0000
committerSebastian Reichel <sebastian.reichel@collabora.com>2020-03-08 19:37:15 +0100
commit1e3c4af9de26a0246cf00aba207c49846e80c37b (patch)
tree1bd290b141628159a6a79cf9a4d14997a454fa42 /drivers/power
parentf9e6ce74cbf2a34f4d37bccbbfc7865e5b3e01dd (diff)
power: reset: at91-reset: add notifier block to struct at91_reset
Add struct notifier_block to struct at91_reset. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/reset/at91-reset.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
index 1bc39bfda0aa..e8840193620d 100644
--- a/drivers/power/reset/at91-reset.c
+++ b/drivers/power/reset/at91-reset.c
@@ -53,6 +53,7 @@ struct at91_reset {
void __iomem *rstc_base;
void __iomem *ramc_base[2];
struct clk *sclk;
+ struct notifier_block nb;
};
static struct at91_reset reset;
@@ -205,10 +206,6 @@ static const struct of_device_id at91_reset_of_match[] = {
};
MODULE_DEVICE_TABLE(of, at91_reset_of_match);
-static struct notifier_block at91_restart_nb = {
- .priority = 192,
-};
-
static int __init at91_reset_probe(struct platform_device *pdev)
{
const struct of_device_id *match;
@@ -235,7 +232,8 @@ static int __init at91_reset_probe(struct platform_device *pdev)
}
match = of_match_node(at91_reset_of_match, pdev->dev.of_node);
- at91_restart_nb.notifier_call = match->data;
+ reset.nb.notifier_call = match->data;
+ reset.nb.priority = 192;
reset.sclk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(reset.sclk))
@@ -247,7 +245,7 @@ static int __init at91_reset_probe(struct platform_device *pdev)
return ret;
}
- ret = register_restart_handler(&at91_restart_nb);
+ ret = register_restart_handler(&reset.nb);
if (ret) {
clk_disable_unprepare(reset.sclk);
return ret;
@@ -260,7 +258,7 @@ static int __init at91_reset_probe(struct platform_device *pdev)
static int __exit at91_reset_remove(struct platform_device *pdev)
{
- unregister_restart_handler(&at91_restart_nb);
+ unregister_restart_handler(&reset.nb);
clk_disable_unprepare(reset.sclk);
return 0;