- Subject: Re: [PATCH 1/7] pstore/ram: Probe as early as possible
- From: Kees Cook <keescook@xxxxxxxxxxxx>
- Date: Tue, 19 Jun 2012 11:40:04 -0700
- Cc: devel@xxxxxxxxxxxxxxxxxxxx, Tony Luck <tony.luck@xxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, patches@xxxxxxxxxx, Marco Stornelli <marco.stornelli@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, arve@xxxxxxxxxxx, Jesper Juhl <jj@xxxxxxxxxxxxx>, John Stultz <john.stultz@xxxxxxxxxx>, Shuah Khan <shuahkhan@xxxxxxxxx>, Colin Cross <ccross@xxxxxxxxxxx>, Rebecca Schultz Zavin <rebecca@xxxxxxxxxxx>, WANG Cong <xiyou.wangcong@xxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, kernel-team@xxxxxxxxxxx, linaro-kernel@xxxxxxxxxxxxxxxx, Thomas Meyer <thomas@xxxxxxxx>
- Delivered-to: devel@xxxxxxxxxxxxxxxxxxxx
- In-reply-to: <1340072156-6225-1-git-send-email-anton.vorontsov@linaro.org>
On Mon, Jun 18, 2012 at 7:15 PM, Anton Vorontsov
<anton.vorontsov@xxxxxxxxxx> wrote:
> 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@xxxxxxxxxxx>
> Signed-off-by: Anton Vorontsov <anton.vorontsov@xxxxxxxxxx>
Acked-by: Kees Cook <keescook@xxxxxxxxxxxx>
--
Kees Cook
Chrome OS Security
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
[Video for Linux]
[Mplayer Users]
[Linux USB Devel]
[Linux Audio Users]
[Photos]
[Yosemite Photos]
[Free Singles Community]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Yosemite Backpacking]