lkml.org 
[lkml]   [2012]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4] pstore/ram: Add ramoops support for the Flattened Device Tree.
From
Hi,

On Tue, Jun 12, 2012 at 12:56 PM, Bryan Freed <bfreed@chromium.org> wrote:

[...]

> +static const struct of_device_id ramoops_of_match[] = {
> +       { .compatible = "ramoops", },
> +       { },
> +};
> +MODULE_DEVICE_TABLE(of, ramoops_of_match);
> +
>  static struct platform_driver ramoops_driver = {
>        .remove         = __exit_p(ramoops_remove),
>        .driver         = {
>                .name   = "ramoops",
>                .owner  = THIS_MODULE,
> +               .of_match_table = ramoops_of_match,

I think you need some of the above to be #ifdef CONFIG_OF + empty
stubs in the else case, and the above assignment should use
of_match_ptr() to wrap the assignment. Take a look at how some of the
other drivers in the kernel handle the OF bindings on platform drivers
for reference.

The bindings look reasonable to me; what they don't cover is where in
the device tree the node should reside. To be honest, I think it's
probably better to leave it fairly vague since different platforms
might prefer different locations -- it's really software configuration
data more than a description of the system hardware.

Besides that, this looks good as far as I am concerned.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-06-21 09:41    [W:0.064 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site