Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1110891pxx; Tue, 27 Oct 2020 08:29:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8K/zONHtZFJYlqz7pJm9SHHj9+dMYqjcTdGQQO1+ebqrf2zvCgjiHU+vsV7lO0Kx6y9eT X-Received: by 2002:a05:6402:a45:: with SMTP id bt5mr2885035edb.101.1603812564384; Tue, 27 Oct 2020 08:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603812564; cv=none; d=google.com; s=arc-20160816; b=xR4GctdwpS/A7TbPVWEYAAxXQ8+mIXgOaS6Uw59U2OTMW/RuzA00ZuAtoM0qp7q+Ma ubOw9sb0NvIVX7iNUGXIvZtFoa2J5P4qA8LML4pgbskfSQnOcoAZq43nwnL4Z/GBYq1e pSI8ZNlVK0ChTDedFYFcGszoZOVkCV7n3J4QAUvVsZl+RG60K1qvc09ysvPTo7mEpB99 5MmcCywH/K8HdRpm1oRGQP4CgpWFrDgDULxTx764dySAj2ROMJTFPqnqEkLIX4MjVuz4 GeqTxFsg70g4H4NTwOMkz6GU3GVweAvhhV4vnlpLv5bJ0H4cwoUsu7hBP9cnmib0QdbF 3YBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YE+/Q1dRPI4E3OKvaNISjlEFqDkUuP3BLpGDjbIZl3g=; b=Kk0lQJhIGlksYzqf8GChJQD6otUKR6dO5u9Vuly2MuwicmX5rknFvlTNN3OFIxrpvD qJ5TGcshDmXn/gI9Oyfs+/s/9WBR43/de7DYB/NDfgJwKJRQ3yaPPGVwtfamhy0Mpp9I UHb4mE2U8ViM+bdLZSbvSESBZLKd8aiy9jkdc2OyfIR8A/eRttxdxypMlCxVeqn1Mjx2 ZD7qCtCBXY3nqWE0G/shn6OInM41o08Kb/OwF8BULYAOpcGWnXTSDxrxAkGowt0/ODI4 NphwvF6wt8gRkiYEwanlyJ4HaOofagQe7lqjxkeTR9askz9cFhEq/wn9r5zfhD2kcJKv WBgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Z0GcVmlZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si1008577eda.550.2020.10.27.08.29.02; Tue, 27 Oct 2020 08:29:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Z0GcVmlZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760655AbgJ0Ofl (ORCPT + 99 others); Tue, 27 Oct 2020 10:35:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:33656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760514AbgJ0Oey (ORCPT ); Tue, 27 Oct 2020 10:34:54 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6A78E207BB; Tue, 27 Oct 2020 14:34:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809293; bh=enMqkbae1KTz17rQu9s/f1cl7Fos+Ia1f95IRlRSZXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z0GcVmlZiquF+L0aIzqIDDKgupnikT3Rz64eH8qElGSAYOU1wjw/J6sfg+ioo1QdT t8sa3FsW+a06BmMrAXbQWkHTKI2PPt1PRDG6pkMDmNW7Sg3WFwm/k/Eee9n0buEoh8 3xZtL9rexN755nB61SgMrWzTu0BWCNUgzNYfvjIo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Preston , Andy Shevchenko , Linus Walleij , Sasha Levin Subject: [PATCH 5.4 143/408] pinctrl: mcp23s08: Fix mcp23x17_regmap initialiser Date: Tue, 27 Oct 2020 14:51:21 +0100 Message-Id: <20201027135501.734381624@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Preston [ Upstream commit b445f6237744df5e8d4f56f8733b2108c611220a ] The mcp23x17_regmap is initialised with structs named "mcp23x16". However, the mcp23s08 driver doesn't support the MCP23016 device yet, so this appears to be a typo. Fixes: 8f38910ba4f6 ("pinctrl: mcp23s08: switch to regmap caching") Signed-off-by: Thomas Preston Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200828213226.1734264-2-thomas.preston@codethink.co.uk Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/pinctrl-mcp23s08.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c index 3a235487e38d7..676ff9a4459e3 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08.c +++ b/drivers/pinctrl/pinctrl-mcp23s08.c @@ -122,7 +122,7 @@ static const struct regmap_config mcp23x08_regmap = { .max_register = MCP_OLAT, }; -static const struct reg_default mcp23x16_defaults[] = { +static const struct reg_default mcp23x17_defaults[] = { {.reg = MCP_IODIR << 1, .def = 0xffff}, {.reg = MCP_IPOL << 1, .def = 0x0000}, {.reg = MCP_GPINTEN << 1, .def = 0x0000}, @@ -133,23 +133,23 @@ static const struct reg_default mcp23x16_defaults[] = { {.reg = MCP_OLAT << 1, .def = 0x0000}, }; -static const struct regmap_range mcp23x16_volatile_range = { +static const struct regmap_range mcp23x17_volatile_range = { .range_min = MCP_INTF << 1, .range_max = MCP_GPIO << 1, }; -static const struct regmap_access_table mcp23x16_volatile_table = { - .yes_ranges = &mcp23x16_volatile_range, +static const struct regmap_access_table mcp23x17_volatile_table = { + .yes_ranges = &mcp23x17_volatile_range, .n_yes_ranges = 1, }; -static const struct regmap_range mcp23x16_precious_range = { +static const struct regmap_range mcp23x17_precious_range = { .range_min = MCP_GPIO << 1, .range_max = MCP_GPIO << 1, }; -static const struct regmap_access_table mcp23x16_precious_table = { - .yes_ranges = &mcp23x16_precious_range, +static const struct regmap_access_table mcp23x17_precious_table = { + .yes_ranges = &mcp23x17_precious_range, .n_yes_ranges = 1, }; @@ -159,10 +159,10 @@ static const struct regmap_config mcp23x17_regmap = { .reg_stride = 2, .max_register = MCP_OLAT << 1, - .volatile_table = &mcp23x16_volatile_table, - .precious_table = &mcp23x16_precious_table, - .reg_defaults = mcp23x16_defaults, - .num_reg_defaults = ARRAY_SIZE(mcp23x16_defaults), + .volatile_table = &mcp23x17_volatile_table, + .precious_table = &mcp23x17_precious_table, + .reg_defaults = mcp23x17_defaults, + .num_reg_defaults = ARRAY_SIZE(mcp23x17_defaults), .cache_type = REGCACHE_FLAT, .val_format_endian = REGMAP_ENDIAN_LITTLE, }; -- 2.25.1