Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1605107imm; Fri, 7 Sep 2018 03:12:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdagH5K47UmujqVpovwQ9xIF5eNRITPdJ3CeeJcjmQNEJlW4+zqICJzjKMSkofpoRWjJNkEa X-Received: by 2002:a63:4044:: with SMTP id n65-v6mr7182533pga.90.1536315121963; Fri, 07 Sep 2018 03:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536315121; cv=none; d=google.com; s=arc-20160816; b=tLi+fzVaqLb48yZRRWM8s1WmKm/0NWieEfIKpYFAekFMa/w2POIn6/FI/UWu+L/ydM jPf7Wy60XqUw88dIvxFH3CoG7N2R9mv+2iFhSV6KUR8tP7jtXskYVlcGjM2B+o1fd/86 TlApfI+MRJ6EP4o2qWA5RcoDrYWddctyIX+hHFyFXZqeu7bWXCxiM4dWXS6QH+p2V8Zy /HReBlJ5Q2rFHZph6hSTWP8/HJnj1hsgbEikyWnCy+dL1L1wGF8E/8u9y7zcY9rrSihg IsrXgkIrvPNczagWolu1Xlo+gWjSucm/vZdhizPz6NTDraTMwFBt+P3uvAPO2RTtQgGR idVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=enYwgS0Z/OX0ykxo6KT1YIz+qVBOPAuLng+TvhpgC2Q=; b=sMTnrUSKCuYSQiuIE8BxroRea8JbDF6vzoVFikNeeskocUPlJfMhX+8TuBS1ILI4+x 998vwkOL67Gd72GYR5WqYlzsGzQjtZX4+o2LX9AGAoag0VNVYxxJquQkB6SIDm3bMHwS pIofjyx9U1nShrQBpSAos/kOuEwILT9qFo67/HsdcKpJUCgXGUv2uqBWzEAlZt7Eru9K KZruowmmRaMJYY5FKRn+V+BEJzP37+w/raq71pwY5paBmti1mWsY+lIUcOVbNgZ61uJd SUrL+9EbHuzpQ+ljzX/m4+E4xI2o/7qTOd3i+puFGBB1HPswUw/EsemJ8VhxLSZQ3nF/ xRUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=EWZcTVhM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8-v6si8304375pfg.115.2018.09.07.03.11.46; Fri, 07 Sep 2018 03:12:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=EWZcTVhM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728578AbeIGOto (ORCPT + 99 others); Fri, 7 Sep 2018 10:49:44 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:37215 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728452AbeIGOsk (ORCPT ); Fri, 7 Sep 2018 10:48:40 -0400 Received: by mail-wm0-f65.google.com with SMTP id n11-v6so14024282wmc.2 for ; Fri, 07 Sep 2018 03:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=enYwgS0Z/OX0ykxo6KT1YIz+qVBOPAuLng+TvhpgC2Q=; b=EWZcTVhMhsDVDaTyLtMOAhQI2Mel8wWobR2y7nQ1kVN7wRHx4cAlWPLu80Yy532IG5 Xp7pS3EH1WyMLwF0QDCy6h5dnfvaOmJ07pQy0yPBJqAvo8062+sLO2/mDOjMzmrgSxtF +p+3Xuvjq7ynmtNzy1RTf/IlQWvP7aiTXTR5VUp5oUCdPTDidjOE75dtLYBGuDmwRDRo VZzVfyzzWFfSFCwwI2KaW6t9WE6LgOb8LoZI3KzMUjqc3PgYTtmrWazIZDjmCO0elnow CnBM66A5OckVul4MCg1f8rbapv5hlMFQB5/q7/Ku6C/aAFkPx7LuBYuqLpfjE7y2jCPg Pggg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=enYwgS0Z/OX0ykxo6KT1YIz+qVBOPAuLng+TvhpgC2Q=; b=ieeY3UvyyycfxahNToNwUHXUox8W9wqsty/S5V5Xw0NaOzT6OWHheRMSUrKbkpzl7L LUEDSpqB+sVQqNNX01WVJ3gtK+/Oh1uymrfgz+FqPF/uPzQljXPFNEOzanBfK3yZg91d OON0Mb+k+lhNJ/x8Yipo9k0IMUxCgfGIJULbmfBHJ54w76+rNfGn0lRQh9+707isLxfS 65DnckrM0uU8BmYfMwyfgpgvaLaPZ/JK2Mi1ORiOayghMpzETyMS7fsh2FfuPwEDU7jF xWECJ+CUjDEnb3o2RTBhsdB9KSYqua/x/0vKXk+jOPuRg5vSDT0KM4S5zdarfzlYOKvl T0MA== X-Gm-Message-State: APzg51Bq+scJxztkng1SUDpfjEel/QxFXDjrpsiha+wtsYTvAB4AsodU 6ZhrHr0OXCsGY8hhsNWLeAZ9JA== X-Received: by 2002:a1c:780c:: with SMTP id t12-v6mr4639093wmc.133.1536314906317; Fri, 07 Sep 2018 03:08:26 -0700 (PDT) Received: from brgl-bgdev.baylibre.local (AStLambert-681-1-83-232.w90-86.abo.wanadoo.fr. [90.86.25.232]) by smtp.gmail.com with ESMTPSA id 72-v6sm6631619wrb.48.2018.09.07.03.08.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 03:08:25 -0700 (PDT) From: Bartosz Golaszewski To: Srinivas Kandagatla , "David S . Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Andrew Morton , Arnd Bergmann , Jonathan Corbet , Sekhar Nori , Kevin Hilman , David Lechner , Boris Brezillon , Andrew Lunn , Alban Bedel , Maxime Ripard , Chen-Yu Tsai Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH v2 06/16] nvmem: mxs-ocotp: use devm_nvmem_register() Date: Fri, 7 Sep 2018 12:07:40 +0200 Message-Id: <20180907100750.14564-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180907100750.14564-1-brgl@bgdev.pl> References: <20180907100750.14564-1-brgl@bgdev.pl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski Use the resource managed variant of nvmem_register(); Signed-off-by: Bartosz Golaszewski --- drivers/nvmem/mxs-ocotp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvmem/mxs-ocotp.c b/drivers/nvmem/mxs-ocotp.c index 7018e2ef5714..53122f59c4b2 100644 --- a/drivers/nvmem/mxs-ocotp.c +++ b/drivers/nvmem/mxs-ocotp.c @@ -177,7 +177,7 @@ static int mxs_ocotp_probe(struct platform_device *pdev) ocotp_config.size = data->size; ocotp_config.priv = otp; ocotp_config.dev = dev; - otp->nvmem = nvmem_register(&ocotp_config); + otp->nvmem = devm_nvmem_register(dev, &ocotp_config); if (IS_ERR(otp->nvmem)) { ret = PTR_ERR(otp->nvmem); goto err_clk; @@ -199,7 +199,7 @@ static int mxs_ocotp_remove(struct platform_device *pdev) clk_unprepare(otp->clk); - return nvmem_unregister(otp->nvmem); + return 0; } static struct platform_driver mxs_ocotp_driver = { -- 2.18.0