core: relax gpiod_chip_open() for symbolic links
User may ask device helper tool, for example, udev, to create a specific
symbolic link to a device node. GPIO chip character device node is not
exceptional. However, libgpiod in the commit
d9b1c1f14c6b
("core: harden gpiod_chip_open()") went way too far in the hardening device
node check.
Relax that hardening for symbolic link to fix the regression.
Reproducer:
% gpioinfo /dev/gpiochip5
gpiochip5 - 16 lines:
line 0: "MUX33_DIR" "uart1-rx-oe" output active-high [used]
...
% ln -sf /dev/gpiochip5 /dev/MyGPIO_5
% gpioinfo /dev/MyGPIO_5
gpioinfo: looking up chip /dev/MyGPIO_5: Inappropriate ioctl for device
Link: https://stackoverflow.com/questions/60057494/gpio-issue-with-sym-link
Fixes: d9b1c1f14c6b ("core: harden gpiod_chip_open()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>