}
local_irq_disable();
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
- generic_handle_irq_desc(irq, desc);
-#else
generic_handle_irq_desc(desc);
-#endif
local_irq_enable();
return 0;
gpio = &ggc->chip;
gpio->label = "greybus_gpio";
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
gpio->parent = &gbphy_dev->dev;
-#else
- gpio->dev = &gbphy_dev->dev;
-#endif
gpio->owner = THIS_MODULE;
gpio->request = gb_gpio_request;
gbphy_runtime_get_noresume(gbphy_dev);
gb_connection_disable_rx(connection);
- gb_gpiochip_remove(&ggc->chip);
+ gpiochip_remove(&ggc->chip);
gb_gpio_irqchip_remove(ggc);
gb_connection_disable(connection);
gb_connection_destroy(connection);
#define CORE_OWNS_PSY_STRUCT
#endif
-/*
- * The GPIO api sucks rocks in places, like removal, so work around their
- * explicit requirements of catching the return value for kernels older than
- * 3.17, which they explicitly changed in the 3.17 kernel. Consistency is
- * overrated.
- */
-#include <linux/gpio.h>
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
-static inline void gb_gpiochip_remove(struct gpio_chip *chip)
-{
- gpiochip_remove(chip);
-}
-#else
-static inline void gb_gpiochip_remove(struct gpio_chip *chip)
-{
- int ret;
-
- ret = gpiochip_remove(chip);
-}
-#endif
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
#define MMC_HS400_SUPPORTED
#define MMC_DDR52_DEFINED