* [PATCH] power/reset: vexpress: Remove non-DT code
@ 2015-01-20 17:24 Pawel Moll
2015-01-21 2:46 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Pawel Moll @ 2015-01-20 17:24 UTC (permalink / raw)
To: linux-arm-kernel
Now, as all VE platforms have to be booted with DT,
the code handling non-DT case can be removed.
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
---
drivers/power/reset/vexpress-poweroff.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/power/reset/vexpress-poweroff.c b/drivers/power/reset/vexpress-poweroff.c
index 9dfc9ce..be12d9b 100644
--- a/drivers/power/reset/vexpress-poweroff.c
+++ b/drivers/power/reset/vexpress-poweroff.c
@@ -111,23 +111,20 @@ static int _vexpress_register_restart_handler(struct device *dev)
static int vexpress_reset_probe(struct platform_device *pdev)
{
- enum vexpress_reset_func func;
const struct of_device_id *match =
of_match_device(vexpress_reset_of_match, &pdev->dev);
struct regmap *regmap;
int ret = 0;
- if (match)
- func = (enum vexpress_reset_func)match->data;
- else
- func = pdev->id_entry->driver_data;
+ if (!match)
+ return -EINVAL;
regmap = devm_regmap_init_vexpress_config(&pdev->dev);
if (IS_ERR(regmap))
return PTR_ERR(regmap);
dev_set_drvdata(&pdev->dev, regmap);
- switch (func) {
+ switch ((enum vexpress_reset_func)match->data) {
case FUNC_SHUTDOWN:
vexpress_power_off_device = &pdev->dev;
pm_power_off = vexpress_power_off;
@@ -144,20 +141,12 @@ static int vexpress_reset_probe(struct platform_device *pdev)
return ret;
}
-static const struct platform_device_id vexpress_reset_id_table[] = {
- { .name = "vexpress-reset", .driver_data = FUNC_RESET, },
- { .name = "vexpress-shutdown", .driver_data = FUNC_SHUTDOWN, },
- { .name = "vexpress-reboot", .driver_data = FUNC_REBOOT, },
- {}
-};
-
static struct platform_driver vexpress_reset_driver = {
.probe = vexpress_reset_probe,
.driver = {
.name = "vexpress-reset",
.of_match_table = vexpress_reset_of_match,
},
- .id_table = vexpress_reset_id_table,
};
static int __init vexpress_reset_init(void)
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] power/reset: vexpress: Remove non-DT code
2015-01-20 17:24 [PATCH] power/reset: vexpress: Remove non-DT code Pawel Moll
@ 2015-01-21 2:46 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2015-01-21 2:46 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, Jan 20, 2015 at 05:24:02PM +0000, Pawel Moll wrote:
> Now, as all VE platforms have to be booted with DT,
> the code handling non-DT case can be removed.
>
> Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Thanks, applied.
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150121/d55b6111/attachment-0001.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-21 2:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 17:24 [PATCH] power/reset: vexpress: Remove non-DT code Pawel Moll
2015-01-21 2:46 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).