diff options
author | Joe Perches <joe@perches.com> | 2011-06-09 12:13:32 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-06-10 08:55:36 -0400 |
commit | 28f65c11f2ffb3957259dece647a24f8ad2e241b (patch) | |
tree | 6b7621d09d10df89eedd908d4506fb9f457a909f /drivers/input/serio/sa1111ps2.c | |
parent | 140a1ef2f91a00e1d25f0878c193abdc25bf6ebe (diff) |
treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing.
Done via coccinelle scripts like:
@@
struct resource *ptr;
@@
- ptr->end - ptr->start + 1
+ resource_size(ptr)
and some grep and typing.
Mostly uncompiled, no cross-compilers.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/input/serio/sa1111ps2.c')
-rw-r--r-- | drivers/input/serio/sa1111ps2.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c index d55874e5d1c..44fc8b4bcd8 100644 --- a/drivers/input/serio/sa1111ps2.c +++ b/drivers/input/serio/sa1111ps2.c | |||
@@ -300,8 +300,7 @@ static int __devinit ps2_probe(struct sa1111_dev *dev) | |||
300 | 300 | ||
301 | out: | 301 | out: |
302 | sa1111_disable_device(ps2if->dev); | 302 | sa1111_disable_device(ps2if->dev); |
303 | release_mem_region(dev->res.start, | 303 | release_mem_region(dev->res.start, resource_size(&dev->res)); |
304 | dev->res.end - dev->res.start + 1); | ||
305 | free: | 304 | free: |
306 | sa1111_set_drvdata(dev, NULL); | 305 | sa1111_set_drvdata(dev, NULL); |
307 | kfree(ps2if); | 306 | kfree(ps2if); |
@@ -317,8 +316,7 @@ static int __devexit ps2_remove(struct sa1111_dev *dev) | |||
317 | struct ps2if *ps2if = sa1111_get_drvdata(dev); | 316 | struct ps2if *ps2if = sa1111_get_drvdata(dev); |
318 | 317 | ||
319 | serio_unregister_port(ps2if->io); | 318 | serio_unregister_port(ps2if->io); |
320 | release_mem_region(dev->res.start, | 319 | release_mem_region(dev->res.start, resource_size(&dev->res)); |
321 | dev->res.end - dev->res.start + 1); | ||
322 | sa1111_set_drvdata(dev, NULL); | 320 | sa1111_set_drvdata(dev, NULL); |
323 | 321 | ||
324 | kfree(ps2if); | 322 | kfree(ps2if); |