Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp186624pxx; Wed, 28 Oct 2020 02:05:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxah2eKEfzx26Qm5iHeG7SJnRRxk3M4VStX8M8WBHeuFRHiWsKII5LYPWDxFH7lsZjqWIEk X-Received: by 2002:a50:be87:: with SMTP id b7mr6856683edk.185.1603875922725; Wed, 28 Oct 2020 02:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603875922; cv=none; d=google.com; s=arc-20160816; b=bFaTMIdjDqPRbYVeRk/pF8/SyOIRR3tfzknq0VLLCX6VNnzkICZrm0lFtXbusR0/HH YNyA/N1RQ6XupBGc8IjSI8tzjfkQ3hmXDjFEMzaLiQy8mk+CGTG3IMwH99eA5w2RdT45 EPyPRrdff71eqo+hnFppwyTDXZ8YNvWOlk+sU8VR6oQy+6C2rn+7BY4UiDXgLAYD8gPU S9k5aG5tOslKrNOivNU0pS8+z6RRsQoDIU3iNwndHRyo3xnAVEntswH+w5V0aIJj+fgd ECyMurqsUBgBrcXKc5SMTsSXHOBLWoKtnj21QVBZHT0Tln7jrWCnQk5NszknPqXODEgE DwWg== 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=VlvJWNeUpxZgRCXi1dkZs1QbW92PKf+yMj1Vp5uy1Fc=; b=WZ91cYvclFOVxxMv6HVnHhBYmpHeMSakEvgoY4/3v41E5JbkcJkhMJSAEZILD3y9FY 2DWj0sPDZjiudbXcNjYsV1asRXY6i1Hfyddouc4A7kaW4mTB5dxlS47iiLeKekL20JYq JTAR30DkWI1AXqOGq6OF4n8Oc4ifdbOlrN9oiSKNhsgYSdcGqQbDrHvEMJJjnyzITfMI rPV0uxMvxnwZVzaTibpS+NCcPp6tI2Vcs8WeBUPUIhIOiRFn8NFFe6iKGKewaqO2ypvu K0DwaaAvQPZpivLS2VMxIv6KeYsJPNZ/FK/xZaU8e7oVz/g1rEcetqUOu1brfPpLV8BD 5epw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Qhe4NuAT; 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 bs17si3022913ejb.543.2020.10.28.02.05.00; Wed, 28 Oct 2020 02:05:22 -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=Qhe4NuAT; 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 S1732760AbgJ0OPv (ORCPT + 99 others); Tue, 27 Oct 2020 10:15:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:59678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755981AbgJ0OKy (ORCPT ); Tue, 27 Oct 2020 10:10: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 59C4D2072D; Tue, 27 Oct 2020 14:10:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807854; bh=hhoxEyIEZZvefeQxJwP97kWrbU1FsUOEFaAp6bXSetI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qhe4NuAT/SftHdjiMkPWs7gvr7osKQ3pkIt1R4r76M+oq8es8Q/bnwI2Hfyg3XeqQ 14RE9EFi6SCCCUl3RAXv8QN1LePr5KwGk4HmGCt/q1z6zOrX9XjBip9v3578Qi7PHp jb+TGSCxkLi3YRuVsntGgk4AMXGl5x9VNYCRRd2U= 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 4.14 064/191] pinctrl: mcp23s08: Fix mcp23x17_regmap initialiser Date: Tue, 27 Oct 2020 14:48:39 +0100 Message-Id: <20201027134912.814390967@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@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 22558bf294246..12e7f7c54ffaa 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08.c +++ b/drivers/pinctrl/pinctrl-mcp23s08.c @@ -119,7 +119,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}, @@ -130,23 +130,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, }; @@ -156,10 +156,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