From patchwork Sat Oct 28 16:50:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 117397 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp764273qgn; Sat, 28 Oct 2017 09:51:07 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TniflHxpRZRv1F6r1PzCW0fpNgdqJ6kPTCh/oe24TmJx6rIsqvToBq8iALog9wQBBR6OBM X-Received: by 10.99.185.79 with SMTP id v15mr3416792pgo.258.1509209467476; Sat, 28 Oct 2017 09:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509209467; cv=none; d=google.com; s=arc-20160816; b=om7J3OvHbXn1blrouj+vnRs2f5L/nK/BdryQcYhUNT4oJENq2QOkolfwEVEBJCUe0U fyLnFyukSf3NNAKU+TS5yojG12stx0zHyGo3eIyYK97mUOtFdlr2tMzHH/2VJKhYQ4dO /bFTKh8Xh5LFgrUyV2EA+WjA7RPEzZMc5KZcPIZlO1Ox76KznXQW9Z/f3Vyb+pwD9cNQ GJk4Fykkw92lM/ehvbGnkkgZPZ6tB4Yldn80yl0FdaA8db8y+Izq147lwUH7hYPd0d4I Rf83OL7N/Oi9KB5/HMvTfBwinUmZqouKIQRs7irGlHxAZ6267CRX6Ygi+pWmEx9TtBTl V6DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=zSKh6a8wvHiBzKy5yWjhISc1km1w6wTPMo1nqtlWsp8=; b=om0X9WJmbSHe0H6S8A7c/CEol35+f81tSoIz4SbxoXlYxtYjD0hdLI0ck1VUDOgrN3 snHRsFNjSIilNy93MEbnEk+eV8jg+/hWnRu7ERCF/JOPdlMhyYArET12I2y0gWf6QukW 9JVDSfrdrdw6wGYLmsq133j6+Ai8wkHUMze7dNsJn6PnQKLRD2o2RJswVDWUESDHWzZV kdzxi+J1Sznc46RtdcbsTkoVNYGOA4BFpnn73H12CMKWbpydv01zhzCvLTGMhUYgNNKb 3jmyF1j5DU+9yhxy4v4jzLQiCu/FJ5bVj4nsIenhVesT+4rH8eWIOrEP0FqyyaKX90IG eenA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=v97+PGNu; 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 204si1410018pgc.742.2017.10.28.09.51.07; Sat, 28 Oct 2017 09:51:07 -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=@nifty.com header.s=dec2015msa header.b=v97+PGNu; 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 S1751566AbdJ1QvE (ORCPT + 27 others); Sat, 28 Oct 2017 12:51:04 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:39213 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbdJ1QvB (ORCPT ); Sat, 28 Oct 2017 12:51:01 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-12.nifty.com with ESMTP id v9SGoDXF021928; Sun, 29 Oct 2017 01:50:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com v9SGoDXF021928 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1509209414; bh=zSKh6a8wvHiBzKy5yWjhISc1km1w6wTPMo1nqtlWsp8=; h=From:To:Cc:Subject:Date:From; b=v97+PGNudS+o/cs5H+Dg5aMgIbUBGI4Nx7miT+TXKp47CStgEDft5aXYXV8b0wnEy R/exmldbtQes4ZMw4RmM1wQT76ZxYjggEJs029XNWRmMNOfIKU2sJ+l9GHV+L6MaPQ hr2GY3t8LFMh8ye5j9HbUoY//g2V5Xe8IK012mJtAVlUc0R93WotG1s78l4M3AXMrz A+gtzt231V/3Lpbl0djIhbj2UaOCZpwWABtcwnvXym+k8eb5gvZMV4NcLF2aFNaoI3 hKCE52Vrt+ZNpdE33pNaHMO9siifLIATqhAuPyEMKE6Mt3kxL9cai3Huoh9QdAC34w A7DsLqx58HZnQ== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: Philipp Zabel Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 1/4] reset: make device_reset_optional() really optional Date: Sun, 29 Oct 2017 01:50:06 +0900 Message-Id: <1509209409-2698-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit bb475230b8e5 ("reset: make optional functions really optional") converted *_get_optional* functions, but device_reset_optional() was left behind. Convert it in the same way. Signed-off-by: Masahiro Yamada --- drivers/reset/core.c | 9 +++++---- include/linux/reset.h | 28 +++++++++++++--------------- 2 files changed, 18 insertions(+), 19 deletions(-) -- 2.7.4 diff --git a/drivers/reset/core.c b/drivers/reset/core.c index 1d21c6f..da4292e 100644 --- a/drivers/reset/core.c +++ b/drivers/reset/core.c @@ -566,17 +566,18 @@ EXPORT_SYMBOL_GPL(__devm_reset_control_get); * device_reset - find reset controller associated with the device * and perform reset * @dev: device to be reset by the controller + * @optional: whether it is optional to reset the device * - * Convenience wrapper for reset_control_get() and reset_control_reset(). + * Convenience wrapper for __reset_control_get() and reset_control_reset(). * This is useful for the common case of devices with single, dedicated reset * lines. */ -int device_reset(struct device *dev) +int __device_reset(struct device *dev, bool optional) { struct reset_control *rstc; int ret; - rstc = reset_control_get(dev, NULL); + rstc = __reset_control_get(dev, NULL, 0, 0, optional); if (IS_ERR(rstc)) return PTR_ERR(rstc); @@ -586,7 +587,7 @@ int device_reset(struct device *dev) return ret; } -EXPORT_SYMBOL_GPL(device_reset); +EXPORT_SYMBOL_GPL(__device_reset); /** * APIs to manage an array of reset controls. diff --git a/include/linux/reset.h b/include/linux/reset.h index 56463f3..c2fe7b6 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -19,22 +19,16 @@ struct reset_control *__reset_control_get(struct device *dev, const char *id, int index, bool shared, bool optional); void reset_control_put(struct reset_control *rstc); +int __device_reset(struct device *dev, bool optional); struct reset_control *__devm_reset_control_get(struct device *dev, const char *id, int index, bool shared, bool optional); -int __must_check device_reset(struct device *dev); - struct reset_control *devm_reset_control_array_get(struct device *dev, bool shared, bool optional); struct reset_control *of_reset_control_array_get(struct device_node *np, bool shared, bool optional); -static inline int device_reset_optional(struct device *dev) -{ - return device_reset(dev); -} - #else static inline int reset_control_reset(struct reset_control *rstc) @@ -61,15 +55,9 @@ static inline void reset_control_put(struct reset_control *rstc) { } -static inline int __must_check device_reset(struct device *dev) +static inline int __device_reset(struct device *dev, bool optional) { - WARN_ON(1); - return -ENOTSUPP; -} - -static inline int device_reset_optional(struct device *dev) -{ - return -ENOTSUPP; + return optional ? 0 : -ENOTSUPP; } static inline struct reset_control *__of_reset_control_get( @@ -108,6 +96,16 @@ of_reset_control_array_get(struct device_node *np, bool shared, bool optional) #endif /* CONFIG_RESET_CONTROLLER */ +static inline int __must_check device_reset(struct device *dev) +{ + return __device_reset(dev, false); +} + +static inline int device_reset_optional(struct device *dev) +{ + return __device_reset(dev, true); +} + /** * reset_control_get_exclusive - Lookup and obtain an exclusive reference * to a reset controller. From patchwork Sat Oct 28 16:50:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 117396 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp764239qgn; Sat, 28 Oct 2017 09:51:04 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Qlm/ZEFLTeRUbm9Lrlmksdw8Nd0+uWuiLiBZyLzmuvaAbFsS0XlLs2cSPQAlFaPnLzC55t X-Received: by 10.101.75.201 with SMTP id p9mr3397304pgr.324.1509209464623; Sat, 28 Oct 2017 09:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509209464; cv=none; d=google.com; s=arc-20160816; b=olSraPdhVMtF0Z9XDxPEsPv5+khsKM1F5bZ6Lp/OSljgt7Ee4QIDkJ+1QA0B37ynxQ MRPr1+58AV1XKjjhN7djJNV1jNWMrkgZj/Hs0fvIAjlAIJxMnNQv1fmVGaekrhkpk+84 e95pz9ReNzwehQ/C4guGTm7kcwyUb5l2oVNUExrgAgNC4tsjabfBQOldU/5tcZoiS0hE nCW27Y5qgdCyLejeRQDLu09hfYlU8LO7Nfz/bfWOU2CS8X/HQSIrTSX3wMwm82wgPMPG Yt+IhGK0/zzxeDj+62LPGNDRhNchOuWksZnLbmmNkF4YmxrMMI46YKhktpHKS8y8FGBu aLCA== 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:dkim-filter :arc-authentication-results; bh=v5LJIRf+RZ9DaApNZ9lIY1o3ErLTG/XDXoa0/WaIMvU=; b=ML9R5zG3LYudhkl4C9Co1EbbSt5FAQyjJ9pdwQFj4dhaQl/poCWuAQQ4eR0mv9cIRa If4zT6otwyPul6ykk2UQZlTwFiOht9/tAic3ZjsHqXa9E7SC6h7z5BaMyPYZo3l19JqY oPsyn/HBZEStrBxNTs1AobR6K51GEpDrtbncHK3weYQ7mXQxd8PFCR5ImD3YWhWqyjXB 4yq8CAh66z1/1qqKDzssXyLBb9rv9goBw8JDrRFpLfmV7A9Ovw7QL0G8DoQXGF84XCze cew5J3KKAz52qioGsWhiKZ1EVXFDMvPuXmCVVjIO2MWmxfPHn0a7PtrPKRlcAHz8+T/Z +H8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=kUjO1wGI; 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 204si1410018pgc.742.2017.10.28.09.51.04; Sat, 28 Oct 2017 09:51:04 -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=@nifty.com header.s=dec2015msa header.b=kUjO1wGI; 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 S1751483AbdJ1QvC (ORCPT + 27 others); Sat, 28 Oct 2017 12:51:02 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:39210 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751422AbdJ1QvB (ORCPT ); Sat, 28 Oct 2017 12:51:01 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-12.nifty.com with ESMTP id v9SGoDXG021928; Sun, 29 Oct 2017 01:50:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com v9SGoDXG021928 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1509209414; bh=v5LJIRf+RZ9DaApNZ9lIY1o3ErLTG/XDXoa0/WaIMvU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kUjO1wGIHRl1oGK1t8GlWVFqZbRrBIOnEWcNlfHmU3FfRrzgPGNJKub6bQIKRkh5o KG2gSlGz8wW7kJ9PWku5HUczeuN6kKSXt8wQ/03diB+vG83f9crqQXfQymM5XpO1e0 H8q3F8svurY/4RAovurmP/5SKn/TLyL5PS4sbSzkYM+PefV2Gh4Sgd08oEz5ZwH7RV BqKbv9SQuFW8ezJ992ZYzm9FSfPvzN63bcZ1r5vD2eJot7O9x/InIo6RsXaAKHi3MA /uH1rGvlPxKnmoNt9YEsFObuqe07UkuTQ79NGcUNnjZovvaJiUV4ubhE2lc9wK6rYV fl7vlxrYitoGw== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: Philipp Zabel Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] reset: remove remaining WARN_ON() in Date: Sun, 29 Oct 2017 01:50:07 +0900 Message-Id: <1509209409-2698-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509209409-2698-1-git-send-email-yamada.masahiro@socionext.com> References: <1509209409-2698-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit bb475230b8e5 ("reset: make optional functions really optional") gave a new meaning to _get_optional variants. The differentiation by WARN_ON() is not needed any more. We already have inconsistency about this; (devm_)reset_control_get_exclusive() has WARN_ON() check, but of_reset_control_get_exclusive() does not. Signed-off-by: Masahiro Yamada --- include/linux/reset.h | 6 ------ 1 file changed, 6 deletions(-) -- 2.7.4 diff --git a/include/linux/reset.h b/include/linux/reset.h index c2fe7b6..9329664 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -124,9 +124,6 @@ static inline int device_reset_optional(struct device *dev) static inline struct reset_control * __must_check reset_control_get_exclusive(struct device *dev, const char *id) { -#ifndef CONFIG_RESET_CONTROLLER - WARN_ON(1); -#endif return __reset_control_get(dev, id, 0, false, false); } @@ -272,9 +269,6 @@ static inline struct reset_control * __must_check devm_reset_control_get_exclusive(struct device *dev, const char *id) { -#ifndef CONFIG_RESET_CONTROLLER - WARN_ON(1); -#endif return __devm_reset_control_get(dev, id, 0, false, false); } From patchwork Sat Oct 28 16:50:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 117398 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp764287qgn; Sat, 28 Oct 2017 09:51:08 -0700 (PDT) X-Google-Smtp-Source: ABhQp+T83i43PK/6uK8tbBktT8xeFD2fYR5vdiHCNc6vLkcRsfBgylMZnHA4VvXar6k7ddsSe4x9 X-Received: by 10.99.36.133 with SMTP id k127mr3282691pgk.171.1509209468572; Sat, 28 Oct 2017 09:51:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509209468; cv=none; d=google.com; s=arc-20160816; b=uQcMS1yg69wobs4//dPVpYtxYaaKgiYeJOpK7ZEcCor0LCqgU2cdEX8zeijT9YDCus SF+EESW6zIMm/Q5OhNNnuZS2fcq2pfiY6p8aL0aQzZFJQ58pf138IJRaE91u/q/WTwUl 3JA1QLdHuukCNVta04XPIYMHWXkLWnHm8M0elIcrZEw0IYB5sdlYt5K8E98+GQ2CnJ2n WW+XtGTh98oTKhxMUH0m+AdXq6M6ZGOaQEl8HFMmu6BBAcWnMFWhkGFhgYVLvsa+ZnP3 j85NGooasd0JQ9t6s+FrLQPttzju8GDd0iz27Tgbt50eyFP3j9sRyFW97Zuzl5/Vb57A Yx1A== 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:dkim-filter :arc-authentication-results; bh=72hhaWn8dnD9LpewZLFdm68boE5AoJQN+NGO9dxxAJ0=; b=DxvYyICOnKntq1QjyCiOYAvjfzvwnGAYHM3Y5v/E/r12YDZvg5ceb7YcnkZ30vsIEo T0sE0EF3BwAAf/0pNo2nj1+1pTKd6NYXnpWHdGag0Gp4QB119BRplcwX1NGiC5INlf7q brAKBgtXFNYvb5G1x2fedg+dRin4PitIz9miQ2mAA7mm2vwNVoaXHGybUBTS7Dw0lHtB pGoQJGVi9cqF2zTsVyoV1JFl+SQzXGbLiDUFkC2nwO6ZwyDm/xaY4wzhRTfloJxMRdxJ UYYdprDr2ZyS1w5UQ+QelNxiKPMxDm7wc7043KFLqEO4NWabIJztOFk9KvGsfrh5HnZg LnAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=THZTsXPg; 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 204si1410018pgc.742.2017.10.28.09.51.07; Sat, 28 Oct 2017 09:51:08 -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=@nifty.com header.s=dec2015msa header.b=THZTsXPg; 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 S1751610AbdJ1QvG (ORCPT + 27 others); Sat, 28 Oct 2017 12:51:06 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:39212 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751419AbdJ1QvB (ORCPT ); Sat, 28 Oct 2017 12:51:01 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-12.nifty.com with ESMTP id v9SGoDXH021928; Sun, 29 Oct 2017 01:50:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com v9SGoDXH021928 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1509209414; bh=72hhaWn8dnD9LpewZLFdm68boE5AoJQN+NGO9dxxAJ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=THZTsXPg/YS9ZMoL7sv52t+aRTLGOuN7ybL2eIM1pbNrYo633lAzUBy83S2FDbbno OpN2xdzOpjQ/cigGVR6I7hHDYWrcw5SKb8MvNN0XBoFrD0Vs+YFq4KVHbhTdTQ8HEa TGdYd7b/mrOeZkbF9mAdNCEHl+ui5ErMqnplQbaXNUH0CspFCg3gc+WOrgA+kgMOUs B1H4jN+erf/rcm8Hfk5CxSJnFwpYr4BGonvRQ++ZbRSJIdHHhgCsUHDaRaho1RqSYl wmDyz0bhLb7T7t7AyLvp61TQG5Adx5SWXywSZnqcd+iH8I7L574P5LTd53GTAhrRMz g/Ax4vxIy38mg== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: Philipp Zabel Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 3/4] reset: minimize the number of headers included from Date: Sun, 29 Oct 2017 01:50:08 +0900 Message-Id: <1509209409-2698-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509209409-2698-1-git-send-email-yamada.masahiro@socionext.com> References: <1509209409-2698-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 62e24c5775ec ("reset: add exported __reset_control_get, return NULL if optional") moved the dev->of_node reference to core.c, so does not need to know the members of struct device. Declaring device and device_node as structure is enough. is necessary for bool, true, and false. Signed-off-by: Masahiro Yamada --- include/linux/reset.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/include/linux/reset.h b/include/linux/reset.h index 9329664..53e5e78 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -1,8 +1,10 @@ #ifndef _LINUX_RESET_H_ #define _LINUX_RESET_H_ -#include +#include +struct device; +struct device_node; struct reset_control; #ifdef CONFIG_RESET_CONTROLLER From patchwork Sat Oct 28 16:50:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 117399 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp764644qgn; Sat, 28 Oct 2017 09:51:40 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RimzdvBf6wh8PPRg+t5rj7b7jqBX3jVr9q2KffYw1pF4nd1nBtbC7kD7HXiEGjs3hrjydl X-Received: by 10.99.121.201 with SMTP id u192mr3353886pgc.69.1509209500283; Sat, 28 Oct 2017 09:51:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509209500; cv=none; d=google.com; s=arc-20160816; b=LnB8be/GQYq4TU0BRNSbUSMjjM4RS35vIqsOT50Nx3kM05nteP+Tcf+KmuT5xXBW3J eS5Yq3JQ3XzsTnJKFmR9xbF0hKTw7kbt1m2oLhcUrKJm/GCkIxXjJNQDWNkSpBThjHJg gXJ/9W9Vf3giQBD6fHktn8lIpWX5SLQM9Sgt16hOny+xcrQCn/5+mRS0IitAsfvJzVKq VsAGNKmJUe5VHgQpC+YjXTFHnvoOhgiWpY3AqYe3TsGGjJrn1WJJHM/fKzCdxHRqU15V s4dNPGGuXDuySUCwQbX+AS8Winro6qRKVNR1I7BbL6rbjQ9mgD7HyTlUz+NqAiqp6A30 A+kg== 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:dkim-filter :arc-authentication-results; bh=LYt6RV0P9PRzN/KHZLbNwsb6P2lH3kUx/roloQew/44=; b=Fb4tMuq4YGbrhOdFVX4VvwYuTzQ6HGX09OZwrHrDYv2hQNYEcrAewt05HGKQq6dKui alISS2SJ1ixsHN5dLTZvdYrI2aZpRsuJvE0DC8+Ydc7xqNsrUqoBFem3fjPZfMsDBnud ofMqbaZKSgSf8Wjf/E4pTRed0R2ey3kHbb7DDfbE2pGxOy8EtS8Rdc0+fgbY6iDODlff svRgYRgHE4ecSqa503lSm9q+cNFQ1vwrK2HA6ofRP3Hkjel1GhPpkxXpAwG2KaLL/exi HVsiJeWeFr1KH4akNfLvaBR/sAItVRelqYbjjHdJjRM7H4CmL4k1bRGyDnRVAVueGeyn PUvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=TJlgiXOG; 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 w16si5939076plp.206.2017.10.28.09.51.39; Sat, 28 Oct 2017 09:51: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=@nifty.com header.s=dec2015msa header.b=TJlgiXOG; 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 S1751683AbdJ1Qvh (ORCPT + 27 others); Sat, 28 Oct 2017 12:51:37 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:39211 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751429AbdJ1QvB (ORCPT ); Sat, 28 Oct 2017 12:51:01 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-12.nifty.com with ESMTP id v9SGoDXI021928; Sun, 29 Oct 2017 01:50:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com v9SGoDXI021928 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1509209415; bh=LYt6RV0P9PRzN/KHZLbNwsb6P2lH3kUx/roloQew/44=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TJlgiXOG7AjGrjUbNE2eLZMrT5xYGOXcsAZufLQQbE0batU1mSI6I5GpKRatkENQk 75gHL49WiY5QOBHnFoovJZDrieYDAhlfJFNG9tdDvG7ZSHhI7hU+a+/elJJ2bsyKab k1Upa23MzE/sTRDn7ptAQEDMHweqILYWwDOOVNI05BGIy/BSFyZasRhqEye+BlvyvN QEdIHa+Lp7f5YkWOT/dBu/tJv7vpRhJPRV5RCzEauk/LIZg0ooR4Qw8/MJLbaKtkd2 KnSgB4rfcOxGssie2rfIX5N4QAYsGjWlphgtJpaFGI5v9e2ZBCmSMuXwPF3b/idyb2 gcdfWnBkd76fA== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: Philipp Zabel Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 4/4] reset: remove reset_control_get(_optional) Date: Sun, 29 Oct 2017 01:50:09 +0900 Message-Id: <1509209409-2698-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509209409-2698-1-git-send-email-yamada.masahiro@socionext.com> References: <1509209409-2698-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No more users of these two. Signed-off-by: Masahiro Yamada --- include/linux/reset.h | 12 ------------ 1 file changed, 12 deletions(-) -- 2.7.4 diff --git a/include/linux/reset.h b/include/linux/reset.h index 53e5e78..0aa3d0d 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -343,18 +343,6 @@ devm_reset_control_get_shared_by_index(struct device *dev, int index) * These inline function calls will be removed once all consumers * have been moved over to the new explicit API. */ -static inline struct reset_control *reset_control_get( - struct device *dev, const char *id) -{ - return reset_control_get_exclusive(dev, id); -} - -static inline struct reset_control *reset_control_get_optional( - struct device *dev, const char *id) -{ - return reset_control_get_optional_exclusive(dev, id); -} - static inline struct reset_control *of_reset_control_get( struct device_node *node, const char *id) {