]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/platform/olpc/olpc-ec.c: initialise earlier
authorDaniel Drake <dsd@laptop.org>
Thu, 22 Aug 2013 23:35:43 +0000 (16:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Aug 2013 16:51:22 +0000 (09:51 -0700)
commit44861b8abcc491b0a2b732cc9a89adfde39b4a0e
tree70278a6e98eb83f88abbc042136278c9e9879705
parentde994af17a4e93e84d76262029b0113970d7bf52
drivers/platform/olpc/olpc-ec.c: initialise earlier

Being a low-level component, various drivers (e.g.  olpc-battery) assume
that it is ok to communicate with the OLPC Embedded Controller during
probe.  Therefore the OLPC EC driver must be initialised before other
drivers try to use it.  This was the case until it was recently moved
out of arch/x86 and restructured around commits 3d3166d44de6 ("Platform:
OLPC: turn EC driver into a platform_driver") and 3ddb14a61c7f ("x86:
OLPC: switch over to using new EC driver on x86").

Use arch_initcall so that olpc-ec is readied earlier, matching the
previous behaviour.

Fixes a regression introduced in Linux-3.6 where various drivers such as
olpc-battery and olpc-xo1-sci failed to load due to an inability to
communicate with the EC.  The user-visible effect was a lack of battery
monitoring, missing ebook/lid switch input devices, etc.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Cc: Andres Salomon <dilinger@queued.net>
Cc: Paul Fox <pgf@laptop.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/platform/olpc/olpc-ec.c