Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4459399pxj; Wed, 12 May 2021 06:13:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5092A0gxnhlGTwICGEfC/GSGRhkhOqun6t3X8tOADOiU4y68w2RVEVBS6s5kR9n0cKgq1 X-Received: by 2002:a17:906:18b2:: with SMTP id c18mr5162062ejf.160.1620825221055; Wed, 12 May 2021 06:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620825221; cv=none; d=google.com; s=arc-20160816; b=gmePammz8rvyGhg9FhNWXiEzNIR2g0DfwEzbqs8WqztSzmFdc14LHzpNDmlWVu4seP LHpLquvkMM3+GWwmBRjchATK614Y9vNCbMwDzmhv3k4M8yy+9bL9gYk3uJ/2Ts2OqCVZ +nornR6HOl0ZCG4XnWDOwXVIuuBKdTpENlZPAILqphTfL33p/RwoyevoG+byYRDDcUPY DZWNx0/SsHIbIKPPDxYBJYGNcmirZ4hE+OHjx1tL70g7Gg22lFjosqb+zL992Ked6+ef FK3cNo8x5m0DyrAkXzrEhw2WvlYoPztuAXng+OWvHIBCMykI7aSc6S2fU/Kp0ajMsua3 j9Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=3kHLj+itv3QxaN0ifPejyN0O/wgpS44mWZSE/Jh9RgI=; b=lm8CJsAHjhhnmmN0TeOCdyyksFa0IxIy6ifR6bsdrkLN2TkjnTGJJz33fu2xWICVTx a6E73FLIGst+zd2a69ba/69WGdQUySv26Y9KG1EsPzvURUAVHgONoMtAmd1RGdGfpryk D+/AD1GS4EQqZEsxhPcT3aYpkayUYwgit3K1NUriB325+2f9WQwYeKggJ7K9Z4KAmbLd pcb6FPdUkwewXtOW/yTQfJexNBI26f+lOFSxQEYMdAOe4o8/lgM1aqO8Y9mTdrSAc0w5 n3SmQoLVnvrWbQeX+X5p2Wd96WT2R/hhUgBSvjNgILU2Kr/zMLRbPLhVAZl59FBZAx4v tPgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rh9si19351818ejb.139.2021.05.12.06.13.16; Wed, 12 May 2021 06:13:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232852AbhELMjj (ORCPT + 99 others); Wed, 12 May 2021 08:39:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:45682 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232847AbhELMjj (ORCPT ); Wed, 12 May 2021 08:39:39 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6FF97AE85; Wed, 12 May 2021 12:38:30 +0000 (UTC) Date: Wed, 12 May 2021 14:38:28 +0200 From: Jean Delvare To: Zou Wei Cc: , , Subject: Re: [PATCH -next] misc: eeprom: Add missing MODULE_DEVICE_TABLE Message-ID: <20210512143828.04be05e5@endymion> In-Reply-To: <1620801708-18965-1-git-send-email-zou_wei@huawei.com> References: <1620801708-18965-1-git-send-email-zou_wei@huawei.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Zou, On Wed, 12 May 2021 14:41:48 +0800, Zou Wei wrote: > This patch adds missing MODULE_DEVICE_TABLE definition which generates > correct modalias for automatic loading of this driver when it is built > as an external module. > > Reported-by: Hulk Robot > Signed-off-by: Zou Wei > --- > drivers/misc/eeprom/eeprom.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/misc/eeprom/eeprom.c b/drivers/misc/eeprom/eeprom.c > index 34fa385..3fefb70 100644 > --- a/drivers/misc/eeprom/eeprom.c > +++ b/drivers/misc/eeprom/eeprom.c > @@ -194,6 +194,7 @@ static const struct i2c_device_id eeprom_id[] = { > { "eeprom", 0 }, > { } > }; > +MODULE_DEVICE_TABLE(i2c, eeprom_id); > > static struct i2c_driver eeprom_driver = { > .driver = { Nack. The "eeprom" driver is a legacy driver that is being phased out and replaced by the "at24" driver. We do NOT want the "eeprom" driver to be loaded automatically, because it would then potentially steal the devices which the "at24" driver should be dealing with. Plus, the only driver which should instantiate "eeprom" i2c devices is the "eeprom" driver itself. So I can't see how adding a MODULE_DEVICE_TABLE() would change anything in practice anyway. If it does change something for you then you are using the "eeprom" driver when you shouldn't. Please move to the "at24" driver. -- Jean Delvare SUSE L3 Support