Thread (72 messages) 72 messages, 9 authors, 2014-02-17

Re: [PATCH 2/6 v2] crypto:s5p-sss: Add device tree support

From: Sachin Kamat <hidden>
Date: 2014-01-10 06:20:16
Also in: linux-samsung-soc, lkml

Hi Naveen,

On 10 January 2014 11:37, Naveen Krishna Ch [off-list ref] wrote:
Hello Tomasz,
[snip]
quoted
quoted
*pdev)
  static struct platform_driver s5p_aes_crypto = {
        .probe  = s5p_aes_probe,
        .remove = s5p_aes_remove,
+       .id_table       = s5p_sss_ids,
        .driver = {
                .owner  = THIS_MODULE,
                .name   = "s5p-secss",
+               .of_match_table = s5p_sss_dt_match,

.of_match_table = of_match_ptr(s5p_sss_dt_match),
I dint use it, Some time back there was a patchset from Sachin
https://lkml.org/lkml/2013/9/28/61
Please suggest me on this.
In those cases the structure was always compiled in. i.e., it was not protected
by #ifdef CONFIG_OF. Hence use of of_match_ptr was not required. of_match_ptr
abstracts this check depending on OF is enabled or not. In the case of
this (sss) driver,
since you are using CONFIG_OF to selectively compile out the code (and esp.
s5p_sss_dt_match structure), use of of_match_ptr will make the code
simpler as it
avoids the use of a dummy structure definition (the #else part of the
struct definition) when OF is
disabled. Hope this clarifies.

-- 
With warm regards,
Sachin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help