mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
f8f847b51a
commit
8f961c0a53
1 changed files with 3 additions and 14 deletions
|
@ -111,23 +111,20 @@ static int _vexpress_register_restart_handler(struct device *dev)
|
||||||
|
|
||||||
static int vexpress_reset_probe(struct platform_device *pdev)
|
static int vexpress_reset_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
enum vexpress_reset_func func;
|
|
||||||
const struct of_device_id *match =
|
const struct of_device_id *match =
|
||||||
of_match_device(vexpress_reset_of_match, &pdev->dev);
|
of_match_device(vexpress_reset_of_match, &pdev->dev);
|
||||||
struct regmap *regmap;
|
struct regmap *regmap;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (match)
|
if (!match)
|
||||||
func = (enum vexpress_reset_func)match->data;
|
return -EINVAL;
|
||||||
else
|
|
||||||
func = pdev->id_entry->driver_data;
|
|
||||||
|
|
||||||
regmap = devm_regmap_init_vexpress_config(&pdev->dev);
|
regmap = devm_regmap_init_vexpress_config(&pdev->dev);
|
||||||
if (IS_ERR(regmap))
|
if (IS_ERR(regmap))
|
||||||
return PTR_ERR(regmap);
|
return PTR_ERR(regmap);
|
||||||
dev_set_drvdata(&pdev->dev, regmap);
|
dev_set_drvdata(&pdev->dev, regmap);
|
||||||
|
|
||||||
switch (func) {
|
switch ((enum vexpress_reset_func)match->data) {
|
||||||
case FUNC_SHUTDOWN:
|
case FUNC_SHUTDOWN:
|
||||||
vexpress_power_off_device = &pdev->dev;
|
vexpress_power_off_device = &pdev->dev;
|
||||||
pm_power_off = vexpress_power_off;
|
pm_power_off = vexpress_power_off;
|
||||||
|
@ -144,20 +141,12 @@ static int vexpress_reset_probe(struct platform_device *pdev)
|
||||||
return ret;
|
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 = {
|
static struct platform_driver vexpress_reset_driver = {
|
||||||
.probe = vexpress_reset_probe,
|
.probe = vexpress_reset_probe,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "vexpress-reset",
|
.name = "vexpress-reset",
|
||||||
.of_match_table = vexpress_reset_of_match,
|
.of_match_table = vexpress_reset_of_match,
|
||||||
},
|
},
|
||||||
.id_table = vexpress_reset_id_table,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init vexpress_reset_init(void)
|
static int __init vexpress_reset_init(void)
|
||||||
|
|
Loading…
Add table
Reference in a new issue