asm-generic/io.h: Reconcile I/O accessor overrides
authorThierry Reding <treding@nvidia.com>
Wed, 1 Oct 2014 13:20:33 +0000 (15:20 +0200)
committerThierry Reding <treding@nvidia.com>
Mon, 10 Nov 2014 14:59:22 +0000 (15:59 +0100)
commit9216efafc52ff99e9351ef60de5fcafc2bc8adb6
tree96f7dccf719a10045a90c70a0de95cbd692c926f
parent4707a341b4af57c72c1573a89d303559cf7bcf88
asm-generic/io.h: Reconcile I/O accessor overrides

Overriding I/O accessors and helpers is currently very inconsistent.
This commit introduces a homogeneous way to override functions by
checking for the existence of a macro with the same of the function.
Architectures can provide their own implementations and communicate this
to the generic header by defining the appropriate macro. Doing this will
also help prevent the implementations from being subsequently
overridden.

While at it, also turn a lot of macros into static inline functions for
better type checking and to provide a canonical signature for overriding
architectures to copy. Also reorder functions by logical groups.

Signed-off-by: Thierry Reding <treding@nvidia.com>
include/asm-generic/io.h