Skip to content

Commit

Permalink
Staging: android: ram_console: Use resource_size function
Browse files Browse the repository at this point in the history
The semantic patch that makes this change is available
in scripts/coccinelle/api/resource_size.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
thomasmey authored and gregkh committed Feb 9, 2012
1 parent 217218f commit 8d438be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/android/ram_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ static int ram_console_driver_probe(struct platform_device *pdev)
"%lx\n", res, pdev->num_resources, res ? res->flags : 0);
return -ENXIO;
}
buffer_size = res->end - res->start + 1;
buffer_size = resource_size(res);
start = res->start;
printk(KERN_INFO "ram_console: got buffer at %zx, size %zx\n",
start, buffer_size);
Expand Down

0 comments on commit 8d438be

Please sign in to comment.