Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2126794rwl; Thu, 13 Apr 2023 01:54:36 -0700 (PDT) X-Google-Smtp-Source: AKy350bURDYoMoW9kSdTpHnngg/n2DS/XXJJ0yX/v4y1TnHrb8mc/IbgJjSLSY6Ms65p1kf2s4Gf X-Received: by 2002:a17:902:eccf:b0:1a2:71c1:c30f with SMTP id a15-20020a170902eccf00b001a271c1c30fmr1759202plh.7.1681376076457; Thu, 13 Apr 2023 01:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681376076; cv=none; d=google.com; s=arc-20160816; b=s+NlcT3jEgYs7CNXuPotVOxht5GwHAPHPDnuMN4dTD7MVqow8i7UkZWwrcTePftCQk k6FWa9SPhp/hDrrTJJwfn26PJjU78mrqcQp4O29Wr+x5Abxa42gomHA7bNzZWvSWW143 de675HZY2etem2x38qB+P+F7JXEjcA8LDhuNPw1Xz3A9K9WtREK9ZRCUIFLc3y3zt2gu cHEvDc7xZm6BUtZIEIT7V/xOuHWuijhFaVTm4dDLXhJkberLGZ1tZZbEjw5PkU+OWWP0 706y3dJcb7Sd8lrWsTgTlfho49iGMThqHQEYuWI/z0sgy62uQkPm6hfkOyE6jHUiBO50 gwGQ== 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:dkim-signature; bh=ear+cnYjNr0Xxid0IYuEKGOWEhCYOcJOGEYisWpZTKo=; b=xP/JGch1dmGfIEgdOn+wSGAn7qb0qLxAdkftFyfTz58yU/iK9FJpMn6RzeqHqarlVG Jdmoj64v/dwBkgxtOWYw2A6cve84I6c6fjXgg/5nSE/YhemODbUA1twX4GADW57DV6VN cIdPsvQOx8So6/r5zf7CKzjBeULp5A5WXtKfGyyqsqibvwVPll2jMI6Cb5w8+qLuFE7Z QbG2ihHasOTCxL3LqlKoVqknsvLoCSI+2GiASJzbw6EHl4t+K5IUOhblqdeaPMUBw4fH 2ezCaI2072dxo25Fbxu0f4BASu2i1J4yiSaCx3CaEQGvFp72twnDhUZ33sQhZ8ai9Ny1 PwnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=C24EABfN; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=9NIL9C8K; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k20-20020a170902761400b0019cdd3e2aecsi1472399pll.312.2023.04.13.01.54.24; Thu, 13 Apr 2023 01:54:36 -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=@suse.de header.s=susede2_rsa header.b=C24EABfN; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=9NIL9C8K; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229906AbjDMIxh (ORCPT + 99 others); Thu, 13 Apr 2023 04:53:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbjDMIxT (ORCPT ); Thu, 13 Apr 2023 04:53:19 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38A90180 for ; Thu, 13 Apr 2023 01:53:06 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E520F218D6; Thu, 13 Apr 2023 08:53:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681375984; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ear+cnYjNr0Xxid0IYuEKGOWEhCYOcJOGEYisWpZTKo=; b=C24EABfNHbEBMqwr4/h+JHYgokjsw8ix4LML/cy29uP6URY6CKIXQsggFcmNAC9QsfJGpU X52ksK0IOlpxdAss2WvoLFj1A9ykM94mO0hTAN5knLcUGqJDQD02zRLBhN+4CNc6WFmi+M mRMzY4KOXbeddISQ/2wSbPa9PVCp/uo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681375984; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ear+cnYjNr0Xxid0IYuEKGOWEhCYOcJOGEYisWpZTKo=; b=9NIL9C8KqTMIlIlDJ8DPR26DM/xiQezNmGfZN0od/ZvM40T5Uwn+UBLnv7nBBPtJzRfRUA jWez3NnzQWfRmdBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D1664139D3; Thu, 13 Apr 2023 08:53:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id EH/jMvDCN2RyIAAAMHmgww (envelope-from ); Thu, 13 Apr 2023 08:53:04 +0000 From: "Ivan T. Ivanov" To: Srinivas Kandagatla Cc: Nicolas Saenz Julienne , Florian Fainelli , Stefan Wahren , Tim Gover , Phil Elwell , linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Ivan T . Ivanov" Subject: [PATCH v2 1/2] nvmem: rmem: Use NVMEM_DEVID_AUTO Date: Thu, 13 Apr 2023 11:52:05 +0300 Message-Id: <20230413085206.149730-2-iivanov@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230413085206.149730-1-iivanov@suse.de> References: <20230413085206.149730-1-iivanov@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 --- 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.35.3