Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1820658imm; Fri, 7 Sep 2018 06:43:28 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY2A7D4IwwEJkDG5W9F8f5Wz9AIbb1w6IlbazpdqAmFDI/ioxFeHdJtbspmEvj1iseKmKn1 X-Received: by 2002:a17:902:9a06:: with SMTP id v6-v6mr8053286plp.316.1536327808626; Fri, 07 Sep 2018 06:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536327808; cv=none; d=google.com; s=arc-20160816; b=FJFrHy7r2sjfEsLje897RT5Co4BbxLD8SoFrDHvyofrC925fOkXtvz1edQG842/mAJ XhxDnd80SVVYEcu4ga9PuRd/T9PGFw/Xh7kQ2P/pYQmqP2g7bJYTgQ2CA3LqCE8RF26K Fg4yK9aMYyutWEVMhjVDx0Jg//zgH/UIET9lwEu/XMmqPmyhWcsQBfltZRAxuV/3bQfQ BUocwh61jrZlkARDb21HWboaVS6cagxJ92fcOccJSXf3OcmaNGw6M2qwEX68yQ+Iqps5 8/N/eZtD7wCQLTg25KPRUusRHhK2X3GKxoCJXo0sb2e3ATzAQAZwQXhGYMI8lDJUs10e broA== 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=1PFkzde7HIbembuPSuldz/+wF0MJkUfGiNxQy31YmBk=; b=i9b1cjC23KeBu9s32vNjhsvBdO6ssMaLGrt+BDMN7HbmXWhVeCIori58Tn+Y5u60F0 1rgrBHIWlhjQZg1hKYluDzM8gQDUsp+Srf/WSetpvsBK2BazZ4r70Odon8k8Fw/ag3jC JAbB9hUfY4QNcJP0lnk9tDE8VySUnvaPCvUalA5Qbl8YC20O2mrufuWyQ+1X6b4BrfCf XGzeD1Vv++LSXkusngKQeO4+i5nxZExKDiKxhupBbv41TCamwnUbacDGUYh3z8LbKZx1 IwL4nln3cMb9iY5wRnzaLvfnIGkeQs+kgexYQV6B50tS6qaSUJ3is8NiC5s5ZUtoqt4x HhUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=pStjsn6k; 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 i12-v6si9025960pfj.190.2018.09.07.06.43.12; Fri, 07 Sep 2018 06:43:28 -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=pStjsn6k; 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 S1728481AbeIGOsi (ORCPT + 99 others); Fri, 7 Sep 2018 10:48:38 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:32802 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728452AbeIGOsh (ORCPT ); Fri, 7 Sep 2018 10:48:37 -0400 Received: by mail-wr1-f67.google.com with SMTP id v90-v6so14422252wrc.0 for ; Fri, 07 Sep 2018 03:08:24 -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=1PFkzde7HIbembuPSuldz/+wF0MJkUfGiNxQy31YmBk=; b=pStjsn6kmYK+/TObJHiv70QDQbm1gSNXEr7yllZ1+4tL4q7jO8zy8f8+x41lSJnsZL dtePAJtd1L1Um5CXMGKhQ7qt/ATjQPr+KHSz7dsoMo7cs89bklGfi7lrBi3uNTLlmQRk WukSi6u2bqvZMhSy3t+MQ/sO8rgjZJIHjBKEvFuJn+KeI6k8B8GfKb9DKy0CtYujFju6 ifbuZEgUyGjLC7TSAiKI/JMGEekuPzMJLM+TQgBQqbZvOWJkDwybZNsKQ3pQI+xEO3bI Q9IyCgpLblryTuygIqlgJJVeVv3LfVlAjxp3nMY34BFXefS5ijfafeuf0M6INj9D1Pte MzkQ== 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=1PFkzde7HIbembuPSuldz/+wF0MJkUfGiNxQy31YmBk=; b=g9OQ/mYVx8O7jcEyV81wvv1LXIAdOlc7xOE3PZ656MWMfsaXdE1kNYJ77rTWdhQQzU 1/Hx6DfURS6uqPQg9dNyEthsVV2qthQ0Cb2x2KajwjsbggxngmmCX6VsZC61a9nOjTQc O2Ii5AlG8rI2Qr7T8AX89dhCmvht+WNt20Lb42WqqApA3+25WCsJEuXTYuVFD13U9rS1 Ov37GHxofvXlEJhzajgeRoVZdDPFBZOBaEjGgdlEGvGmXvFqajnbWgXX+yb5jSTMwgOB g7L8gFTgDlGukYDn21lUjqjOox/4KwII70B+VvKNexaS/Q/2hz7/r9s7pOt/pzX16EKp qUtQ== X-Gm-Message-State: APzg51B45SG6D32OzNaETTglnz8K9U4LsxywowdaPghWDxmP94RFMiv5 /eptUJ7Lh5jv6rSHaL+A4gEmoQ== X-Received: by 2002:adf:aa9c:: with SMTP id h28-v6mr5700208wrc.149.1536314903810; Fri, 07 Sep 2018 03:08:23 -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.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 03:08:23 -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 04/16] nvmem: lpc18xx_eeprom: use devm_nvmem_register() Date: Fri, 7 Sep 2018 12:07:38 +0200 Message-Id: <20180907100750.14564-5-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 managed version of nvmem_register(). Signed-off-by: Bartosz Golaszewski --- drivers/nvmem/lpc18xx_eeprom.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/nvmem/lpc18xx_eeprom.c b/drivers/nvmem/lpc18xx_eeprom.c index a9534a6e8636..b42dbaddb419 100644 --- a/drivers/nvmem/lpc18xx_eeprom.c +++ b/drivers/nvmem/lpc18xx_eeprom.c @@ -236,7 +236,7 @@ static int lpc18xx_eeprom_probe(struct platform_device *pdev) lpc18xx_nvmem_config.dev = dev; lpc18xx_nvmem_config.priv = eeprom; - eeprom->nvmem = nvmem_register(&lpc18xx_nvmem_config); + eeprom->nvmem = devm_nvmem_register(dev, &lpc18xx_nvmem_config); if (IS_ERR(eeprom->nvmem)) { ret = PTR_ERR(eeprom->nvmem); goto err_clk; @@ -257,10 +257,6 @@ static int lpc18xx_eeprom_remove(struct platform_device *pdev) struct lpc18xx_eeprom_dev *eeprom = platform_get_drvdata(pdev); int ret; - ret = nvmem_unregister(eeprom->nvmem); - if (ret < 0) - return ret; - clk_disable_unprepare(eeprom->clk); return 0; -- 2.18.0