All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Hongzhan Chen <hongzhan.chen@intel.com>, xenomai@xenomai.org
Subject: Re: [PATCH 1/3] drivers/gpio: core: Move out of OF config conditional compilation
Date: Tue, 31 Aug 2021 15:05:51 +0200	[thread overview]
Message-ID: <69fa23f2-d9f4-dbca-0995-441b6bb10a5a@siemens.com> (raw)
In-Reply-To: <20210831050736.5371-2-hongzhan.chen@intel.com>

On 31.08.21 07:07, Hongzhan Chen via Xenomai wrote:
> Rename interface name because it is undependent of OF platform and
> non-OF platform would also call it to remove rtdm gpio chip device.
> 
> Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
> ---
>  include/cobalt/kernel/rtdm/gpio.h   | 5 ++---
>  kernel/drivers/gpio/gpio-bcm2835.c  | 2 +-
>  kernel/drivers/gpio/gpio-core.c     | 8 ++++----
>  kernel/drivers/gpio/gpio-mxc.c      | 2 +-
>  kernel/drivers/gpio/gpio-omap.c     | 2 +-
>  kernel/drivers/gpio/gpio-sun8i-h3.c | 2 +-
>  kernel/drivers/gpio/gpio-xilinx.c   | 2 +-
>  kernel/drivers/gpio/gpio-zynq7000.c | 2 +-
>  8 files changed, 12 insertions(+), 13 deletions(-)
> 
> diff --git a/include/cobalt/kernel/rtdm/gpio.h b/include/cobalt/kernel/rtdm/gpio.h
> index 72cc3a035..29f26d6c6 100644
> --- a/include/cobalt/kernel/rtdm/gpio.h
> +++ b/include/cobalt/kernel/rtdm/gpio.h
> @@ -70,9 +70,8 @@ int rtdm_gpiochip_scan_of(struct device_node *from,
>  int rtdm_gpiochip_scan_array_of(struct device_node *from,
>  				const char *compat[],
>  				int nentries, int type);
> -
> -void rtdm_gpiochip_remove_of(int type);
> -
>  #endif
>  
> +void rtdm_gpiochip_remove(int type);
> +
>  #endif /* !_COBALT_RTDM_GPIO_H */
> diff --git a/kernel/drivers/gpio/gpio-bcm2835.c b/kernel/drivers/gpio/gpio-bcm2835.c
> index f30d6b591..a0c17f875 100644
> --- a/kernel/drivers/gpio/gpio-bcm2835.c
> +++ b/kernel/drivers/gpio/gpio-bcm2835.c
> @@ -29,7 +29,7 @@ module_init(bcm2835_gpio_init);
>  
>  static void __exit bcm2835_gpio_exit(void)
>  {
> -	rtdm_gpiochip_remove_of(RTDM_SUBCLASS_BCM2835);
> +	rtdm_gpiochip_remove(RTDM_SUBCLASS_BCM2835);
>  }
>  module_exit(bcm2835_gpio_exit);
>  
> diff --git a/kernel/drivers/gpio/gpio-core.c b/kernel/drivers/gpio/gpio-core.c
> index 06a19b33a..ccda67bd1 100644
> --- a/kernel/drivers/gpio/gpio-core.c
> +++ b/kernel/drivers/gpio/gpio-core.c
> @@ -626,7 +626,9 @@ int rtdm_gpiochip_scan_array_of(struct device_node *from,
>  }
>  EXPORT_SYMBOL_GPL(rtdm_gpiochip_scan_array_of);
>  
> -void rtdm_gpiochip_remove_of(int type)
> +#endif /* CONFIG_OF */
> +
> +void rtdm_gpiochip_remove(int type)
>  {
>  	struct rtdm_gpio_chip *rgc, *n;
>  
> @@ -643,6 +645,4 @@ void rtdm_gpiochip_remove_of(int type)
>  
>  	mutex_unlock(&chip_lock);
>  }
> -EXPORT_SYMBOL_GPL(rtdm_gpiochip_remove_of);
> -
> -#endif /* CONFIG_OF */
> +EXPORT_SYMBOL_GPL(rtdm_gpiochip_remove);
> diff --git a/kernel/drivers/gpio/gpio-mxc.c b/kernel/drivers/gpio/gpio-mxc.c
> index 7b28111f6..99162e5f8 100644
> --- a/kernel/drivers/gpio/gpio-mxc.c
> +++ b/kernel/drivers/gpio/gpio-mxc.c
> @@ -35,7 +35,7 @@ module_init(mxc_gpio_init);
>  
>  static void __exit mxc_gpio_exit(void)
>  {
> -	rtdm_gpiochip_remove_of(RTDM_SUBCLASS_MXC);
> +	rtdm_gpiochip_remove(RTDM_SUBCLASS_MXC);
>  }
>  module_exit(mxc_gpio_exit);
>  
> diff --git a/kernel/drivers/gpio/gpio-omap.c b/kernel/drivers/gpio/gpio-omap.c
> index 5f10278f3..848d84694 100644
> --- a/kernel/drivers/gpio/gpio-omap.c
> +++ b/kernel/drivers/gpio/gpio-omap.c
> @@ -36,7 +36,7 @@ module_init(omap_gpio_init);
>  
>  static void __exit omap_gpio_exit(void)
>  {
> -	rtdm_gpiochip_remove_of(RTDM_SUBCLASS_OMAP);
> +	rtdm_gpiochip_remove(RTDM_SUBCLASS_OMAP);
>  }
>  module_exit(omap_gpio_exit);
>  
> diff --git a/kernel/drivers/gpio/gpio-sun8i-h3.c b/kernel/drivers/gpio/gpio-sun8i-h3.c
> index 94303dd00..0dcfe8c00 100644
> --- a/kernel/drivers/gpio/gpio-sun8i-h3.c
> +++ b/kernel/drivers/gpio/gpio-sun8i-h3.c
> @@ -36,7 +36,7 @@ module_init(h3_gpio_init);
>  
>  static void __exit h3_gpio_exit(void)
>  {
> -	rtdm_gpiochip_remove_of(RTDM_SUBCLASS_H3);
> +	rtdm_gpiochip_remove(RTDM_SUBCLASS_H3);
>  }
>  module_exit(h3_gpio_exit);
>  
> diff --git a/kernel/drivers/gpio/gpio-xilinx.c b/kernel/drivers/gpio/gpio-xilinx.c
> index e982f5fa4..05bf870df 100644
> --- a/kernel/drivers/gpio/gpio-xilinx.c
> +++ b/kernel/drivers/gpio/gpio-xilinx.c
> @@ -32,7 +32,7 @@ module_init(xilinx_gpio_init);
>  
>  static void __exit xilinx_gpio_exit(void)
>  {
> -	rtdm_gpiochip_remove_of(RTDM_SUBCLASS_XILINX);
> +	rtdm_gpiochip_remove(RTDM_SUBCLASS_XILINX);
>  }
>  module_exit(xilinx_gpio_exit);
>  
> diff --git a/kernel/drivers/gpio/gpio-zynq7000.c b/kernel/drivers/gpio/gpio-zynq7000.c
> index 070db3fe4..5a6f2b83d 100644
> --- a/kernel/drivers/gpio/gpio-zynq7000.c
> +++ b/kernel/drivers/gpio/gpio-zynq7000.c
> @@ -32,7 +32,7 @@ module_init(zynq7000_gpio_init);
>  
>  static void __exit zynq7000_gpio_exit(void)
>  {
> -	rtdm_gpiochip_remove_of(RTDM_SUBCLASS_ZYNQ7000);
> +	rtdm_gpiochip_remove(RTDM_SUBCLASS_ZYNQ7000);
>  }
>  module_exit(zynq7000_gpio_exit);
>  
> 

Oops, we already had a rtdm_gpiochip_remove. Renaming this one to
rtdm_gpiochip_remove_by_type".

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


  reply	other threads:[~2021-08-31 13:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31  5:07 [PATCH V2 0/3] add support for cherryview gpio controller driver Hongzhan Chen
2021-08-31  5:07 ` [PATCH 1/3] drivers/gpio: core: Move out of OF config conditional compilation Hongzhan Chen
2021-08-31 13:05   ` Jan Kiszka [this message]
2021-09-01  1:16     ` Chen, Hongzhan
2021-08-31  5:07 ` [PATCH 2/3] drivers/gpio: core: Introduce helper to find gpiochip Hongzhan Chen
2021-08-31  6:47   ` Jan Kiszka
2021-08-31  7:07     ` Chen, Hongzhan
2021-08-31  7:14       ` Jan Kiszka
2021-08-31  5:07 ` [PATCH 3/3] driver/gpio: Add Intel Cherryview pinctrl driver Hongzhan Chen
2021-08-31  6:51   ` Jan Kiszka
2021-08-31  7:15 ` [PATCH V2 0/3] add support for cherryview gpio controller driver Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2021-08-30  6:45 [PATCH " Hongzhan Chen
2021-08-30  6:45 ` [PATCH 1/3] drivers/gpio: core: move out of OF config conditional compilation Hongzhan Chen
2021-08-30  7:34   ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69fa23f2-d9f4-dbca-0995-441b6bb10a5a@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=hongzhan.chen@intel.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.