diff options
Diffstat (limited to 'drivers/gpio/gpiolib-devres.c')
| -rw-r--r-- | drivers/gpio/gpiolib-devres.c | 55 | 
1 files changed, 0 insertions, 55 deletions
diff --git a/drivers/gpio/gpiolib-devres.c b/drivers/gpio/gpiolib-devres.c index 16a696249229..fe9ce6b19f15 100644 --- a/drivers/gpio/gpiolib-devres.c +++ b/drivers/gpio/gpiolib-devres.c @@ -130,61 +130,6 @@ struct gpio_desc *__must_check devm_gpiod_get_index(struct device *dev,  EXPORT_SYMBOL_GPL(devm_gpiod_get_index);  /** - * devm_gpiod_get_from_of_node() - obtain a GPIO from an OF node - * @dev:	device for lifecycle management - * @node:	handle of the OF node - * @propname:	name of the DT property representing the GPIO - * @index:	index of the GPIO to obtain for the consumer - * @dflags:	GPIO initialization flags - * @label:	label to attach to the requested GPIO - * - * Returns: - * On successful request the GPIO pin is configured in accordance with - * provided @dflags. - * - * In case of error an ERR_PTR() is returned. - */ -struct gpio_desc *devm_gpiod_get_from_of_node(struct device *dev, -					      const struct device_node *node, -					      const char *propname, int index, -					      enum gpiod_flags dflags, -					      const char *label) -{ -	struct gpio_desc **dr; -	struct gpio_desc *desc; - -	desc = gpiod_get_from_of_node(node, propname, index, dflags, label); -	if (IS_ERR(desc)) -		return desc; - -	/* -	 * For non-exclusive GPIO descriptors, check if this descriptor is -	 * already under resource management by this device. -	 */ -	if (dflags & GPIOD_FLAGS_BIT_NONEXCLUSIVE) { -		struct devres *dres; - -		dres = devres_find(dev, devm_gpiod_release, -				   devm_gpiod_match, &desc); -		if (dres) -			return desc; -	} - -	dr = devres_alloc(devm_gpiod_release, sizeof(struct gpio_desc *), -			  GFP_KERNEL); -	if (!dr) { -		gpiod_put(desc); -		return ERR_PTR(-ENOMEM); -	} - -	*dr = desc; -	devres_add(dev, dr); - -	return desc; -} -EXPORT_SYMBOL_GPL(devm_gpiod_get_from_of_node); - -/**   * devm_fwnode_gpiod_get_index - get a GPIO descriptor from a given node   * @dev:	GPIO consumer   * @fwnode:	firmware node containing GPIO reference  |