diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-12-29 08:01:32 +0300 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-01-01 01:06:05 +0300 |
commit | e3a411a3dfc1d633504aa63efab32b7e00318454 (patch) | |
tree | 2ba6117448edd7056c8fa48cc6a696ae73a6c21a /drivers/serial/sunsu.c | |
parent | 6fc5bae797a6632bbccdd49a1b6a96121368a4b9 (diff) | |
download | linux-e3a411a3dfc1d633504aa63efab32b7e00318454.tar.xz |
[SPARC64]: Fix of_iounmap() region release.
We need to pass in the resource otherwise we cannot
release the region properly. We must know whether it is
an I/O or MEM resource.
Spotted by Eric Brower.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/serial/sunsu.c')
-rw-r--r-- | drivers/serial/sunsu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 564592b2b2ba..3ec3df21816b 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c @@ -1480,13 +1480,13 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m return 0; out_unmap: - of_iounmap(up->port.membase, up->reg_size); + of_iounmap(&op->resource[0], up->port.membase, up->reg_size); return err; } -static int __devexit su_remove(struct of_device *dev) +static int __devexit su_remove(struct of_device *op) { - struct uart_sunsu_port *up = dev_get_drvdata(&dev->dev);; + struct uart_sunsu_port *up = dev_get_drvdata(&op->dev); if (up->su_type == SU_PORT_MS || up->su_type == SU_PORT_KBD) { @@ -1499,9 +1499,9 @@ static int __devexit su_remove(struct of_device *dev) } if (up->port.membase) - of_iounmap(up->port.membase, up->reg_size); + of_iounmap(&op->resource[0], up->port.membase, up->reg_size); - dev_set_drvdata(&dev->dev, NULL); + dev_set_drvdata(&op->dev, NULL); return 0; } |