Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4475039rwd; Sun, 11 Jun 2023 08:13:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4s0+SM1q8Uyq2b5V0YtBWjFzgX8Ld5JO1D0GubArtI4NpIo8KfJehqKKNoqvCuUbe3+I+o X-Received: by 2002:a17:902:f804:b0:1b3:d27b:32b0 with SMTP id ix4-20020a170902f80400b001b3d27b32b0mr5441plb.7.1686496411780; Sun, 11 Jun 2023 08:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686496411; cv=none; d=google.com; s=arc-20160816; b=fH5hR5AksB86WykULt0JvmUsaKsubDY1s/j4DLyqZvBJ/SaC7WUrNLtLE15qfM6xFV BaASkZjQd5Gi/pa3tL8dbhWmvP5r9cdYnAJOBt5r9/3Fr4Ku8IA+TxZu/nkeEdIgHqPY Y81XBTBAva2ixXD/7YOs2mmPscHC3EVt0AF1OTxt66QAGxhM9QkebPH5obcvXezUcnFk mepGXlr86SYNcV1Yq12CZI9w4apCAix6DBWYteQQs3HtbycHvz20/MPv9XeUMoDlov3H +66OChajYUos1Q7LYWJYGdhV+hNSNMlRXaWASFqdMhqImWsa0yDqlu29rZ+voKv+AvUc jy4g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5re7Wx5T8B7oy9Wn1ES2X1LY+O2Vj3neWx0oIPUli+M=; b=Eu36flnocl2stAzIhT3RLEXGtNIxAfIopqT9wxxL9WK96mGl3H/uLL/o2FWQY2BYzG RfCggoJpIfYw69y9HXUlR2YfIBajY9hJxmFEm8l/SlxinbkW7Mlp7RFOo527CStGonek FQPk6Oi/J35CxU2MtZsVL4ENn4bbbCaF4yHeOba16gBzhFnSfecjjapJ8vyYm3e5MWIh h4ryAL/963M1U1/7wwAlelF2JZ2YM/GXfGIbx/3M3N479e6mu0K9herqo5KPv6++2DDP 0xd5SXqfnVdFVTUPvUM/J4atIdxYpFj0NBBIF75QDrpoxZXBrbBGSD1JJuLmk5ZmTuwF rIcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RIMOHUl6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020a170903230100b001ab23cb930bsi2408103plh.417.2023.06.11.08.13.19; Sun, 11 Jun 2023 08:13:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RIMOHUl6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233793AbjFKOEG (ORCPT + 99 others); Sun, 11 Jun 2023 10:04:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233664AbjFKODw (ORCPT ); Sun, 11 Jun 2023 10:03:52 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 265A2E7A for ; Sun, 11 Jun 2023 07:03:51 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3f6d3f83d0cso35574345e9.2 for ; Sun, 11 Jun 2023 07:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686492229; x=1689084229; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5re7Wx5T8B7oy9Wn1ES2X1LY+O2Vj3neWx0oIPUli+M=; b=RIMOHUl6E8QAr+gyQQBb4OHPFN0LzLK1TLumfo9ECzCeDu5+Yf2cigdpJz8jF8NouM cuqOEeRrl96c+OFiyah2dPuJdfXgM1q3H/zVpQLrI5TK5qTx68DP0MmBKd5mPGSgIL6f vAbuqpxH3i6LDGmBxdqcq0Yc4HQDjGhhfyv3RA2BGca020hUu4/I4jSOq07TzfJW7jzs K8gBQ+m0YQN93woM0TI0HsLGoocLo6a7PSfznTtyg0wxREsl/QwyTHO7Jx/K6Ru3m37d TobLwhB0Z3AxCamcH2abmYjTPvqWuf2R1DCxlpdLG3TMypAB/yjygwCLYj3mnWpaSMjM PchQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686492229; x=1689084229; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5re7Wx5T8B7oy9Wn1ES2X1LY+O2Vj3neWx0oIPUli+M=; b=jwEppP7+4/09RtpG/9yaVb6B6DXTmlUfkZDsGbTNnd8OCVSu4sjLXnQeC4ZwW/7v1T n2j0+Vgry1Ef0EJxOoRRrMu2pGJw5zhvukAsxFJd7bIjkPkLqw+3yaF1ki6N++QR2o9C pc0hYH3Ja1uxc40UtgRzBg8sUox6nCe8NRHXRh/P5IntYrZo6s0f+2iBeMGl2tjDRkUa mJfLmg55lKmTSDrzRpa6lC5kZnDbGYhn9KAu01j3cqEXY3MU33j/E6zs0zpB0nSUCF3H 0e17rgKe5J9qAdX67UW/u8YaLu4t86HF6eb950O9va6rX/9Sqt0ePi96IltSjfPA0emv 2txg== X-Gm-Message-State: AC+VfDyazy+zZgzeJc9c4Zz3jSsoGXDY3K7cBvX5WZy2n5Z/1JWVTdj0 IY6/smZFbwAZxxBmHLQJxk239w== X-Received: by 2002:a1c:7c08:0:b0:3f7:e80b:bfc with SMTP id x8-20020a1c7c08000000b003f7e80b0bfcmr6033002wmc.30.1686492229638; Sun, 11 Jun 2023 07:03:49 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id h17-20020a05600c28d100b003f080b2f9f4sm8567222wmd.27.2023.06.11.07.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jun 2023 07:03:48 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Phil Elwell , "Ivan T . Ivanov" , Stefan Wahren , Srinivas Kandagatla Subject: [PATCH 05/26] nvmem: rmem: Use NVMEM_DEVID_AUTO Date: Sun, 11 Jun 2023 15:03:09 +0100 Message-Id: <20230611140330.154222-6-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230611140330.154222-1-srinivas.kandagatla@linaro.org> References: <20230611140330.154222-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Phil Elwell It is reasonable to declare multiple nvmem blocks. Unless a unique 'id' is passed in for each block there may be name clashes. Avoid this by using the magic token NVMEM_DEVID_AUTO. Fixes: 5a3fa75a4d9cb ("nvmem: Add driver to expose reserved memory as nvmem") Signed-off-by: Phil Elwell Signed-off-by: Ivan T. Ivanov Reviewed-by: Stefan Wahren Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/rmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvmem/rmem.c b/drivers/nvmem/rmem.c index 80cb187f1481..752d0bf4445e 100644 --- a/drivers/nvmem/rmem.c +++ b/drivers/nvmem/rmem.c @@ -71,6 +71,7 @@ static int rmem_probe(struct platform_device *pdev) config.dev = dev; config.priv = priv; config.name = "rmem"; + config.id = NVMEM_DEVID_AUTO; config.size = mem->size; config.reg_read = rmem_read; -- 2.25.1