aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-01-22 02:52:37 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-01-25 01:41:49 -0500
commitce841b945b84bf7360aa32e60ddaa1e9ccae3e96 (patch)
tree7572c9a83fac2956b6502c90d021b28cc876689c
parent7755726fe90a8b253659756e6de68c1a55aa427f (diff)
Input: xilinx_ps2 - use resource_size
Use the resource_size inline function instead of manually calculating the resource size. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: John Linn <john.linn@xilinx.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/serio/xilinx_ps2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c
index 78c64fb8a4b0..8298e1f68234 100644
--- a/drivers/input/serio/xilinx_ps2.c
+++ b/drivers/input/serio/xilinx_ps2.c
@@ -270,7 +270,7 @@ static int __devinit xps2_of_probe(struct of_device *ofdev,
270 drvdata->irq = r_irq.start; 270 drvdata->irq = r_irq.start;
271 271
272 phys_addr = r_mem.start; 272 phys_addr = r_mem.start;
273 remap_size = r_mem.end - r_mem.start + 1; 273 remap_size = resource_size(&r_mem);
274 if (!request_mem_region(phys_addr, remap_size, DRIVER_NAME)) { 274 if (!request_mem_region(phys_addr, remap_size, DRIVER_NAME)) {
275 dev_err(dev, "Couldn't lock memory region at 0x%08llX\n", 275 dev_err(dev, "Couldn't lock memory region at 0x%08llX\n",
276 (unsigned long long)phys_addr); 276 (unsigned long long)phys_addr);
@@ -344,7 +344,7 @@ static int __devexit xps2_of_remove(struct of_device *of_dev)
344 if (of_address_to_resource(of_dev->node, 0, &r_mem)) 344 if (of_address_to_resource(of_dev->node, 0, &r_mem))
345 dev_err(dev, "invalid address\n"); 345 dev_err(dev, "invalid address\n");
346 else 346 else
347 release_mem_region(r_mem.start, r_mem.end - r_mem.start + 1); 347 release_mem_region(r_mem.start, resource_size(&r_mem));
348 348
349 kfree(drvdata); 349 kfree(drvdata);
350 350