Commit fc4b4fcc authored by Hongzhan Chen's avatar Hongzhan Chen Committed by Jan Kiszka
Browse files

drivers/gpio: core: Move out of OF config conditional compilation



Rename interface name because it is independent of OF platform and
non-OF platform would also call it to remove rtdm gpio chip device.
Signed-off-by: default avatarHongzhan Chen <hongzhan.chen@intel.com>
[Jan: choose conflict-free rtdm_gpiochip_remove_by_type as name]
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 91dc10af
......@@ -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_by_type(int type);
#endif /* !_COBALT_RTDM_GPIO_H */
......@@ -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_by_type(RTDM_SUBCLASS_BCM2835);
}
module_exit(bcm2835_gpio_exit);
......
......@@ -629,7 +629,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_by_type(int type)
{
struct rtdm_gpio_chip *rgc, *n;
......@@ -646,6 +648,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_by_type);
......@@ -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_by_type(RTDM_SUBCLASS_MXC);
}
module_exit(mxc_gpio_exit);
......
......@@ -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_by_type(RTDM_SUBCLASS_OMAP);
}
module_exit(omap_gpio_exit);
......
......@@ -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_by_type(RTDM_SUBCLASS_H3);
}
module_exit(h3_gpio_exit);
......
......@@ -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_by_type(RTDM_SUBCLASS_XILINX);
}
module_exit(xilinx_gpio_exit);
......
......@@ -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_by_type(RTDM_SUBCLASS_ZYNQ7000);
}
module_exit(zynq7000_gpio_exit);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment