Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753387AbbHUI1M (ORCPT ); Fri, 21 Aug 2015 04:27:12 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:35476 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751518AbbHUI1H (ORCPT ); Fri, 21 Aug 2015 04:27:07 -0400 From: Markus Pargmann To: Mark Brown Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, Irina Tirdea , Markus Pargmann Subject: [PATCH v3 4/4] regmap: No multi_write support if bus->write does not exist Date: Fri, 21 Aug 2015 10:26:43 +0200 Message-Id: <1440145603-9612-5-git-send-email-mpa@pengutronix.de> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1440145603-9612-1-git-send-email-mpa@pengutronix.de> References: <1440145603-9612-1-git-send-email-mpa@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: mpa@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: 1220 Lines: 32 There is no multi_write support available if we cannot use raw_write. This is the case if bus->write is not implemented. This patch adds a condition that we need bus and bus->write so that can_multi_write is true. Signed-off-by: Markus Pargmann --- drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 75080774bf46..47fe0dfbbc46 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -575,7 +575,7 @@ struct regmap *regmap_init(struct device *dev, map->reg_stride = 1; map->use_single_read = config->use_single_rw || !bus || !bus->read; map->use_single_write = config->use_single_rw || !bus || !bus->write; - map->can_multi_write = config->can_multi_write; + map->can_multi_write = config->can_multi_write && bus && bus->write; map->dev = dev; map->bus = bus; map->bus_context = bus_context; -- 2.4.6 -- 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/