linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: vikram186@gmail.com (Vikram Narayanan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mfd/syscon: Fix compilation issue when built for imx
Date: Mon, 29 Oct 2012 22:42:33 +0530	[thread overview]
Message-ID: <508EB901.1050303@gmail.com> (raw)

Compiling for a IMX6Q SoC with imx_v6_v7_defconfig results in the following error

<<<
drivers/mfd/syscon.c:94:15: error: variable 'syscon_regmap_config' has initializer but incomplete type
drivers/mfd/syscon.c:95:2: error: unknown field 'reg_bits' specified in initializer
drivers/mfd/syscon.c:95:2: warning: excess elements in struct initializer [enabled by default]
drivers/mfd/syscon.c:95:2: warning: (near initialization for 'syscon_regmap_config') [enabled by default]
drivers/mfd/syscon.c:96:2: error: unknown field 'val_bits' specified in initializer
drivers/mfd/syscon.c:96:2: warning: excess elements in struct initializer [enabled by default]
drivers/mfd/syscon.c:96:2: warning: (near initialization for 'syscon_regmap_config') [enabled by default]
drivers/mfd/syscon.c:97:2: error: unknown field 'reg_stride' specified in initializer
drivers/mfd/syscon.c:97:2: warning: excess elements in struct initializer [enabled by default]
drivers/mfd/syscon.c:97:2: warning: (near initialization for 'syscon_regmap_config') [enabled by default]
drivers/mfd/syscon.c: In function 'syscon_probe':
drivers/mfd/syscon.c:124:2: error: invalid use of undefined type 'struct regmap_config'
drivers/mfd/syscon.c:125:2: error: implicit declaration of function 'devm_regmap_init_mmio' [-Werror=implicit-function-declaration]
drivers/mfd/syscon.c:125:17: warning: assignment makes pointer from integer without a cast [enabled by default]
cc1: some warnings being treated as errors
>>>

The datastructures are guarded with CONFIG_REGMAP in linux/regmap.h
Selecting REGMAP solves the compilation error.

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
---
I'm not sure whether this is the right way to fix, or this is already fixed.
Please keep me in Cc while replying. I'm not subscribed to the list.

 drivers/mfd/Kconfig |   1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index acab3ef..641d191 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1029,6 +1029,7 @@ config MFD_STA2X11
 config MFD_SYSCON
 	bool "System Controller Register R/W Based on Regmap"
 	depends on OF
+	select REGMAP
 	select REGMAP_MMIO
 	help
 	  Select this option to enable accessing system control registers
--

             reply	other threads:[~2012-10-29 17:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 17:12 Vikram Narayanan [this message]
2012-10-30  5:27 ` [PATCH] mfd/syscon: Fix compilation issue when built for imx Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=508EB901.1050303@gmail.com \
    --to=vikram186@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).