summaryrefslogtreecommitdiff
path: root/drivers/reset
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2017-08-11 13:33:57 +0300
committerPhilipp Zabel <p.zabel@pengutronix.de>2017-08-11 18:48:56 +0300
commit726cc791c9b9cbbc6ef5a4e266af2bbf3c360b5b (patch)
tree0f6ce88b429b27c362ee59576b41e355f911b317 /drivers/reset
parentdec173ccbcb730686084ca37afe933e42023c0e7 (diff)
downloadlinux-726cc791c9b9cbbc6ef5a4e266af2bbf3c360b5b.tar.xz
reset: sunxi: fix number of reset lines
The Allwinner reset controller has 32-bit registers, but resource_size is measured in bytes, not number of registers. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Chen-Yu Tsai <wens@csie.org>
Diffstat (limited to 'drivers/reset')
-rw-r--r--drivers/reset/reset-sunxi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index cd585cd2f04d..2c7dd1fd08df 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -107,7 +107,7 @@ static int sunxi_reset_init(struct device_node *np)
spin_lock_init(&data->lock);
data->rcdev.owner = THIS_MODULE;
- data->rcdev.nr_resets = size * 32;
+ data->rcdev.nr_resets = size * 8;
data->rcdev.ops = &sunxi_reset_ops;
data->rcdev.of_node = np;
@@ -162,7 +162,7 @@ static int sunxi_reset_probe(struct platform_device *pdev)
spin_lock_init(&data->lock);
data->rcdev.owner = THIS_MODULE;
- data->rcdev.nr_resets = resource_size(res) * 32;
+ data->rcdev.nr_resets = resource_size(res) * 8;
data->rcdev.ops = &sunxi_reset_ops;
data->rcdev.of_node = pdev->dev.of_node;