From patchwork Fri Aug 4 02:22:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 109361 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp1567027qge; Thu, 3 Aug 2017 19:23:16 -0700 (PDT) X-Received: by 10.84.225.6 with SMTP id t6mr894061plj.231.1501813396500; Thu, 03 Aug 2017 19:23:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501813396; cv=none; d=google.com; s=arc-20160816; b=VFUL4GsywsYX3PZhaAgVoY0ecGQXeQJXMig0EooklrILzMdBnU9qYLQQxXC81GIwJ8 K9wA8VNtQH7P8guoHEjRvpANsXsKSNtgatkER9n/ZgwlKqa/qGrhzg/MY/dE8ZoxnIDs d4BA2Dnq/I3GkfQL5kbgZAVoyResR67zeHP08CibVe2VE3r/jTYsBrY1eQg74wbJVg+P OZdGLktHYhrX+dYj3Q92TEGIFdrvND/Xa0CCu36ZCRwJAaEZA2rK6f7PCyzk2aksSJPP O5h2BdQQ6SQOnrWJG10SBByT6m+trBMnhE7EBbu9Q2GY4FRtcNhvX72WphsJdKWDVjVT fBIw== 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=qDFHZigLRMNMLp+st6zIrE9xU1M6TCC/yRT2uoHQMxk=; b=zJTwDRyALml3Tss7Nx+LdPEGCT4nWMitvS3gbOe3hqMIs0FNMdBRcYV5KCGl+oS6uB iTU72CuGs4jC+lB/VbXNelVfYYDxA6tZuYIzECwBonaWErw2Bk7sifz2GeWfwWW9BdqY vjQ10JwcXdsqDiPrHRGoe1h2hz+a5XzWFWvE8G9fsYQjwMFxMUGk3GkvW73crsp5bgfm ouCktZ/whHUsOVTKsu7EpyoQgs+mM3h/GnIexYZyeoPnflyRFuXHXXaDGl9BBUM8whVW b92r+t6x7+6FaTsh/66Q97QEvQDGq+jPIm01cs88hl7T5MIVbh+gLPltrW+OTXDgjlAX R1KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=1jzDYfVt; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 l24si265870pgu.76.2017.08.03.19.23.16; Thu, 03 Aug 2017 19:23:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=1jzDYfVt; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbdHDCXP (ORCPT + 4 others); Thu, 3 Aug 2017 22:23:15 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:40713 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751231AbdHDCXO (ORCPT ); Thu, 3 Aug 2017 22:23:14 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id v742MY3b003102; Fri, 4 Aug 2017 11:22:34 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com v742MY3b003102 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1501813354; bh=xTsGA9sV2H+Gf/45XMK7Qxqvgx4OtJwTVn/EySnwxQA=; h=From:To:Cc:Subject:Date:From; b=1jzDYfVtoD8+dyfr1R3W3+SAiWfsZqQGfhbs+5vR9eew080nxkR/p5rHWlyn2PW8h 98LYB1oOjRxup/+6VBHsOjgnTiy5sHV1Kn+3lFaSFbERFn+TcYk7X9qgCoYK544AxX EF+m8NP3aekglEe/7Cn0qUIjR9G6FRBFA/+0oTu7odA1M3fNfgterZtmqp4Ew+SLdg VyETgk+2c/TT2MLAVO2p4Y5cmEIKEm4e5A3L8ewvF0/0N1JSdqW93HtKV37eZdyA5T aLR8QMfcBW/XedCjj+IDgFu2ykeDm4x/NN2jW1VsI70lt93VKBkXNYOXQnhx08S/xP F8+f3/yUN3kgA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-gpio@vger.kernel.org Cc: Masahiro Yamada , Linus Walleij , linux-kernel@vger.kernel.org Subject: [PATCH] pinctrl: move const qualifier before struct Date: Fri, 4 Aug 2017 11:22:31 +0900 Message-Id: <1501813351-29541-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Update subsystem wide for consistency. Signed-off-by: Masahiro Yamada --- drivers/pinctrl/berlin/berlin.c | 4 ++-- drivers/pinctrl/core.c | 14 +++++++------- drivers/pinctrl/core.h | 6 +++--- drivers/pinctrl/pinconf.c | 12 ++++++------ drivers/pinctrl/pinconf.h | 24 ++++++++++++------------ drivers/pinctrl/pinmux.c | 14 +++++++------- drivers/pinctrl/pinmux.h | 29 ++++++++++++++--------------- include/linux/pinctrl/machine.h | 4 ++-- 8 files changed, 53 insertions(+), 54 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c index 8f0dc02f7624..cc3bd2efafe3 100644 --- a/drivers/pinctrl/berlin/berlin.c +++ b/drivers/pinctrl/berlin/berlin.c @@ -206,8 +206,8 @@ static int berlin_pinctrl_add_function(struct berlin_pinctrl *pctrl, static int berlin_pinctrl_build_state(struct platform_device *pdev) { struct berlin_pinctrl *pctrl = platform_get_drvdata(pdev); - struct berlin_desc_group const *desc_group; - struct berlin_desc_function const *desc_function; + const struct berlin_desc_group *desc_group; + const struct berlin_desc_function *desc_function; int i, max_functions = 0; pctrl->nfunctions = 0; diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index c5e2c5705058..89b9ca77daea 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -264,7 +264,7 @@ static int pinctrl_register_one_pin(struct pinctrl_dev *pctldev, } static int pinctrl_register_pins(struct pinctrl_dev *pctldev, - struct pinctrl_pin_desc const *pins, + const struct pinctrl_pin_desc *pins, unsigned num_descs) { unsigned i; @@ -907,7 +907,7 @@ static struct pinctrl_state *create_state(struct pinctrl *p, } static int add_setting(struct pinctrl *p, struct pinctrl_dev *pctldev, - struct pinctrl_map const *map) + const struct pinctrl_map *map) { struct pinctrl_state *state; struct pinctrl_setting *setting; @@ -995,7 +995,7 @@ static struct pinctrl *create_pinctrl(struct device *dev, const char *devname; struct pinctrl_maps *maps_node; int i; - struct pinctrl_map const *map; + const struct pinctrl_map *map; int ret; /* @@ -1321,7 +1321,7 @@ void devm_pinctrl_put(struct pinctrl *p) } EXPORT_SYMBOL_GPL(devm_pinctrl_put); -int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps, +int pinctrl_register_map(const struct pinctrl_map *maps, unsigned num_maps, bool dup) { int i, ret; @@ -1402,13 +1402,13 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps, * function will perform a shallow copy for the mapping entries. * @num_maps: the number of maps in the mapping table */ -int pinctrl_register_mappings(struct pinctrl_map const *maps, +int pinctrl_register_mappings(const struct pinctrl_map *maps, unsigned num_maps) { return pinctrl_register_map(maps, num_maps, true); } -void pinctrl_unregister_map(struct pinctrl_map const *map) +void pinctrl_unregister_map(const struct pinctrl_map *map) { struct pinctrl_maps *maps_node; @@ -1702,7 +1702,7 @@ static int pinctrl_maps_show(struct seq_file *s, void *what) { struct pinctrl_maps *maps_node; int i; - struct pinctrl_map const *map; + const struct pinctrl_map *map; seq_puts(s, "Pinctrl maps:\n"); diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index 1c35de59a658..7880c3adc450 100644 --- a/drivers/pinctrl/core.h +++ b/drivers/pinctrl/core.h @@ -179,7 +179,7 @@ struct pin_desc { */ struct pinctrl_maps { struct list_head node; - struct pinctrl_map const *maps; + const struct pinctrl_map *maps; unsigned num_maps; }; @@ -243,9 +243,9 @@ extern struct pinctrl_gpio_range * pinctrl_find_gpio_range_from_pin_nolock(struct pinctrl_dev *pctldev, unsigned int pin); -int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps, +int pinctrl_register_map(const struct pinctrl_map *maps, unsigned num_maps, bool dup); -void pinctrl_unregister_map(struct pinctrl_map const *map); +void pinctrl_unregister_map(const struct pinctrl_map *map); extern int pinctrl_force_sleep(struct pinctrl_dev *pctldev); extern int pinctrl_force_default(struct pinctrl_dev *pctldev); diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index 7fc417e4ae96..92f363793f35 100644 --- a/drivers/pinctrl/pinconf.c +++ b/drivers/pinctrl/pinconf.c @@ -37,7 +37,7 @@ int pinconf_check_ops(struct pinctrl_dev *pctldev) return 0; } -int pinconf_validate_map(struct pinctrl_map const *map, int i) +int pinconf_validate_map(const struct pinctrl_map *map, int i) { if (!map->data.configs.group_or_pin) { pr_err("failed to register map %s (%d): no group/pin given\n", @@ -106,7 +106,7 @@ int pin_config_group_get(const char *dev_name, const char *pin_group, return ret; } -int pinconf_map_to_setting(struct pinctrl_map const *map, +int pinconf_map_to_setting(const struct pinctrl_map *map, struct pinctrl_setting *setting) { struct pinctrl_dev *pctldev = setting->pctldev; @@ -143,11 +143,11 @@ int pinconf_map_to_setting(struct pinctrl_map const *map, return 0; } -void pinconf_free_setting(struct pinctrl_setting const *setting) +void pinconf_free_setting(const struct pinctrl_setting *setting) { } -int pinconf_apply_setting(struct pinctrl_setting const *setting) +int pinconf_apply_setting(const struct pinctrl_setting *setting) { struct pinctrl_dev *pctldev = setting->pctldev; const struct pinconf_ops *ops = pctldev->desc->confops; @@ -235,7 +235,7 @@ static void pinconf_show_config(struct seq_file *s, struct pinctrl_dev *pctldev, } } -void pinconf_show_map(struct seq_file *s, struct pinctrl_map const *map) +void pinconf_show_map(struct seq_file *s, const struct pinctrl_map *map) { struct pinctrl_dev *pctldev; @@ -259,7 +259,7 @@ void pinconf_show_map(struct seq_file *s, struct pinctrl_map const *map) } void pinconf_show_setting(struct seq_file *s, - struct pinctrl_setting const *setting) + const struct pinctrl_setting *setting) { struct pinctrl_dev *pctldev = setting->pctldev; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; diff --git a/drivers/pinctrl/pinconf.h b/drivers/pinctrl/pinconf.h index bf8aff9abf32..6c722505f893 100644 --- a/drivers/pinctrl/pinconf.h +++ b/drivers/pinctrl/pinconf.h @@ -14,11 +14,11 @@ #ifdef CONFIG_PINCONF int pinconf_check_ops(struct pinctrl_dev *pctldev); -int pinconf_validate_map(struct pinctrl_map const *map, int i); -int pinconf_map_to_setting(struct pinctrl_map const *map, +int pinconf_validate_map(const struct pinctrl_map *map, int i); +int pinconf_map_to_setting(const struct pinctrl_map *map, struct pinctrl_setting *setting); -void pinconf_free_setting(struct pinctrl_setting const *setting); -int pinconf_apply_setting(struct pinctrl_setting const *setting); +void pinconf_free_setting(const struct pinctrl_setting *setting); +int pinconf_apply_setting(const struct pinctrl_setting *setting); int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin, unsigned long *configs, size_t nconfigs); @@ -39,22 +39,22 @@ static inline int pinconf_check_ops(struct pinctrl_dev *pctldev) return 0; } -static inline int pinconf_validate_map(struct pinctrl_map const *map, int i) +static inline int pinconf_validate_map(const struct pinctrl_map *map, int i) { return 0; } -static inline int pinconf_map_to_setting(struct pinctrl_map const *map, +static inline int pinconf_map_to_setting(const struct pinctrl_map *map, struct pinctrl_setting *setting) { return 0; } -static inline void pinconf_free_setting(struct pinctrl_setting const *setting) +static inline void pinconf_free_setting(const struct pinctrl_setting *setting) { } -static inline int pinconf_apply_setting(struct pinctrl_setting const *setting) +static inline int pinconf_apply_setting(const struct pinctrl_setting *setting) { return 0; } @@ -69,21 +69,21 @@ static inline int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin, #if defined(CONFIG_PINCONF) && defined(CONFIG_DEBUG_FS) -void pinconf_show_map(struct seq_file *s, struct pinctrl_map const *map); +void pinconf_show_map(struct seq_file *s, const struct pinctrl_map *map); void pinconf_show_setting(struct seq_file *s, - struct pinctrl_setting const *setting); + const struct pinctrl_setting *setting); void pinconf_init_device_debugfs(struct dentry *devroot, struct pinctrl_dev *pctldev); #else static inline void pinconf_show_map(struct seq_file *s, - struct pinctrl_map const *map) + const struct pinctrl_map *map) { } static inline void pinconf_show_setting(struct seq_file *s, - struct pinctrl_setting const *setting) + const struct pinctrl_setting *setting) { } diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 16b3ae5e4f44..36d5da9dc587 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -61,7 +61,7 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev) return 0; } -int pinmux_validate_map(struct pinctrl_map const *map, int i) +int pinmux_validate_map(const struct pinctrl_map *map, int i) { if (!map->data.mux.function) { pr_err("failed to register map %s (%d): no function given\n", @@ -312,7 +312,7 @@ static int pinmux_func_name_to_selector(struct pinctrl_dev *pctldev, return -EINVAL; } -int pinmux_map_to_setting(struct pinctrl_map const *map, +int pinmux_map_to_setting(const struct pinctrl_map *map, struct pinctrl_setting *setting) { struct pinctrl_dev *pctldev = setting->pctldev; @@ -372,12 +372,12 @@ int pinmux_map_to_setting(struct pinctrl_map const *map, return 0; } -void pinmux_free_setting(struct pinctrl_setting const *setting) +void pinmux_free_setting(const struct pinctrl_setting *setting) { /* This function is currently unused */ } -int pinmux_enable_setting(struct pinctrl_setting const *setting) +int pinmux_enable_setting(const struct pinctrl_setting *setting) { struct pinctrl_dev *pctldev = setting->pctldev; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; @@ -458,7 +458,7 @@ int pinmux_enable_setting(struct pinctrl_setting const *setting) return ret; } -void pinmux_disable_setting(struct pinctrl_setting const *setting) +void pinmux_disable_setting(const struct pinctrl_setting *setting) { struct pinctrl_dev *pctldev = setting->pctldev; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; @@ -627,7 +627,7 @@ static int pinmux_pins_show(struct seq_file *s, void *what) return 0; } -void pinmux_show_map(struct seq_file *s, struct pinctrl_map const *map) +void pinmux_show_map(struct seq_file *s, const struct pinctrl_map *map) { seq_printf(s, "group %s\nfunction %s\n", map->data.mux.group ? map->data.mux.group : "(default)", @@ -635,7 +635,7 @@ void pinmux_show_map(struct seq_file *s, struct pinctrl_map const *map) } void pinmux_show_setting(struct seq_file *s, - struct pinctrl_setting const *setting) + const struct pinctrl_setting *setting) { struct pinctrl_dev *pctldev = setting->pctldev; const struct pinmux_ops *pmxops = pctldev->desc->pmxops; diff --git a/drivers/pinctrl/pinmux.h b/drivers/pinctrl/pinmux.h index 248d8ea30e26..a331fcdbedd9 100644 --- a/drivers/pinctrl/pinmux.h +++ b/drivers/pinctrl/pinmux.h @@ -14,7 +14,7 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev); -int pinmux_validate_map(struct pinctrl_map const *map, int i); +int pinmux_validate_map(const struct pinctrl_map *map, int i); int pinmux_request_gpio(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range, @@ -25,11 +25,11 @@ int pinmux_gpio_direction(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range, unsigned pin, bool input); -int pinmux_map_to_setting(struct pinctrl_map const *map, +int pinmux_map_to_setting(const struct pinctrl_map *map, struct pinctrl_setting *setting); -void pinmux_free_setting(struct pinctrl_setting const *setting); -int pinmux_enable_setting(struct pinctrl_setting const *setting); -void pinmux_disable_setting(struct pinctrl_setting const *setting); +void pinmux_free_setting(const struct pinctrl_setting *setting); +int pinmux_enable_setting(const struct pinctrl_setting *setting); +void pinmux_disable_setting(const struct pinctrl_setting *setting); #else @@ -38,7 +38,7 @@ static inline int pinmux_check_ops(struct pinctrl_dev *pctldev) return 0; } -static inline int pinmux_validate_map(struct pinctrl_map const *map, int i) +static inline int pinmux_validate_map(const struct pinctrl_map *map, int i) { return 0; } @@ -63,23 +63,22 @@ static inline int pinmux_gpio_direction(struct pinctrl_dev *pctldev, return 0; } -static inline int pinmux_map_to_setting(struct pinctrl_map const *map, +static inline int pinmux_map_to_setting(const struct pinctrl_map *map, struct pinctrl_setting *setting) { return 0; } -static inline void pinmux_free_setting(struct pinctrl_setting const *setting) +static inline void pinmux_free_setting(const struct pinctrl_setting *setting) { } -static inline int pinmux_enable_setting(struct pinctrl_setting const *setting) +static inline int pinmux_enable_setting(const struct pinctrl_setting *setting) { return 0; } -static inline void pinmux_disable_setting( - struct pinctrl_setting const *setting) +static inline void pinmux_disable_setting(const struct pinctrl_setting *setting) { } @@ -87,21 +86,21 @@ static inline void pinmux_disable_setting( #if defined(CONFIG_PINMUX) && defined(CONFIG_DEBUG_FS) -void pinmux_show_map(struct seq_file *s, struct pinctrl_map const *map); +void pinmux_show_map(struct seq_file *s, const struct pinctrl_map *map); void pinmux_show_setting(struct seq_file *s, - struct pinctrl_setting const *setting); + const struct pinctrl_setting *setting); void pinmux_init_device_debugfs(struct dentry *devroot, struct pinctrl_dev *pctldev); #else static inline void pinmux_show_map(struct seq_file *s, - struct pinctrl_map const *map) + const struct pinctrl_map *map) { } static inline void pinmux_show_setting(struct seq_file *s, - struct pinctrl_setting const *setting) + const struct pinctrl_setting *setting) { } diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h index e5b1716f98cc..7fa5d87190c2 100644 --- a/include/linux/pinctrl/machine.h +++ b/include/linux/pinctrl/machine.h @@ -152,12 +152,12 @@ struct pinctrl_map { #ifdef CONFIG_PINCTRL -extern int pinctrl_register_mappings(struct pinctrl_map const *map, +extern int pinctrl_register_mappings(const struct pinctrl_map *map, unsigned num_maps); extern void pinctrl_provide_dummies(void); #else -static inline int pinctrl_register_mappings(struct pinctrl_map const *map, +static inline int pinctrl_register_mappings(const struct pinctrl_map *map, unsigned num_maps) { return 0;