No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Amitoj Kaur Chawla fa283db76f gpio: timberdale: Switch to devm_ioremap_resource()
Replace calls to devm_request_mem_region and devm_ioremap with a
direct call to devm_ioremap_resource instead and modify error
handling.

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 Coccinelle semantic patch that is used to
make this change is as follows:
//<smpl>
@nm@
expression myname;
identifier i;
@@

struct platform_driver i = { .driver = { .name = myname } };

@@
expression dev,res,size,e1,e;
expression nm.myname;
@@

-if (!devm_request_mem_region(dev, res->start, size,
-                              \(res->name\|dev_name(dev)\|myname\)))
                               {
-   ...
-   return ...;
-}
... when != res->start = e1
e =
-devm_ioremap(dev,res->start,size);
+devm_ioremap_resource(dev,res);

if
-(e == NULL)
+(IS_ERR(e))
{
 ...
-return ...;
+return PTR_ERR(e);
}
//</smpl>

Further, updated error handling by hand as devm_ioremap_resource
gives appropriate error messages, so remove unnecessary error
messages.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-03-08 15:56:33 +07:00
arch MIPS: txx9: rbtx4938: switch to gpiochip_add_data() 2016-02-19 09:51:44 +01:00
block Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
certs
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-01-22 11:58:43 -08:00
Documentation Merge branch 'devm-gpiochip-add-data' into devel 2016-03-08 14:41:41 +07:00
drivers gpio: timberdale: Switch to devm_ioremap_resource() 2016-03-08 15:56:33 +07:00
firmware
fs Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-01-24 12:50:56 -08:00
include Merge branch 'devm-gpiochip-add-data' into devel 2016-03-08 14:41:41 +07:00
init mm: memcontrol: rein in the CONFIG space madness 2016-01-20 17:09:18 -08:00
ipc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-01-23 12:24:56 -08:00
kernel wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
lib Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
mm vmstat: Remove BUG_ON from vmstat_update 2016-01-24 08:55:52 -08:00
net Rework and error handling fixes, primarily in the fscatch and fd transports. 2016-01-24 12:39:09 -08:00
samples
scripts UBSAN: run-time undefined behavior sanity checker 2016-01-20 17:09:18 -08:00
security wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
sound sound fixes for 4.5-rc1 2016-01-22 11:53:56 -08:00
tools gpio: present the consumer of a line to userspace 2016-02-25 21:07:23 +01:00
usr
virt
.get_maintainer.ignore
.gitignore
.mailmap
COPYING
CREDITS ./CREDITS: add credit information for Martin Kepplinger 2016-01-20 17:09:18 -08:00
Kbuild
Kconfig
MAINTAINERS Merge branch 'chardev' into devel 2016-02-09 12:58:19 +01:00
Makefile Linux 4.5-rc1 2016-01-24 13:06:47 -08:00
README
README.md Share upstreaming patches 2016-02-23 19:33:35 +05:30
REPORTING-BUGS

linux-upstream

This is for sharing upstreaming activities.