Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3606428imm; Wed, 5 Sep 2018 03:01:40 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb+65TQ1tkBUTbE9pjqj2zykU5ISPmRls2YgEytNNNKJMv8w4RezPvUm+Ct70yIGDr1cjvO X-Received: by 2002:a63:f966:: with SMTP id q38-v6mr34802227pgk.213.1536141700648; Wed, 05 Sep 2018 03:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536141700; cv=none; d=google.com; s=arc-20160816; b=qa+aacRV66UZcUoxAq75PjVlDRN7Pd9klPhgHBabb1RNOGEGrFAJHbWKR6Do0AwYkR WPYgfRSnN3RgN9FMe0m3LqEV7ESADmvZ/lwTQHwHK4leBoG9JSl9XD42Ccyde2susCeJ EbZNDkX5XvY7YZFN32Sy41PB1RlU3IXNwbuEUm5pOxL/ouLdOrA63ftEr62rI+c03dH4 oB7osfKhREcot+fpcbFokox8ZBgwWg8M4obuyDdw+L9EYhp/sI6EfU8uNpa+yUggAZwy SGPv1Yf/amyMqFjolV3VnW1itZ0VEtjiYno6BuKsXvwVZxzfBa2/No8XTA8Tb1RO8ohL Z2sw== 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=uNS8gEN9mxZApbKgIB8cQUjQjzc6untEoq/GXNg+T/zIMGZeiJsnIBXft6A+AZ+gpE qI1TA0nMq4ff2E90N4Rgvy90SMs5eW3UG3HNMAYvATA6RH1hGg+emU2sofOUrTIAc90Y Gn/jZXsEpx487SBYuUwocb6LC8J6ojyDOirDprccEdt02ulHGAad6fFX2jp7XBxfXUhs TODMOom5DjhldLl4KrxtytUz/vrUOzzfJrvkYJpnYn1+gfIvgx8LO/MFwLYhl/n98uL8 74wsSW+q5AxcBS/UEKI+/fJQcehOxNpU7p2DM2UAOWqDeyiAdgeWVK/XMDK/Za3hSEIG jR2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=uH2+9M1v; 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 e18-v6si1529926pgi.133.2018.09.05.03.01.25; Wed, 05 Sep 2018 03:01:40 -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=uH2+9M1v; 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 S1728313AbeIEO1j (ORCPT + 99 others); Wed, 5 Sep 2018 10:27:39 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35864 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728290AbeIEO1i (ORCPT ); Wed, 5 Sep 2018 10:27:38 -0400 Received: by mail-wm0-f67.google.com with SMTP id j192-v6so7098256wmj.1 for ; Wed, 05 Sep 2018 02:58:09 -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=uH2+9M1vAtnwku1Qa7KM2VgdAGrG0XLyYybPUYTA4fKQnCzh8i4nEBS3myuoDA12pY lTCDRzkJIJvR0J9tNluzzXpp6xZtYIDeO+U1j8lacab7QYrOpiJrbvFRP7gVZf0eUOQs v9nxKCAel0Nfn3nWryYtHcAICshAw0QLosvjAFMfdqKGaXdQS3SomqRoAR9ncyRkq/4I kRjfapP/qsKxvX9izTIgyzQxZMZjTDdykvnLDW6wwTwBM/ZhM3tq41sUQYNRFgVUG7ID oGUKD+WEl7ilca410ajmA78D+FkDQQOHmGtBsrC3iWoRqMaKK7sxE7FVWFPDG11nWFIu YWGw== 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=JPdAeGsOJRhsVDIxJpDe/B3cDRsXjkfphHorX08vfa/qQdxsI5GU9b3YbuaNWxKg11 XV2o775e3ZLWTJXGfYJwNcxb0x0JI7HKDBKm6zEc+4hO19nQsDe0A7AQOtBHvlQszGXE aPAl7Nd7N1ElQG1jqWthtwn/+4JMWfFcOc9WWu0EhgN6qQCGowTpwpx5nCp6QO0AiNGU T5q1OLXqRD/greBV6Pu0yY0tAaL6Gl4cKikk3clh08kBbSvkcD9X39f2+OLCh5+zSGGB Uw4l9pjQguVtu1dbNNQZ228cxFWefKrTzDRIf7xAl7XjxWcFgrkBJYidlJWVzlNSkNlh yQ2Q== X-Gm-Message-State: APzg51AiAAE2n9tcPlFMlPaEWqGe2fbloJH2yPvrgLOGrdS/ySz74EMs xMDU2fCNCZac3wb7XaQg99sxig== X-Received: by 2002:a1c:5e08:: with SMTP id s8-v6mr4925548wmb.88.1536141489278; Wed, 05 Sep 2018 02:58:09 -0700 (PDT) Received: from brgl-bgdev.baylibre.local (AStLambert-681-1-33-235.w90-86.abo.wanadoo.fr. [90.86.152.235]) by smtp.gmail.com with ESMTPSA id l12-v6sm2127815wrv.29.2018.09.05.02.58.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 02:58:08 -0700 (PDT) From: Bartosz Golaszewski To: Srinivas Kandagatla , Joachim Eastwood , "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 Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH 04/13] nvmem: lpc18xx_eeprom: use devm_nvmem_register() Date: Wed, 5 Sep 2018 11:57:29 +0200 Message-Id: <20180905095738.26406-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180905095738.26406-1-brgl@bgdev.pl> References: <20180905095738.26406-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