diff options
author | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-06-18 22:15:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-20 19:15:22 -0400 |
commit | 924d37118f9e18825294b2012a10c6245d6c25e1 (patch) | |
tree | 9cc0169d406efeddab7d149700e0a507718f9864 /include/linux/pstore_ram.h | |
parent | 62a1efb9f868690d68b11ffb22dc598e547aa184 (diff) |
pstore/ram: Probe as early as possible
Registering the platform driver before module_init allows us to log oopses
that happen during device probing.
This requires changing module_init to postcore_initcall, and switching
from platform_driver_probe to platform_driver_register because the
platform device is not registered when the platform driver is registered;
and because we use driver_register, now can't use create_bundle() (since
it will try to register the same driver once again), so we have to switch
to platform_device_register_data().
Also, some __init -> __devinit changes were needed.
Overall, the registration logic is now much clearer, since we have only
one driver registration point, and just an optional dummy device, which
is created from the module parameters.
Suggested-by: Colin Cross <ccross@android.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/pstore_ram.h')
-rw-r--r-- | include/linux/pstore_ram.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index 2470bb591434..e681af92c04b 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h | |||
@@ -48,9 +48,9 @@ struct persistent_ram_zone { | |||
48 | size_t old_log_size; | 48 | size_t old_log_size; |
49 | }; | 49 | }; |
50 | 50 | ||
51 | struct persistent_ram_zone * __init persistent_ram_new(phys_addr_t start, | 51 | struct persistent_ram_zone * __devinit persistent_ram_new(phys_addr_t start, |
52 | size_t size, | 52 | size_t size, |
53 | bool ecc); | 53 | bool ecc); |
54 | void persistent_ram_free(struct persistent_ram_zone *prz); | 54 | void persistent_ram_free(struct persistent_ram_zone *prz); |
55 | void persistent_ram_zap(struct persistent_ram_zone *prz); | 55 | void persistent_ram_zap(struct persistent_ram_zone *prz); |
56 | 56 | ||