Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751420AbbFVOXV (ORCPT ); Mon, 22 Jun 2015 10:23:21 -0400 Received: from lb1-smtp-cloud6.xs4all.net ([194.109.24.24]:46051 "EHLO lb1-smtp-cloud6.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750919AbbFVOXI (ORCPT ); Mon, 22 Jun 2015 10:23:08 -0400 Message-ID: <1434982982.2524.10.camel@tiscali.nl> Subject: Re: [PATCH 4.0 050/105] i2c: hix5hd2: Fix modalias to make module auto-loading work From: Paul Bolle To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Axel Lin , Zhangfei Gao , Wolfram Sang Date: Mon, 22 Jun 2015 16:23:02 +0200 In-Reply-To: <20150619203559.674642625@linuxfoundation.org> References: <20150619203558.187802739@linuxfoundation.org> <20150619203559.674642625@linuxfoundation.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.3 (3.16.3-2.fc22) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1464 Lines: 40 On Fri, 2015-06-19 at 13:35 -0700, Greg Kroah-Hartman wrote: > Make the modalias match driver name, this is required to make module > auto-loading work. > > Signed-off-by: Axel Lin > Acked-by: Zhangfei Gao > Signed-off-by: Wolfram Sang > Signed-off-by: Greg Kroah-Hartman > > --- > drivers/i2c/busses/i2c-hix5hd2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/i2c/busses/i2c-hix5hd2.c > +++ b/drivers/i2c/busses/i2c-hix5hd2.c > @@ -554,4 +554,4 @@ module_platform_driver(hix5hd2_i2c_drive > MODULE_DESCRIPTION("Hix5hd2 I2C Bus driver"); > MODULE_AUTHOR("Wei Yan "); > MODULE_LICENSE("GPL"); > -MODULE_ALIAS("platform:i2c-hix5hd2"); > +MODULE_ALIAS("platform:hix5hd2-i2c"); How does this work? My current understanding is that for module auto-loading to work with the platform: prefix one needs a matching platform_device (ie, a struct platform_device with .name being "hix5hd2-i2c"). And I couldn't spot where that platform_device is created in 4.0 or v4.1. Does matching platform_driver.driver.name (which is what this patch appears to do) also enable module auto-loading? That would mean there's another, even less obvious, mechanism at work here. Thanks, Paul Bolle -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/