From patchwork Mon Nov 14 14:34:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 694547 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tHY1s6YH8z9t0J for ; Tue, 15 Nov 2016 01:34:25 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="iXKMPV4N"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752517AbcKNOeY (ORCPT ); Mon, 14 Nov 2016 09:34:24 -0500 Received: from mail-lf0-f41.google.com ([209.85.215.41]:33552 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752752AbcKNOeX (ORCPT ); Mon, 14 Nov 2016 09:34:23 -0500 Received: by mail-lf0-f41.google.com with SMTP id c13so59536780lfg.0 for ; Mon, 14 Nov 2016 06:34:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=QWtxsEZCxE0iGLVqOprEGZpgqqMyOIuJOzaIBtnIPJU=; b=iXKMPV4N+mMztZ4xMCIUhBCHqdmWu14Xx6HhyCgFiyOtlMKEM1r7mqO84G4XIQU1w9 pJVOVaUgkS3fP+MnJq7gxgkLZFszgghegGoO3SeEfNSWRRORdXEa0MH7h5yqnPxZZFmA cWe4pT/aadV4NOxOT3KH9TNMW2FYGKinfkddE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QWtxsEZCxE0iGLVqOprEGZpgqqMyOIuJOzaIBtnIPJU=; b=YwsryeLpLgH88MRC/MULU6YzvePwCvGAHP7F00ZCmQV1Z6re3JUA25FhNl1MvR7s9m O9ViJYVbRC/ZO2+yHx9HEOZh/F0yAw5FTF+yJ490pn4Lx8zopMpIyitAXJQto/Ue0tvg P3Pjl8Tnegk4gmtA43z0Ht5gGBpq0ZyL+gTgm67ffIhfr9gN0OaYqr3vvePoBabdCaRz dwzmE0h5NtyYcnjmPnwEnZJ9pfagTyc7l/n0+UczL7OqL1QnSh1/H/OjK6NgnO/3CAVz d3Vj9zBL7/bGf3XRUyt1Mok8+ssPt5uiV05q8mKy4UfbMwgIqUbIq70PU/TiMnb1W3IK QlTA== X-Gm-Message-State: ABUngvds9P2GgrDO0b8xGG9PYaPfTichooEZLFQaHIzE5JtQaBYAJkTUUi2twOWJfdngHnCO X-Received: by 10.25.67.12 with SMTP id q12mr6626959lfa.63.1479134061668; Mon, 14 Nov 2016 06:34:21 -0800 (PST) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id h139sm5045144lfg.18.2016.11.14.06.34.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Nov 2016 06:34:21 -0800 (PST) From: Linus Walleij To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: Linus Walleij , stable@vger.kernel.org, Jonathan Cameron , Peter Rosin Subject: [PATCH v2] i2c: mux: fix up dependencies Date: Mon, 14 Nov 2016 15:34:17 +0100 Message-Id: <1479134057-30653-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org We get the following build error from UM Linux after adding an entry to drivers/iio/gyro/Kconfig that issues "select I2C_MUX": ERROR: "devm_ioremap_resource" [drivers/i2c/muxes/i2c-mux-reg.ko] undefined! ERROR: "of_address_to_resource" [drivers/i2c/muxes/i2c-mux-reg.ko] undefined! It appears that the I2C mux core code depends on HAS_IOMEM for historical reasons, while CONFIG_I2C_MUX_REG does *not* have a direct dependency on HAS_IOMEM. This creates a situation where a allyesconfig or allmodconfig for UM Linux will select I2C_MUX, and will implicitly enable I2C_MUX_REG as well, and the compilation will fail for the register driver. Fix this up by making I2C_MUX_REG depend on HAS_IOMEM and removing the dependency from I2C_MUX. Cc: stable@vger.kernel.org Reported-by: kbuild test robot Reported-by: Jonathan Cameron Cc: Jonathan Cameron Cc: Peter Rosin Signed-off-by: Linus Walleij Acked-by: Peter Rosin Acked-by: Jonathan Cameron --- ChangeLog v1->v2: - Drop the assumed dependency on OF from I2C_MUX --- drivers/i2c/Kconfig | 1 - drivers/i2c/muxes/Kconfig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index d223650a97e4..11edabf425ae 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -59,7 +59,6 @@ config I2C_CHARDEV config I2C_MUX tristate "I2C bus multiplexing support" - depends on HAS_IOMEM help Say Y here if you want the I2C core to support the ability to handle multiplexed I2C bus topologies, by presenting each diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig index e280c8ecc0b5..96de9ce5669b 100644 --- a/drivers/i2c/muxes/Kconfig +++ b/drivers/i2c/muxes/Kconfig @@ -63,6 +63,7 @@ config I2C_MUX_PINCTRL config I2C_MUX_REG tristate "Register-based I2C multiplexer" + depends on HAS_IOMEM help If you say yes to this option, support will be included for a register based I2C multiplexer. This driver provides access to