Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp925716imd; Thu, 1 Nov 2018 07:41:42 -0700 (PDT) X-Google-Smtp-Source: AJdET5dW4FkrVboaXv3uyuLCJSbk0LjeGdBaIrwUH3CJujfoF/lhFWxqKjt3dFnT5zNpurjRHnHo X-Received: by 2002:a17:902:a984:: with SMTP id bh4-v6mr7940584plb.163.1541083301990; Thu, 01 Nov 2018 07:41:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541083301; cv=none; d=google.com; s=arc-20160816; b=YZdCsU/D3vfZFRgjtGYisDaRfFibRs+hfDNyZqvDNnsGg6sa8HZGYfYd866I5Hg1ny bdUzV2wiQjysFnGTeh5YOQkTaxBD3fEi1D4I5+SPrW5hWKNQT2HV9LVvx+mX5BSZyDfi DX54W4LZKYdf9QlX4ksTHFOJ0KDFmF23zJuuwJuwZSngI4l+abUO+OY3X8AWoRbDI/MH TzCxKBw9Hrb6MhCQR7Wfq6O3D83LoUhrLcyFEq5ABLGk5vpW4IInxGjgvHQ1Dyq8m4Ol I/2WwKkdVEDvFdm1wmIA7EUMAmMvW2euEqpm+kkV9n5poUqpATKk5F8zUzDiCAMrGQQm cAfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5CYC7TvGqETSeFhRceruurl+Tb4FvS5Rq+MfygM9JIE=; b=d7f5/Oz3PuOkbQn1vdjYQx2gKd6BkRY5SFpKILpcetHzoeral/TKLBKkV6EQYPzaio anAQo8T06Q/4IPrgfH60j2v5h56YKGyl4FGPMXCHjN6B9YnQxPwJz/9NhfqqxJG1PCFD p5DIvuTZ+DEg014bIfw+lZnUFIA6aDbXcNrOGoY5LDel5eScwPkaFZduR7mXlZplpH83 9notgSYwnzNu60uMcqzcIMDM1FZpO3H73oHnnfTEy5SH/U9ODCa79p/zUNVzhsYlUYzG a4ek65j0VL5Nfl7FE/Y0oqkYaCzy5uBaSd15Lfs948RZ17dxLvQ8NMOaGKzVpdNZrybl cnpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ldyq8k4U; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2-v6si2193167ply.118.2018.11.01.07.41.27; Thu, 01 Nov 2018 07:41:41 -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=@gmail.com header.s=20161025 header.b=ldyq8k4U; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728989AbeKAXoQ (ORCPT + 99 others); Thu, 1 Nov 2018 19:44:16 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:47013 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728680AbeKAXoO (ORCPT ); Thu, 1 Nov 2018 19:44:14 -0400 Received: by mail-lf1-f68.google.com with SMTP id o2-v6so14344078lfl.13; Thu, 01 Nov 2018 07:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5CYC7TvGqETSeFhRceruurl+Tb4FvS5Rq+MfygM9JIE=; b=ldyq8k4UGUALcCMImtgsxylY25oIybGcspBl7nRnW+x1BYyd+9KUuy9UrjRBRImv9l ch5ryhkP7ogRGHUXT6AeG9P3WIj9pms47fJJfyeLG01ExZvTP12arQpHSrgK1DZIErSX EEE9NobQBuSFuGXsMJtQHJ+FFMjMF5Zn/BAG89N3R+II6NCllF68oUOftI28C517plq5 iK59jDCHmWfOmso82BLDfbMciUJjiVpEmCzyYFzJmMonrXhNgZEGyrGbX7pPRWQ7AAMp kkuGyMTrq4CXir1I0IbDGFudO0btDQ1ZLYQ/A9jGYWjxeuQshWtpigY6n9ga5RzFJ9Wt d96A== 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:mime-version:content-transfer-encoding; bh=5CYC7TvGqETSeFhRceruurl+Tb4FvS5Rq+MfygM9JIE=; b=V0rQF4afjMVXysOhGp34fm6aN2fUZfXquAtxiYj4+FQU5+pTT32hdYOI1I0K4nG3Wt M2uX2YDmD+MS9AVzMKCggjNEPSWK92msjRIqZptSFXIp0hAbe+WsBcrPU6jtn3qZsWq5 GkovegoipOrR3wNGZdgC+7d+GLtCdrzd5kY4BRNbD43B5iJBCGt3cM1NNL7VadhKVZ9j NlekI08RxdtOR86AA3W44mx2WPpY4HlUpWSnFBgBhdnra9p/O6mpgMqivAfdhnLPhW8x Z7O3ThjW8KZ0Vpuh+OxZ4KxQYrLDdHCy0V2odwsdIMN34eYsE/ZkKDBb9TOHwTI8LAVq 49qg== X-Gm-Message-State: AGRZ1gIwy3jsf9dp5gkS3a61kONRj9jriElw/7FTOzw4CIFewMb81+mJ 5B/zJdOyxpDLqReMAgG2ZoCpOUc62ZE= X-Received: by 2002:a19:7111:: with SMTP id m17mr4506320lfc.64.1541083257059; Thu, 01 Nov 2018 07:40:57 -0700 (PDT) Received: from neopili.qtec.com (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by smtp.gmail.com with ESMTPSA id a9sm404870lfa.19.2018.11.01.07.40.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Nov 2018 07:40:54 -0700 (PDT) From: Ricardo Ribalda Delgado To: Stephen Boyd , Alan Tull , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH 5/5] clk: gpio: Use devm_of_clk_add_provider Date: Thu, 1 Nov 2018 15:40:44 +0100 Message-Id: <20181101144044.11495-6-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101144044.11495-1-ricardo.ribalda@gmail.com> References: <20181101144044.11495-1-ricardo.ribalda@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_clk_add_provider. It will take care of clk un-registering. Signed-off-by: Ricardo Ribalda Delgado --- drivers/clk/clk-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-gpio.c b/drivers/clk/clk-gpio.c index 40af4fbab4d2..6eedb4bd779c 100644 --- a/drivers/clk/clk-gpio.c +++ b/drivers/clk/clk-gpio.c @@ -252,7 +252,7 @@ static int gpio_clk_driver_probe(struct platform_device *pdev) if (IS_ERR(clk)) return PTR_ERR(clk); - return of_clk_add_provider(node, of_clk_src_simple_get, clk); + return devm_of_clk_add_provider(&pdev->dev, of_clk_src_simple_get, clk); } static const struct of_device_id gpio_clk_match_table[] = { -- 2.19.1