Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752843AbaBKRN3 (ORCPT ); Tue, 11 Feb 2014 12:13:29 -0500 Received: from fw-tnat.austin.arm.com ([217.140.110.23]:25528 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752202AbaBKRKw (ORCPT ); Tue, 11 Feb 2014 12:10:52 -0500 From: Pawel Moll To: arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Pawel Moll , Samuel Ortiz , Lee Jones Subject: [PATCH 07/12] mfd: syscon: Consider platform data a regmap config name Date: Tue, 11 Feb 2014 17:10:31 +0000 Message-Id: <1392138636-29240-8-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392138636-29240-1-git-send-email-pawel.moll@arm.com> References: <1392138636-29240-1-git-send-email-pawel.moll@arm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the device platform data as a regmap config name. This is particularly useful in the regmap debugfs when there is more than one syscon device registered, to distinguish the register blocks. Cc: Samuel Ortiz Cc: Lee Jones Signed-off-by: Pawel Moll --- Alternatively I could define a syscon platform data structure, something like this: struct syscon_platform_data { const char *label; }; drivers/mfd/syscon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c index 71841f9..ea1770b 100644 --- a/drivers/mfd/syscon.c +++ b/drivers/mfd/syscon.c @@ -143,6 +143,7 @@ static int syscon_probe(struct platform_device *pdev) return -ENOMEM; syscon_regmap_config.max_register = res->end - res->start - 3; + syscon_regmap_config.name = dev_get_platdata(&pdev->dev); syscon->regmap = devm_regmap_init_mmio(dev, base, &syscon_regmap_config); if (IS_ERR(syscon->regmap)) { -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/