int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) { struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin); unsigned long flags; int offset, ret; if (!chip) return -EINVAL; offset = pin - chip->chip.base; local_irq_save(flags); ret = s3c_gpio_do_setpull(chip, offset, pull); local_irq_restore(flags); return ret; }
int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) { struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin); unsigned long flags; int offset, ret; if (!chip) return -EINVAL; offset = pin - chip->chip.base; s3c_gpio_lock(chip, flags); ret = s3c_gpio_do_setpull(chip, offset, pull); s3c_gpio_unlock(chip, flags); return ret; }