[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1445956046-4248-1-git-send-email-tomeu.vizoso@collabora.com>
Date: Tue, 27 Oct 2015 15:27:26 +0100
From: Tomeu Vizoso <tomeu.vizoso@...labora.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Tomeu Vizoso <tomeu.vizoso@...labora.com>,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH] staging: board: Set PM domain before probe
PM domains shouldn't be modified after a device is probed, so set it
before device registration to be sure of that.
In the future the PM domain pointer will be set through a setter that
will WARN if the device has been probed already.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>
---
drivers/staging/board/board.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c
index 3eb5eb8f069c..965afc79aadd 100644
--- a/drivers/staging/board/board.c
+++ b/drivers/staging/board/board.c
@@ -187,6 +187,9 @@ int __init board_staging_register_device(const struct board_staging_dev *dev)
for (i = 0; i < dev->nclocks; i++)
board_staging_register_clock(&dev->clocks[i]);
+ if (dev->domain)
+ board_staging_add_dev_domain(pdev, dev->domain);
+
error = platform_device_register(pdev);
if (error) {
pr_err("Failed to register device %s (%d)\n", pdev->name,
@@ -194,9 +197,6 @@ int __init board_staging_register_device(const struct board_staging_dev *dev)
return error;
}
- if (dev->domain)
- board_staging_add_dev_domain(pdev, dev->domain);
-
return error;
}
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists