aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-spear-spics.c
AgeCommit message (Collapse)AuthorFilesLines
2013-08-16drivers/gpio: simplify use of devm_ioremap_resourceJulia Lawall1-6/+1
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-01-22gpio: Convert to devm_ioremap_resource()Thierry Reding1-5/+3
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding <[email protected]> Cc: Grant Likely <[email protected]> Cc: Linus Walleij <[email protected]> Acked-by: Viresh Kumar <[email protected]> Tested-by: Gregory CLEMENT <[email protected]> Acked-by: Gregory CLEMENT <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-18gpio: SPEAr: add spi chipselect control driverShiraz Hashim1-0/+217
SPEAr platform provides a provision to control chipselects of ARM PL022 Prime Cell spi controller through its system registers, which otherwise remains under PL022 control which some protocols do not want. This commit intends to provide the spi chipselect control in software over gpiolib interface. spi chip drivers can use the exported gpiolib interface to define their chipselect through DT or platform data. Cc: Grant Likely <[email protected]> Signed-off-by: Shiraz Hashim <[email protected]> Reviewed-by: Vipin Kumar <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Linus Walleij <[email protected]>