Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759067AbcJRHxC (ORCPT ); Tue, 18 Oct 2016 03:53:02 -0400 Received: from mail-qt0-f178.google.com ([209.85.216.178]:33419 "EHLO mail-qt0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779AbcJRHwz (ORCPT ); Tue, 18 Oct 2016 03:52:55 -0400 MIME-Version: 1.0 In-Reply-To: <1476719053-17600-6-git-send-email-javier@osg.samsung.com> References: <1476719053-17600-1-git-send-email-javier@osg.samsung.com> <1476719053-17600-6-git-send-email-javier@osg.samsung.com> From: Benjamin Gaignard Date: Tue, 18 Oct 2016 09:52:41 +0200 Message-ID: Subject: Re: [PATCH 5/5] [media] st-cec: Fix module autoload To: Javier Martinez Canillas Cc: Linux Kernel Mailing List , Mauro Carvalho Chehab , devel@driverdev.osuosl.org, kernel@stlinux.com, Greg Kroah-Hartman , "linux-media@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u9I7r7xf008663 Content-Length: 1478 Lines: 55 Thanks, Acked-by: Benjamin Gaignard 2016-10-17 17:44 GMT+02:00 Javier Martinez Canillas : > 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. > > Export the module alias information using the MODULE_DEVICE_TABLE() macro. > > Before this patch: > > $ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias > $ > > After this patch: > > $ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias > alias: of:N*T*Cst,stih-cecC* > alias: of:N*T*Cst,stih-cec > > Signed-off-by: Javier Martinez Canillas > > --- > > drivers/staging/media/st-cec/stih-cec.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/media/st-cec/stih-cec.c b/drivers/staging/media/st-cec/stih-cec.c > index 214344866a6b..19d3ff30c8f8 100644 > --- a/drivers/staging/media/st-cec/stih-cec.c > +++ b/drivers/staging/media/st-cec/stih-cec.c > @@ -363,6 +363,7 @@ static const struct of_device_id stih_cec_match[] = { > }, > {}, > }; > +MODULE_DEVICE_TABLE(of, stih_cec_match); > > static struct platform_driver stih_cec_pdrv = { > .probe = stih_cec_probe, > -- > 2.7.4 > -- Benjamin Gaignard Graphic Study Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog