From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933371AbdABQcV (ORCPT ); Mon, 2 Jan 2017 11:32:21 -0500 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:57145 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751641AbdABQcT (ORCPT ); Mon, 2 Jan 2017 11:32:19 -0500 Subject: Re: [PATCH] crypto: picoxcell - Fix module autoload for non-OF registration To: Arnd Bergmann References: <1483371482-4956-1-git-send-email-javier@osg.samsung.com> <2761495.aqgObxUbGB@wuerfel> <2972455.z8LBYOSBAA@wuerfel> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Herbert Xu , linux-crypto@vger.kernel.org, Jamie Iles , "David S. Miller" From: Javier Martinez Canillas Message-ID: Date: Mon, 2 Jan 2017 13:32:11 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <2972455.z8LBYOSBAA@wuerfel> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/02/2017 01:24 PM, Arnd Bergmann wrote: > On Monday, January 2, 2017 1:13:24 PM CET Javier Martinez Canillas wrote: >> Hello Arnd, >> >> On 01/02/2017 01:05 PM, Arnd Bergmann wrote: >>> On Monday, January 2, 2017 12:38:02 PM CET Javier Martinez Canillas wrote: >>>> If the driver is built as a module, autoload won't work because the module >>>> alias information is not filled. So user-space can't match the registered >>>> device with the corresponding module if the device isn't registered via OF. >>>> >>>> Export the module alias information using the MODULE_DEVICE_TABLE() macro. >>> >>> I think we can just remove the table, as the platform only supports >>> booting through DT anyway. >>> >> >> Agreed. I should had checked if mach-picoxcell was DT-only indeed. >> >> Should I also make the driver to depend on OF and remove the #ifdefery then? > > I don't think we need a dependency, the #ifdef checks in there were needed > only to make the driver smaller if OF is disabled and it should still build > fine if someone tries to compile it for CONFIG_COMPILE_TEST without > CONFIG_OF. > OK, the driver doesn't depend on COMPILE_TEST though but I agree with you since it seems the driver only has runtime but no build time dependencies with ARCH_PICOXCELL. > If we remove the platform ID, we can however also remove the > spacc_is_compatible() function and just call of_device_is_compatible() > in its place. > Yes. > Arnd > Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America