aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Moll <pawel.moll@arm.com>2015-01-20 12:24:02 -0500
committerSebastian Reichel <sre@kernel.org>2015-01-20 21:19:54 -0500
commit8f961c0a53192583ac86acfb7fb6bba3fc922873 (patch)
tree33109aded0720d83b0a5ec4e8520a2cf5cba5c2e
parentf8f847b51a0e1cb0c96e706d5da0ac507d96c605 (diff)
power/reset: vexpress: Remove non-DT code
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> Signed-off-by: Sebastian Reichel <sre@kernel.org>
-rw-r--r--drivers/power/reset/vexpress-poweroff.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/power/reset/vexpress-poweroff.c b/drivers/power/reset/vexpress-poweroff.c
index 9dfc9cee3232..be12d9b92957 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)
111 111
112static int vexpress_reset_probe(struct platform_device *pdev) 112static int vexpress_reset_probe(struct platform_device *pdev)
113{ 113{
114 enum vexpress_reset_func func;
115 const struct of_device_id *match = 114 const struct of_device_id *match =
116 of_match_device(vexpress_reset_of_match, &pdev->dev); 115 of_match_device(vexpress_reset_of_match, &pdev->dev);
117 struct regmap *regmap; 116 struct regmap *regmap;
118 int ret = 0; 117 int ret = 0;
119 118
120 if (match) 119 if (!match)
121 func = (enum vexpress_reset_func)match->data; 120 return -EINVAL;
122 else
123 func = pdev->id_entry->driver_data;
124 121
125 regmap = devm_regmap_init_vexpress_config(&pdev->dev); 122 regmap = devm_regmap_init_vexpress_config(&pdev->dev);
126 if (IS_ERR(regmap)) 123 if (IS_ERR(regmap))
127 return PTR_ERR(regmap); 124 return PTR_ERR(regmap);
128 dev_set_drvdata(&pdev->dev, regmap); 125 dev_set_drvdata(&pdev->dev, regmap);
129 126
130 switch (func) { 127 switch ((enum vexpress_reset_func)match->data) {
131 case FUNC_SHUTDOWN: 128 case FUNC_SHUTDOWN:
132 vexpress_power_off_device = &pdev->dev; 129 vexpress_power_off_device = &pdev->dev;
133 pm_power_off = vexpress_power_off; 130 pm_power_off = vexpress_power_off;
@@ -144,20 +141,12 @@ static int vexpress_reset_probe(struct platform_device *pdev)
144 return ret; 141 return ret;
145} 142}
146 143
147static const struct platform_device_id vexpress_reset_id_table[] = {
148 { .name = "vexpress-reset", .driver_data = FUNC_RESET, },
149 { .name = "vexpress-shutdown", .driver_data = FUNC_SHUTDOWN, },
150 { .name = "vexpress-reboot", .driver_data = FUNC_REBOOT, },
151 {}
152};
153
154static struct platform_driver vexpress_reset_driver = { 144static struct platform_driver vexpress_reset_driver = {
155 .probe = vexpress_reset_probe, 145 .probe = vexpress_reset_probe,
156 .driver = { 146 .driver = {
157 .name = "vexpress-reset", 147 .name = "vexpress-reset",
158 .of_match_table = vexpress_reset_of_match, 148 .of_match_table = vexpress_reset_of_match,
159 }, 149 },
160 .id_table = vexpress_reset_id_table,
161}; 150};
162 151
163static int __init vexpress_reset_init(void) 152static int __init vexpress_reset_init(void)