linux/scripts
Thierry Reding 75096579c3 lib: devres: Introduce devm_ioremap_resource()
The devm_request_and_ioremap() function is very useful and helps avoid a
whole lot of boilerplate. However, one issue that keeps popping up is
its lack of a specific error code to determine which of the steps that
it performs failed. Furthermore, while the function gives an example and
suggests what error code to return on failure, a wide variety of error
codes are used throughout the tree.

In an attempt to fix these problems, this patch adds a new function that
drivers can transition to. The devm_ioremap_resource() returns a pointer
to the remapped I/O memory on success or an ERR_PTR() encoded error code
on failure. Callers can check for failure using IS_ERR() and determine
its cause by extracting the error code using PTR_ERR().

devm_request_and_ioremap() is implemented as a wrapper around the new
API and return NULL on failure as before. This ensures that backwards
compatibility is maintained until all users have been converted to the
new API, at which point the old devm_request_and_ioremap() function
should be removed.

A semantic patch is included which can be used to convert from the old
devm_request_and_ioremap() API to the new devm_ioremap_resource() API.
Some non-trivial cases may require manual intervention, though.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 09:41:43 -08:00
..
basic
coccinelle lib: devres: Introduce devm_ioremap_resource() 2013-01-22 09:41:43 -08:00
dtc script: dtc: clean generated files 2012-11-21 15:53:22 +00:00
genksyms
kconfig menuconfig: Replace CIRCLEQ by list_head-style lists. 2012-10-25 15:06:00 +02:00
ksymoops
mod modpost.c: Stop checking __dev* section mismatches 2012-11-30 12:08:42 -08:00
package Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-10-12 10:27:27 +09:00
rt-tester
selinux
tracing
.gitignore X.509: Add simple ASN.1 grammar compiler 2012-10-08 13:50:19 +10:30
Kbuild.include Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-10-08 07:56:10 +09:00
Lindent
Makefile X.509: Add simple ASN.1 grammar compiler 2012-10-08 13:50:19 +10:30
Makefile.asm-generic uapi: Allow automatic generation of uapi/asm/ header files 2012-10-17 12:25:44 +01:00
Makefile.build X.509: Add simple ASN.1 grammar compiler 2012-10-08 13:50:19 +10:30
Makefile.clean
Makefile.fwinst kbuild: Fix accidental revert in commit fe04ddf 2012-10-15 13:01:05 -07:00
Makefile.headersinst UAPI: Plumb the UAPI Kbuilds into the user header installation and checking 2012-10-02 18:01:57 +01:00
Makefile.help
Makefile.host
Makefile.lib kbuild: centralize .dts->.dtb rule 2012-11-30 10:52:19 -06:00
Makefile.modbuiltin
Makefile.modinst modules: don't break modules_install on external modules with no key. 2012-11-06 11:52:24 +10:30
Makefile.modpost kbuild: sign the modules at install time 2012-10-19 08:27:43 -07:00
Makefile.modsign MODSIGN: Add modules_sign make target 2012-12-14 13:05:28 +10:30
asn1_compiler.c X.509: Add simple ASN.1 grammar compiler 2012-10-08 13:50:19 +10:30
bin2c.c
bloat-o-meter
bootgraph.pl
checkincludes.pl
checkkconfigsymbols.sh
checkpatch.pl checkpatch: warn on uapi #includes that #include <uapi/... 2012-12-20 17:40:20 -08:00
checkstack.pl
checksyscalls.sh checksyscalls: fix "here document" handling 2012-09-25 08:59:21 -07:00
checkversion.pl
cleanfile
cleanpatch
coccicheck coccicheck: Add the rep+ctxt mode 2012-10-11 15:11:12 +02:00
config scripts/config: Fix wrong "shift" for --keep-case 2012-12-14 14:16:10 +01:00
conmakehash.c
decodecode
depmod.sh
diffconfig
docproc.c
export_report.pl
extract-ikconfig
extract-vmlinux
gcc-goto.sh
gcc-version.sh kbuild: Fix gcc -x syntax 2012-10-03 09:03:24 +02:00
gcc-x86_32-has-stack-protector.sh kbuild: Fix gcc -x syntax 2012-10-03 09:03:24 +02:00
gcc-x86_64-has-stack-protector.sh kbuild: Fix gcc -x syntax 2012-10-03 09:03:24 +02:00
gen_initramfs_list.sh
get_maintainer.pl
gfp-translate
headerdep.pl
headers.sh
headers_check.pl
headers_install.pl UAPI: Strip _UAPI prefix on header install no matter the whitespace 2013-01-02 17:36:10 -08:00
kallsyms.c
kernel-doc misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
link-vmlinux.sh Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin 2012-09-12 07:12:53 +08:00
makelst
markup_oops.pl
mkcompile_h
mkmakefile
mksysmap
mkuboot.sh
mkversion
module-common.lds
namespace.pl
patch-kernel
pnmtologo.c scripts/pnmtologo: fix for plain PBM 2012-11-20 11:58:03 +01:00
profile2linkerlist.pl
recordmcount.c
recordmcount.h
recordmcount.pl
setlocalversion
show_delta
sign-file sign-file: fix the perl warning message when extracting ASN.1 2012-11-21 06:52:12 -10:00
sortextable.c ARM: 7568/1: Sort exception table at compile time 2012-11-04 10:31:16 +00:00
sortextable.h
tags.sh scripts/tags.sh: Support compiled source 2012-12-11 14:25:42 +01:00
unifdef.c
ver_linux
xz_wrap.sh