Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754927AbaAJGUQ (ORCPT ); Fri, 10 Jan 2014 01:20:16 -0500 Received: from mail-ob0-f173.google.com ([209.85.214.173]:42859 "EHLO mail-ob0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754550AbaAJGUO (ORCPT ); Fri, 10 Jan 2014 01:20:14 -0500 MIME-Version: 1.0 In-Reply-To: References: <1389095509-14357-3-git-send-email-ch.naveen@samsung.com> <1389243541-13122-1-git-send-email-ch.naveen@samsung.com> <52CEAEB0.80304@samsung.com> Date: Fri, 10 Jan 2014 11:50:13 +0530 Message-ID: Subject: Re: [PATCH 2/6 v2] crypto:s5p-sss: Add device tree support From: Sachin Kamat To: Naveen Krishna Ch Cc: Tomasz Figa , Naveen Krishna Chatradhi , linux-crypto@vger.kernel.org, "linux-samsung-soc@vger.kernel.org" , LKML , Vladimir Zapolskiy , Herbert Xu , Tomasz Figa , "David S. Miller" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Naveen, On 10 January 2014 11:37, Naveen Krishna Ch wrote: > Hello Tomasz, > [snip] >>> *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 -- 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/