Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1166672AbdDXIWo convert rfc822-to-8bit (ORCPT ); Mon, 24 Apr 2017 04:22:44 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:39953 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1166647AbdDXIWd (ORCPT ); Mon, 24 Apr 2017 04:22:33 -0400 From: Juergen Borleis Organization: Pengutronix e.K. To: Tobias Regnery Subject: Re: [PATCH net-next] net: dsa: LAN9303: add i2c dependency Date: Mon, 24 Apr 2017 10:22:04 +0200 User-Agent: KMail/1.9.10 (enterprise35 0.20100827.1168748) Cc: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170424080737.24897-1-tobias.regnery@gmail.com> In-Reply-To: <20170424080737.24897-1-tobias.regnery@gmail.com> X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <201704241022.05686.jbe@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:5e26:aff:fe2b:7cc4 X-SA-Exim-Mail-From: jbe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1955 Lines: 52 Hi Tobias, On Monday 24 April 2017 10:07:37 Tobias Regnery wrote: > The Kconfig symbol for the I2C mode of the LAN9303 driver selects > REGMAP_I2C. This symbol depends on I2C but the driver doesen't has a > dependency on I2C. > > With CONFIG_I2C=n kconfig fails to select REGMAP_I2C and we get the > following warning: > > warning: (NET_DSA_SMSC_LAN9303_I2C) selects REGMAP_I2C which has unmet > direct dependencies (I2C) > > This results in a build failure because the regmap-i2c functions aren't > available: > > drivers/base/regmap/regmap-i2c.c: In function 'regmap_smbus_byte_reg_read': > drivers/base/regmap/regmap-i2c.c:29:8: error: implicit declaration of function 'i2c_smbus_read_byte_data' [-Werror=implicit-function-declaration] > > drivers/base/regmap/regmap-i2c.c: In function 'regmap_smbus_byte_reg_write': > drivers/base/regmap/regmap-i2c.c:47:9: error: implicit declaration of function 'i2c_smbus_write_byte_data' [-Werror=implicit-function-declaration] > ... > > Fix this by adding a kconfig dependency on the I2C subsystem. > > Fixes: be4e119f9914 ("net: dsa: LAN9303: add I2C managed mode support") > Signed-off-by: Tobias Regnery > --- > drivers/net/dsa/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig > index 131a5b1cbfc8..862ee22303c2 100644 > --- a/drivers/net/dsa/Kconfig > +++ b/drivers/net/dsa/Kconfig > @@ -59,7 +59,7 @@ config NET_DSA_SMSC_LAN9303 > > config NET_DSA_SMSC_LAN9303_I2C > tristate "SMSC/Microchip LAN9303 3-ports 10/100 ethernet switch in I2C managed mode" > - depends on NET_DSA > + depends on NET_DSA && I2C > select NET_DSA_SMSC_LAN9303 > select REGMAP_I2C > ---help--- Thanks, but already found and fixed by Arnd Bergmann. jb -- Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? ?| Juergen Borleis ? ? ? ? ? ? | Industrial Linux Solutions ? ? ? ? ? ? ? ? ?| http://www.pengutronix.de/ ?|