/** * xgpio_remove - Remove method for the GPIO device. * @pdev: pointer to the platform device * * This function remove gpiochips and frees all the allocated resources. * * Return: 0 always */ static int xgpio_remove(struct platform_device *pdev) { struct xgpio_instance *chip = platform_get_drvdata(pdev); of_mm_gpiochip_remove(&chip->mmchip); return 0; }
static int mpc8xxx_remove(struct platform_device *pdev) { struct mpc8xxx_gpio_chip *mpc8xxx_gc = platform_get_drvdata(pdev); if (mpc8xxx_gc->irq) { irq_set_handler_data(mpc8xxx_gc->irqn, NULL); irq_set_chained_handler(mpc8xxx_gc->irqn, NULL); irq_domain_remove(mpc8xxx_gc->irq); } of_mm_gpiochip_remove(&mpc8xxx_gc->mm_gc); return 0; }