Skip to content
Commit 1f5eb8b1 authored by Kent Gibson's avatar Kent Gibson Committed by Bartosz Golaszewski
Browse files

gpiolib: fix sysfs when cdev is not selected

In gpiochip_setup_dev() the call to gpiolib_cdev_register() indirectly
calls device_add().  This is still required for the sysfs even when
CONFIG_GPIO_CDEV is not selected in the build.

Replace the stubbed functions in gpiolib-cdev.h with macros in gpiolib.c
that perform the required device_add() and device_del() when
CONFIG_GPIO_CDEV is not selected.

Fixes: d143493c

 (gpiolib: make cdev a build option)
Reported-by: default avatarNicolas Schichan <nschichan@freebox.fr>
Signed-off-by: default avatarKent Gibson <warthog618@gmail.com>
Tested-by: default avatarNicolas Schichan <nschichan@freebox.fr>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent 560b6ac3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment