Bug 216678

Summary: iio: light: rpr0521: build error when IIO_TRIGGERED_BUFFER is disabled
Product: Drivers Reporter: Paul Gazzillo (paul)
Component: IIOAssignee: Virtual Assignee for Drivers/IIO (drivers_iio)
Status: RESOLVED PATCH_ALREADY_AVAILABLE    
Severity: low CC: andy.shevchenko, jic23, lars
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description Paul Gazzillo 2022-11-10 21:39:25 UTC
Steps to reproduce (v6.1-rc2, x86_64):

1. make defconfig menuconfig
2. Enable the driver:
    -> Device Drivers
      -> Industrial I/O support (IIO [=y])
        -> Light sensors
          -> ROHM RPR0521 ALS and proximity sensor driver
3. make drivers/iio/light/rpr0521.o

Causes "implicit declaration of function" errors, e.g.,

    CC      drivers/iio/light/rpr0521.o
  drivers/iio/light/rpr0521.c: In function 'rpr0521_drdy_irq_thread':
  drivers/iio/light/rpr0521.c:434:3: error: implicit declaration of function
           'iio_trigger_poll_chained' [-Werror=implicit-function-declaration]
    434 |   iio_trigger_poll_chained(data->drdy_trigger0);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~