Re: [PATCH v2 08/23] gpio: sysfs: use gpio_device_find() to iterate over existing devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 05, 2024 at 10:34:03AM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> 
> With the list of GPIO devices now protected with SRCU we can use
> gpio_device_find() to traverse it from sysfs.

...

> +static int gpiofind_sysfs_register(struct gpio_chip *gc, void *data)
> +{
> +	struct gpio_device *gdev = gc->gpiodev;
> +	int ret;
> +
> +	if (gdev->mockdev)
> +		return 0;
> +
> +	ret = gpiochip_sysfs_register(gdev);
> +	if (ret)
> +		chip_err(gc, "failed to register the sysfs entry: %d\n", ret);

> +	return 0;

???

> +}

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux